---
title: Action URLs
url: https://platform.claude.com/docs/en/api/csharp/user_profiles/action_urls
---

# Action URLs

## Create Action URL

`UserProfileActionUrl UserProfiles.ActionUrls.Create(parameters, cancellationToken = default)`

**POST** `/v1/user_profiles/{user_profile_id}/action_urls`

Create Action URL

### Parameters

- `ActionUrlCreateParams parameters`

  - `required string userProfileID` (path parameter)

    The ID of the user profile the action is for (`uprof_...`).

  - `required UserProfileEnrollEndUserAction action`

    The action that the person who opens the URL takes.

  - `string workspaceID` (header parameter)

    Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

    Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

### Returns

- `class UserProfileActionUrl`

  A URL to give to the person who takes the requested action.

  - `JsonElement Type = "user_profile_action_url"`

    Object type. Always `user_profile_action_url`.

  - `required DateTimeOffset ExpiresAt`

    When the URL stops working, in RFC 3339 format.

    format: date-time

  - `required string Url`

    The URL to give to the person who takes the action. Anyone who holds it can open it until `expires_at`.

### Example

```csharp
using System;
using Anthropic.Models.UserProfiles.ActionUrls;

ActionUrlCreateParams parameters = new()
{
    UserProfileID = "uprof_011CZkZCu8hGbp5mYRQgUmz9",
    Action = new(),
};

var userProfileActionUrl = await client.UserProfiles.ActionUrls.Create(parameters);

Console.WriteLine(userProfileActionUrl);
```

#### Response (200)

```json
{
  "expires_at": "2026-03-15T10:15:00Z",
  "type": "user_profile_action_url",
  "url": "https://platform.claude.com/user-profiles/enrollment/M3J0bGJxZ2ppMnptbnB1"
}
```

## Domain types

### User Profile Action

- `class UserProfileAction: union`

  The action that the person who opens the URL takes, discriminated by `type`.

  - `class UserProfileEnrollEndUserAction`

    The end-user that the profile represents enrolls in a program.

    - `JsonElement Type = "enroll_end_user"`

### User Profile Action URL

- `class UserProfileActionUrl`

  A URL to give to the person who takes the requested action.

  - `JsonElement Type = "user_profile_action_url"`

    Object type. Always `user_profile_action_url`.

  - `required DateTimeOffset ExpiresAt`

    When the URL stops working, in RFC 3339 format.

    format: date-time

  - `required string Url`

    The URL to give to the person who takes the action. Anyone who holds it can open it until `expires_at`.

### User Profile Enroll End User Action

- `class UserProfileEnrollEndUserAction`

  The end-user that the profile represents enrolls in a program.

  - `JsonElement Type = "enroll_end_user"`
