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

# Action URLs

## Create Action URL

- Signature: `client.userProfiles.actionURLs.create(userProfileID: string, params: ActionURLCreateParams, options?: RequestOptions): UserProfileActionURL`
- Endpoint: `POST /v1/user_profiles/{user_profile_id}/action_urls`

### Example request

```ts
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env["ANTHROPIC_API_KEY"] // This is the default and can be omitted
});

const userProfileActionURL = await client.userProfiles.actionURLs.create(
  "uprof_011CZkZCu8hGbp5mYRQgUmz9",
  { action: { type: "enroll_end_user" } }
);

console.log(userProfileActionURL.expires_at);
```

### Example response (200)

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

### Parameters

```ts
/** The ID of the user profile the action is for (`uprof_...`). */
userProfileID: string; // path parameter

interface ActionURLCreateParams {
  /** The action that the person who opens the URL takes. */
  action: UserProfileEnrollEndUserAction;
  /** 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. */
  workspace_id?: string; // header parameter
}
```

### Returns

```ts
/** A URL to give to the person who takes the requested action. */
interface UserProfileActionURL {
  /** Object type. Always `user_profile_action_url`. */
  type: "user_profile_action_url";
  /** When the URL stops working, in RFC 3339 format. */
  expires_at: string; // format: date-time
  /** The URL to give to the person who takes the action. Anyone who holds it can open it until `expires_at`. */
  url: string;
}
```

### Types

```ts
/** The end-user that the profile represents enrolls in a program. */
interface UserProfileEnrollEndUserAction {
  type: "enroll_end_user";
}
```
