---
title: "Create User Profile"
method: POST
path: "/v1/user_profiles?beta=true"
---

# Create User Profile

`POST /v1/user_profiles?beta=true`

## Headers

- `anthropic-version` string
- `anthropic-beta` string

## Request body

- BetaCreateUserProfileRequest
  - `external_id` string, nullable — Platform's own identifier for this user. Not enforced unique. Maximum 255 characters.
  - `name` string, nullable — Optional for all profiles. Real-world name of the entity this profile represents (company or individual); for a resold-to company (`relationship` `resold` / `access_type` `passthrough`), that company's name where known. Maximum 255 characters.
  - `relationship` 'external' | 'resold' | 'internal' — How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage.
  - `access_type` 'application' | 'passthrough' — How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company.
  - `metadata` object — Free-form key-value data to attach to this user profile. Maximum 16 keys, with keys up to 64 characters and values up to 512 characters. Values must be non-empty strings.

## Response `200`

Successful response (OK)

- BetaUserProfile
  - `id` string, required — Unique identifier for this user profile, prefixed `uprof_`.
  - `type` 'user_profile', required — Object type. Always `user_profile`.
  - `external_id` string, nullable — Platform's own identifier for this user. Not enforced unique.
  - `name` string, nullable — Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name.
  - `relationship` 'external' | 'resold' | 'internal' — How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage.
  - `access_type` 'application' | 'passthrough' — How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company.
  - `trust_grants` object, required — Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.
  - `created_at` string, date-time, required — A timestamp in RFC 3339 format
  - `metadata` object, required — Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
  - `updated_at` string, date-time, required — A timestamp in RFC 3339 format

## Other responses

- `400` — Invalid argument - The client specified an invalid argument
- `401` — Unauthenticated - The request does not have valid authentication credentials
- `403` — Permission denied - The caller does not have permission to execute the specified operation
- `404` — Not found - Some requested entity was not found
- `408` — Deadline exceeded - The deadline expired before the operation could complete
- `409` — Aborted - The operation was aborted due to concurrency issue
- `412` — Failed precondition - Operation was rejected because the system is not in required state
- `413` — Out of range - Operation was attempted past the valid range
- `429` — Resource exhausted - Some resource has been exhausted (rate limiting)
- `431` — Request header fields too large - Request metadata was too large
- `499` — Cancelled - The operation was cancelled by the client
- `500` — Internal - Internal server error
- `501` — Unimplemented - The operation is not implemented or supported
- `503` — Unavailable - The service is currently unavailable
- `504` — Deadline exceeded - Upstream service did not respond in time

## Changes

- **2026-08-18** `d3515f9e9eca` — 1 breaking, 2 info
  - the response property `relationship` became optional for the status `200`
  - added the new optional request property `access_type`
  - added the optional property `access_type` to the response with the `200` status
- **2026-08-17** `d2b230555b7f` — 4 breaking, 4 info
  - the request property `external_id` became not nullable
  - the request property `name` became not nullable
  - response property `external_id` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - response property `name` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - …4 more
- **2026-05-06** `a4186730f56c` — 4 info
  - added the new optional request property `name`
  - added the new optional request property `relationship`
  - added the optional property `name` to the response with the `200` status
  - added the required property `relationship` to the response with the `200` status
- **2026-04-16** `e0696f59ae07` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/anthropics/apis/anthropic-api/changes/v1/user_profiles?beta=true/post.md)

---

[API](https://skmtc.dev/anthropics/apis/anthropic-api.md) · [All operations](https://skmtc.dev/anthropics/apis/anthropic-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/anthropics/anthropic-api/revisions/717ab2a5efd6/schema)
