---
title: User Profiles
url: https://platform.claude.com/docs/en/api/go/user_profiles
---

# User Profiles

## Create User Profile

`client.UserProfiles.New(ctx, params) (*UserProfile, error)`

**POST** `/v1/user_profiles`

Create User Profile

### Parameters

- `params UserProfileNewParams`

  - `AccessType UserProfileAccessType Optional`

    How the platform uses the API for this entity. `application` (default): the profile represents an individual end-user of the platform's product. `passthrough`: the profile identifies a company the platform resells Claude access to.

  - `ExternalUserDetails UserProfileExternalUserDetailsParams Optional`

    Details about the entity this profile represents, as the platform states them. Every field is optional. Not accepted under the legacy `user-profiles-2026-03-24` and `user-profiles-2026-08-18` beta headers, which take the top-level `external_id` (and, under `user-profiles-2026-08-18`, `external_user_onboarded_at`) instead.

  - `Metadata map[string]string Optional`

    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.

  - `Name param.Opt[string] Optional`

    Optional for all profiles. Real-world name of the entity this profile represents (company or individual); for a company the platform resells Claude access to (`access_type` `passthrough`), that company's name where known. Maximum 255 characters.

    minLength: 1, maxLength: 255

  - `WorkspaceID param.Opt[string] Optional` (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

- `type UserProfile`

  A record of an entity that the platform serves through the API, such as an end-user of the platform's product or a company that the platform resells Claude access to.

  A Messages, Message Batches or token counting request can send a profile's `id` in the `anthropic-user-profile-id` header to attribute the request to that entity.

  - `Type UserProfile`

    Object type. Always `user_profile`.

  - `ID string`

    Unique identifier for this user profile, prefixed `uprof_`.

  - `AccessType UserProfileAccessType`

    How the platform uses the API for this entity: `application` (default) or `passthrough`. Absent under the legacy `user-profiles-2026-03-24` beta header.

    - `const UserProfileAccessTypeApplication UserProfileAccessType = "application"`

      The user profile represents an individual end-user of a product that the platform builds on the API. New profiles get this value by default.

    - `const UserProfileAccessTypePassthrough UserProfileAccessType = "passthrough"`

      The user profile represents a company that the platform resells Claude access to.

  - `CreatedAt Time`

    When this user profile was created, in RFC 3339 format.

    format: date-time

  - `EnforcementActions []UserProfileEnforcementActionUnion`

    The enforcement actions open on this profile; empty when none is open. Absent under the `user-profiles-2026-09-04` and earlier beta headers.

    - `type UserProfileEnforcementActionRestriction`

      Anthropic has limited how it serves the end user until the action is resolved. The end user may still be served in part.

      - `Type Restriction`

      - `ID string`

        The action's ID (`enac_...`), stable while the action is open.

      - `Action UserProfileEnforcementActionNextStep`

        The next step on the action: `verify` or `null`. `verify`: the end user can clear it now by passing an identity check. `null`: there is nothing the end user can do now to clear it, including while Anthropic reviews an identity check the end user submitted.

      - `ExpiresAt Time`

        When the action ends on its own, in RFC 3339 format; it stops showing once this time has passed. `null` when it has no end date, and always `null` when `reason` is `account_compromise`.

        format: date-time

      - `OpenedAt Time`

        When Anthropic opened the action, in RFC 3339 format.

        format: date-time

      - `Reason UserProfileEnforcementActionReason`

        Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

        - `const UserProfileEnforcementActionReasonUnsupportedRegion UserProfileEnforcementActionReason = "unsupported_region"`

        - `const UserProfileEnforcementActionReasonFraudOrAbuse UserProfileEnforcementActionReason = "fraud_or_abuse"`

        - `const UserProfileEnforcementActionReasonHighHarm UserProfileEnforcementActionReason = "high_harm"`

        - `const UserProfileEnforcementActionReasonUsagePolicyViolation UserProfileEnforcementActionReason = "usage_policy_violation"`

        - `const UserProfileEnforcementActionReasonAccountCompromise UserProfileEnforcementActionReason = "account_compromise"`

        - `const UserProfileEnforcementActionReasonUnspecified UserProfileEnforcementActionReason = "unspecified"`

    - `type UserProfileEnforcementActionBan`

      Anthropic has stopped serving the end user where the ban applies and does not plan to serve them there again.

      - `Type Ban`

      - `ID string`

        The action's ID (`enac_...`), stable while the action is open.

      - `Action UserProfileEnforcementActionNextStep`

        Always `null`: the end user cannot clear a ban.

      - `ExpiresAt Time`

        Always `null`: a ban has no end date.

        format: date-time

      - `OpenedAt Time`

        When Anthropic opened the action, in RFC 3339 format.

        format: date-time

      - `Reason UserProfileEnforcementActionReason`

        Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

  - `EnforcementStatus UserProfileEnforcementStatus`

    Anthropic's enforcement status of this profile, from its open enforcement actions and any identity check under review, by the first rule that applies: `banned` while any open action is a `ban`; `pending` while a restriction that an identity check can clear is open, the end user has submitted that check, Anthropic's review of it has not ended, and no open action's `reason` is `account_compromise`; `restricted` while any action is open; `unrestricted` while none is. Absent under the `user-profiles-2026-09-04` and earlier beta headers.

    - `const UserProfileEnforcementStatusUnrestricted UserProfileEnforcementStatus = "unrestricted"`

    - `const UserProfileEnforcementStatusPending UserProfileEnforcementStatus = "pending"`

    - `const UserProfileEnforcementStatusRestricted UserProfileEnforcementStatus = "restricted"`

    - `const UserProfileEnforcementStatusBanned UserProfileEnforcementStatus = "banned"`

  - `ExternalUserDetails UserProfileExternalUserDetails`

    Details about the entity this profile represents, as the platform states them; not verified by Anthropic. Every field is present, `null` until the platform supplies a value. Absent under the legacy `user-profiles-2026-03-24` and `user-profiles-2026-08-18` beta headers, which serve `reference_id` as the top-level `external_id` and, under `user-profiles-2026-08-18`, `onboarded_at` as `external_user_onboarded_at`.

    - `AccountStatus UserProfileExternalUserAccountStatus`

      The status of the entity's account on the platform: `active`, `suspended` or `blocked`. `null` until the platform supplies one.

      - `const UserProfileExternalUserAccountStatusActive UserProfileExternalUserAccountStatus = "active"`

        The platform has neither restricted nor barred the account of the entity that the user profile represents.

      - `const UserProfileExternalUserAccountStatusSuspended UserProfileExternalUserAccountStatus = "suspended"`

        The platform has restricted the account of the entity that the user profile represents and may restore it.

      - `const UserProfileExternalUserAccountStatusBlocked UserProfileExternalUserAccountStatus = "blocked"`

        The platform has barred the account of the entity that the user profile represents.

    - `Country string`

      The country the platform associates with the entity, as an ISO 3166-1 alpha-2 code. `null` until the platform supplies one.

    - `EmailHash string`

      The platform-computed hash of the entity's email address. `null` until the platform supplies one.

    - `EntityType UserProfileExternalUserEntityType`

      What kind of entity the profile represents: `individual`, `business`, `non_profit` or `government`. `null` until the platform supplies one.

      - `const UserProfileExternalUserEntityTypeIndividual UserProfileExternalUserEntityType = "individual"`

      - `const UserProfileExternalUserEntityTypeBusiness UserProfileExternalUserEntityType = "business"`

      - `const UserProfileExternalUserEntityTypeNonProfit UserProfileExternalUserEntityType = "non_profit"`

      - `const UserProfileExternalUserEntityTypeGovernment UserProfileExternalUserEntityType = "government"`

    - `NameHash string`

      The platform-computed hash of the entity's name. `null` until the platform supplies one.

    - `OnboardedAt Time`

      When the entity opened its account with the platform, as stated by the platform, in RFC 3339 format (UTC). `null` until the platform supplies one.

      format: date-time

    - `ReferenceID string`

      The platform's own reference for the entity. `null` until the platform supplies one.

  - `Metadata map[string]string`

    Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.

  - `Name string`

    Real-world name of the entity this profile represents (company or individual). For a company the platform resells Claude access to (`access_type` `passthrough`) this is that company's name. `null` until the platform supplies one.

  - `Programs UserProfilePrograms`

    The profile's standing in each Anthropic program, such as the Cyber Verification Program. Present when the request sends no user-profiles beta header; absent under the `user-profiles-2026-09-04` and earlier beta headers, which serve `trust_grants` instead.

    - `Cyber UserProfileCyberProgram`

      The profile's standing in the Cyber Verification Program. `null` when the profile has no status in it. Only retrieving the profile gives the full answer: a list or update response can show `null`, or a status other than `active`, for a profile that reads `active` when retrieved.

      - `Requirements UserProfileCyberRequirements`

        What a request that names the profile must allow to get the relaxed safeguards of every `active` tier. `null` when no tier is `active`, and wherever `tiers` is `{}`.

        - `DataRetention bool`

          Whether Anthropic must be able to retain the request's inference data.

        - `HumanReview bool`

          Whether Anthropic personnel must be allowed to review the data retained from the request.

      - `Status UserProfileProgramStatus`

        `active` when at least one tier is `active`, or when the profile has the program's access to earlier models. That access is not a tier: a profile that has it alone reads `active` with every tier `inactive`, or with `tiers` `{}` on a response that does not report tiers. When nothing is `active`, `pending` means that an application or enrollment is under review, or that what Anthropic approved does not yet apply to this profile, and `rejected` means that the application or enrollment was declined.

        - `const UserProfileProgramStatusActive UserProfileProgramStatus = "active"`

          The profile is in the program.

        - `const UserProfileProgramStatusPending UserProfileProgramStatus = "pending"`

          The profile is not in the program yet, and something is still awaited.

        - `const UserProfileProgramStatusRejected UserProfileProgramStatus = "rejected"`

          The profile is not in the program and nothing is awaited: Anthropic has declined, or has withdrawn an earlier approval.

      - `Tiers map[string]UserProfileCyberTier`

        The program's tiers, keyed by tier: `a` (Specialized Access), `b` (Red Team Access) and `c` (Defense Access). A response reports either every tier or none. When it reports them, as retrieving the profile normally does, every tier has a key, whether or not it applies to the profile. When it does not, as in the list of user profiles, `tiers` is `{}`, which does not mean that the tiers are inactive. No tier implies another, so read the tier you need. Anthropic may add tiers; ignore a key you do not recognize.

        - `Status UserProfileCyberTierStatus`

          `active` when the tier applies to the profile, otherwise `inactive`. The response does not say why a tier is `inactive`: it can be in review, declined, withdrawn, never applied for, or approved but not applied to this profile.

          - `const UserProfileCyberTierStatusActive UserProfileCyberTierStatus = "active"`

          - `const UserProfileCyberTierStatusInactive UserProfileCyberTierStatus = "inactive"`

    - `Efs UserProfileEfsProgram`

      The profile's standing in Enterprise Frontier Safeguards. `null` unless the platform's attestation for the program is in place on this profile, or the entity it represents has applied to the program. A list of user profiles does not report this program: there it reads `null` for every profile, so retrieve the profile to read it.

      - `Features map[string]UserProfileEfsFeature`

        The program's features, keyed by feature: `data_retention_exemption` (use of models that normally require data retention, without the data being retained), `cmek` (customer-managed encryption keys) and `storage` (customer-owned storage). Every feature that the caller's organization may read has a key, whether or not it is approved; a missing key does not mean that the feature is inactive. Anthropic may add features; ignore a key you do not recognize.

        - `Status UserProfileEfsFeatureStatus`

          `active` when Anthropic has approved the entity the profile represents to use the feature, otherwise `inactive`. `active` does not mean that the feature is set up or switched on, which is a separate step.

          - `const UserProfileEfsFeatureStatusActive UserProfileEfsFeatureStatus = "active"`

          - `const UserProfileEfsFeatureStatusInactive UserProfileEfsFeatureStatus = "inactive"`

      - `Status UserProfileProgramStatus`

        Anthropic's decision on the entity the profile represents: `pending` while it is awaited, `active` once Anthropic has approved the entity for the program, or `rejected` once Anthropic has declined or has removed the entity from the program. `active` does not mean that any one feature is approved: read the feature you need in `features`.

  - `UpdatedAt Time`

    When this user profile was last modified, in RFC 3339 format. It normally also updates shortly after Anthropic gives the profile an approval or withdraws one. Other changes to the statuses that Anthropic reports do not always update it, so read the status itself rather than watching this timestamp.

    format: date-time

### Example

```go
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go/v2"
	"github.com/anthropics/anthropic-sdk-go/v2/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	userProfile, err := client.UserProfiles.New(context.TODO(), anthropic.UserProfileNewParams{})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", userProfile.ID)
}
```

#### Response (200)

```json
{
  "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
  "access_type": "application",
  "created_at": "2026-03-15T10:00:00Z",
  "enforcement_actions": [],
  "enforcement_status": "unrestricted",
  "external_user_details": {
    "account_status": "active",
    "country": "US",
    "email_hash": null,
    "entity_type": "business",
    "name_hash": null,
    "onboarded_at": "2024-11-02T08:15:00Z",
    "reference_id": "user_12345"
  },
  "metadata": {},
  "name": "Example User",
  "programs": {
    "cyber": {
      "requirements": null,
      "status": "active",
      "tiers": {
        "a": {
          "status": "inactive"
        },
        "b": {
          "status": "inactive"
        },
        "c": {
          "status": "inactive"
        }
      }
    },
    "efs": null
  },
  "type": "user_profile",
  "updated_at": "2026-03-15T10:00:00Z"
}
```

## List User Profiles

`client.UserProfiles.List(ctx, params) (*PageCursor[UserProfile], error)`

**GET** `/v1/user_profiles`

List User Profiles

### Parameters

- `params UserProfileListParams`

  - `EnforcementStatus []UserProfileEnforcementStatus Optional` (query parameter)

    Return only the user profiles whose `enforcement_status` is one of these values: `unrestricted`, `pending`, `restricted` or `banned`. Repeat the parameter to match any of several. With it set, a page may hold fewer than `limit` profiles, or none, and still carry a `next_page`: the service examines a bounded number of profiles per request, and only a null `next_page` means the listing is complete. Rejected with `invalid_request_error` under the `user-profiles-2026-09-04` and earlier beta headers. Fails with `overloaded_error` when a profile's enforcement actions cannot be read for the moment.

    - `const UserProfileEnforcementStatusUnrestricted UserProfileEnforcementStatus = "unrestricted"`

    - `const UserProfileEnforcementStatusPending UserProfileEnforcementStatus = "pending"`

    - `const UserProfileEnforcementStatusRestricted UserProfileEnforcementStatus = "restricted"`

    - `const UserProfileEnforcementStatusBanned UserProfileEnforcementStatus = "banned"`

  - `Limit param.Opt[int64] Optional` (query parameter)

    The maximum number of user profiles to return, from 1 to 100. Defaults to 20.

    format: int32

  - `Order UserProfileListOrder Optional` (query parameter)

    The sort direction, applied to the field that `order_by` selects. Defaults to `desc`.

  - `OrderBy UserProfileListOrderBy Optional` (query parameter)

    The field to sort user profiles by, in the direction that `order` sets. Defaults to `created_at`.

  - `Page param.Opt[string] Optional` (query parameter)

    The cursor for the page to return, taken from `next_page` in a previous response.

    Leave it out to get the first page.

  - `WorkspaceID param.Opt[string] Optional` (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

- `type UserProfile`

  A record of an entity that the platform serves through the API, such as an end-user of the platform's product or a company that the platform resells Claude access to.

  A Messages, Message Batches or token counting request can send a profile's `id` in the `anthropic-user-profile-id` header to attribute the request to that entity.

  - `Type UserProfile`

    Object type. Always `user_profile`.

  - `ID string`

    Unique identifier for this user profile, prefixed `uprof_`.

  - `AccessType UserProfileAccessType`

    How the platform uses the API for this entity: `application` (default) or `passthrough`. Absent under the legacy `user-profiles-2026-03-24` beta header.

    - `const UserProfileAccessTypeApplication UserProfileAccessType = "application"`

      The user profile represents an individual end-user of a product that the platform builds on the API. New profiles get this value by default.

    - `const UserProfileAccessTypePassthrough UserProfileAccessType = "passthrough"`

      The user profile represents a company that the platform resells Claude access to.

  - `CreatedAt Time`

    When this user profile was created, in RFC 3339 format.

    format: date-time

  - `EnforcementActions []UserProfileEnforcementActionUnion`

    The enforcement actions open on this profile; empty when none is open. Absent under the `user-profiles-2026-09-04` and earlier beta headers.

    - `type UserProfileEnforcementActionRestriction`

      Anthropic has limited how it serves the end user until the action is resolved. The end user may still be served in part.

      - `Type Restriction`

      - `ID string`

        The action's ID (`enac_...`), stable while the action is open.

      - `Action UserProfileEnforcementActionNextStep`

        The next step on the action: `verify` or `null`. `verify`: the end user can clear it now by passing an identity check. `null`: there is nothing the end user can do now to clear it, including while Anthropic reviews an identity check the end user submitted.

      - `ExpiresAt Time`

        When the action ends on its own, in RFC 3339 format; it stops showing once this time has passed. `null` when it has no end date, and always `null` when `reason` is `account_compromise`.

        format: date-time

      - `OpenedAt Time`

        When Anthropic opened the action, in RFC 3339 format.

        format: date-time

      - `Reason UserProfileEnforcementActionReason`

        Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

        - `const UserProfileEnforcementActionReasonUnsupportedRegion UserProfileEnforcementActionReason = "unsupported_region"`

        - `const UserProfileEnforcementActionReasonFraudOrAbuse UserProfileEnforcementActionReason = "fraud_or_abuse"`

        - `const UserProfileEnforcementActionReasonHighHarm UserProfileEnforcementActionReason = "high_harm"`

        - `const UserProfileEnforcementActionReasonUsagePolicyViolation UserProfileEnforcementActionReason = "usage_policy_violation"`

        - `const UserProfileEnforcementActionReasonAccountCompromise UserProfileEnforcementActionReason = "account_compromise"`

        - `const UserProfileEnforcementActionReasonUnspecified UserProfileEnforcementActionReason = "unspecified"`

    - `type UserProfileEnforcementActionBan`

      Anthropic has stopped serving the end user where the ban applies and does not plan to serve them there again.

      - `Type Ban`

      - `ID string`

        The action's ID (`enac_...`), stable while the action is open.

      - `Action UserProfileEnforcementActionNextStep`

        Always `null`: the end user cannot clear a ban.

      - `ExpiresAt Time`

        Always `null`: a ban has no end date.

        format: date-time

      - `OpenedAt Time`

        When Anthropic opened the action, in RFC 3339 format.

        format: date-time

      - `Reason UserProfileEnforcementActionReason`

        Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

  - `EnforcementStatus UserProfileEnforcementStatus`

    Anthropic's enforcement status of this profile, from its open enforcement actions and any identity check under review, by the first rule that applies: `banned` while any open action is a `ban`; `pending` while a restriction that an identity check can clear is open, the end user has submitted that check, Anthropic's review of it has not ended, and no open action's `reason` is `account_compromise`; `restricted` while any action is open; `unrestricted` while none is. Absent under the `user-profiles-2026-09-04` and earlier beta headers.

    - `const UserProfileEnforcementStatusUnrestricted UserProfileEnforcementStatus = "unrestricted"`

    - `const UserProfileEnforcementStatusPending UserProfileEnforcementStatus = "pending"`

    - `const UserProfileEnforcementStatusRestricted UserProfileEnforcementStatus = "restricted"`

    - `const UserProfileEnforcementStatusBanned UserProfileEnforcementStatus = "banned"`

  - `ExternalUserDetails UserProfileExternalUserDetails`

    Details about the entity this profile represents, as the platform states them; not verified by Anthropic. Every field is present, `null` until the platform supplies a value. Absent under the legacy `user-profiles-2026-03-24` and `user-profiles-2026-08-18` beta headers, which serve `reference_id` as the top-level `external_id` and, under `user-profiles-2026-08-18`, `onboarded_at` as `external_user_onboarded_at`.

    - `AccountStatus UserProfileExternalUserAccountStatus`

      The status of the entity's account on the platform: `active`, `suspended` or `blocked`. `null` until the platform supplies one.

      - `const UserProfileExternalUserAccountStatusActive UserProfileExternalUserAccountStatus = "active"`

        The platform has neither restricted nor barred the account of the entity that the user profile represents.

      - `const UserProfileExternalUserAccountStatusSuspended UserProfileExternalUserAccountStatus = "suspended"`

        The platform has restricted the account of the entity that the user profile represents and may restore it.

      - `const UserProfileExternalUserAccountStatusBlocked UserProfileExternalUserAccountStatus = "blocked"`

        The platform has barred the account of the entity that the user profile represents.

    - `Country string`

      The country the platform associates with the entity, as an ISO 3166-1 alpha-2 code. `null` until the platform supplies one.

    - `EmailHash string`

      The platform-computed hash of the entity's email address. `null` until the platform supplies one.

    - `EntityType UserProfileExternalUserEntityType`

      What kind of entity the profile represents: `individual`, `business`, `non_profit` or `government`. `null` until the platform supplies one.

      - `const UserProfileExternalUserEntityTypeIndividual UserProfileExternalUserEntityType = "individual"`

      - `const UserProfileExternalUserEntityTypeBusiness UserProfileExternalUserEntityType = "business"`

      - `const UserProfileExternalUserEntityTypeNonProfit UserProfileExternalUserEntityType = "non_profit"`

      - `const UserProfileExternalUserEntityTypeGovernment UserProfileExternalUserEntityType = "government"`

    - `NameHash string`

      The platform-computed hash of the entity's name. `null` until the platform supplies one.

    - `OnboardedAt Time`

      When the entity opened its account with the platform, as stated by the platform, in RFC 3339 format (UTC). `null` until the platform supplies one.

      format: date-time

    - `ReferenceID string`

      The platform's own reference for the entity. `null` until the platform supplies one.

  - `Metadata map[string]string`

    Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.

  - `Name string`

    Real-world name of the entity this profile represents (company or individual). For a company the platform resells Claude access to (`access_type` `passthrough`) this is that company's name. `null` until the platform supplies one.

  - `Programs UserProfilePrograms`

    The profile's standing in each Anthropic program, such as the Cyber Verification Program. Present when the request sends no user-profiles beta header; absent under the `user-profiles-2026-09-04` and earlier beta headers, which serve `trust_grants` instead.

    - `Cyber UserProfileCyberProgram`

      The profile's standing in the Cyber Verification Program. `null` when the profile has no status in it. Only retrieving the profile gives the full answer: a list or update response can show `null`, or a status other than `active`, for a profile that reads `active` when retrieved.

      - `Requirements UserProfileCyberRequirements`

        What a request that names the profile must allow to get the relaxed safeguards of every `active` tier. `null` when no tier is `active`, and wherever `tiers` is `{}`.

        - `DataRetention bool`

          Whether Anthropic must be able to retain the request's inference data.

        - `HumanReview bool`

          Whether Anthropic personnel must be allowed to review the data retained from the request.

      - `Status UserProfileProgramStatus`

        `active` when at least one tier is `active`, or when the profile has the program's access to earlier models. That access is not a tier: a profile that has it alone reads `active` with every tier `inactive`, or with `tiers` `{}` on a response that does not report tiers. When nothing is `active`, `pending` means that an application or enrollment is under review, or that what Anthropic approved does not yet apply to this profile, and `rejected` means that the application or enrollment was declined.

        - `const UserProfileProgramStatusActive UserProfileProgramStatus = "active"`

          The profile is in the program.

        - `const UserProfileProgramStatusPending UserProfileProgramStatus = "pending"`

          The profile is not in the program yet, and something is still awaited.

        - `const UserProfileProgramStatusRejected UserProfileProgramStatus = "rejected"`

          The profile is not in the program and nothing is awaited: Anthropic has declined, or has withdrawn an earlier approval.

      - `Tiers map[string]UserProfileCyberTier`

        The program's tiers, keyed by tier: `a` (Specialized Access), `b` (Red Team Access) and `c` (Defense Access). A response reports either every tier or none. When it reports them, as retrieving the profile normally does, every tier has a key, whether or not it applies to the profile. When it does not, as in the list of user profiles, `tiers` is `{}`, which does not mean that the tiers are inactive. No tier implies another, so read the tier you need. Anthropic may add tiers; ignore a key you do not recognize.

        - `Status UserProfileCyberTierStatus`

          `active` when the tier applies to the profile, otherwise `inactive`. The response does not say why a tier is `inactive`: it can be in review, declined, withdrawn, never applied for, or approved but not applied to this profile.

          - `const UserProfileCyberTierStatusActive UserProfileCyberTierStatus = "active"`

          - `const UserProfileCyberTierStatusInactive UserProfileCyberTierStatus = "inactive"`

    - `Efs UserProfileEfsProgram`

      The profile's standing in Enterprise Frontier Safeguards. `null` unless the platform's attestation for the program is in place on this profile, or the entity it represents has applied to the program. A list of user profiles does not report this program: there it reads `null` for every profile, so retrieve the profile to read it.

      - `Features map[string]UserProfileEfsFeature`

        The program's features, keyed by feature: `data_retention_exemption` (use of models that normally require data retention, without the data being retained), `cmek` (customer-managed encryption keys) and `storage` (customer-owned storage). Every feature that the caller's organization may read has a key, whether or not it is approved; a missing key does not mean that the feature is inactive. Anthropic may add features; ignore a key you do not recognize.

        - `Status UserProfileEfsFeatureStatus`

          `active` when Anthropic has approved the entity the profile represents to use the feature, otherwise `inactive`. `active` does not mean that the feature is set up or switched on, which is a separate step.

          - `const UserProfileEfsFeatureStatusActive UserProfileEfsFeatureStatus = "active"`

          - `const UserProfileEfsFeatureStatusInactive UserProfileEfsFeatureStatus = "inactive"`

      - `Status UserProfileProgramStatus`

        Anthropic's decision on the entity the profile represents: `pending` while it is awaited, `active` once Anthropic has approved the entity for the program, or `rejected` once Anthropic has declined or has removed the entity from the program. `active` does not mean that any one feature is approved: read the feature you need in `features`.

  - `UpdatedAt Time`

    When this user profile was last modified, in RFC 3339 format. It normally also updates shortly after Anthropic gives the profile an approval or withdraws one. Other changes to the statuses that Anthropic reports do not always update it, so read the status itself rather than watching this timestamp.

    format: date-time

### Example

```go
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go/v2"
	"github.com/anthropics/anthropic-sdk-go/v2/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	page, err := client.UserProfiles.List(context.TODO(), anthropic.UserProfileListParams{})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", page)
}
```

#### Response (200)

```json
{
  "data": [
    {
      "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
      "access_type": "application",
      "created_at": "2026-03-15T10:00:00Z",
      "enforcement_actions": [],
      "enforcement_status": "unrestricted",
      "external_user_details": {
        "account_status": "active",
        "country": "US",
        "email_hash": null,
        "entity_type": "business",
        "name_hash": null,
        "onboarded_at": "2024-11-02T08:15:00Z",
        "reference_id": "user_12345"
      },
      "metadata": {},
      "name": "Example User",
      "programs": {
        "cyber": {
          "requirements": null,
          "status": "active",
          "tiers": {}
        },
        "efs": null
      },
      "type": "user_profile",
      "updated_at": "2026-03-15T10:00:00Z"
    }
  ],
  "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}
```

## Get User Profile

`client.UserProfiles.Get(ctx, userProfileID, query) (*UserProfile, error)`

**GET** `/v1/user_profiles/{user_profile_id}`

Get User Profile

### Parameters

- `userProfileID string` (path parameter)

  The ID of the user profile to get (`uprof_...`).

- `query UserProfileGetParams`

  - `WorkspaceID param.Opt[string] Optional` (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

- `type UserProfile`

  A record of an entity that the platform serves through the API, such as an end-user of the platform's product or a company that the platform resells Claude access to.

  A Messages, Message Batches or token counting request can send a profile's `id` in the `anthropic-user-profile-id` header to attribute the request to that entity.

  - `Type UserProfile`

    Object type. Always `user_profile`.

  - `ID string`

    Unique identifier for this user profile, prefixed `uprof_`.

  - `AccessType UserProfileAccessType`

    How the platform uses the API for this entity: `application` (default) or `passthrough`. Absent under the legacy `user-profiles-2026-03-24` beta header.

    - `const UserProfileAccessTypeApplication UserProfileAccessType = "application"`

      The user profile represents an individual end-user of a product that the platform builds on the API. New profiles get this value by default.

    - `const UserProfileAccessTypePassthrough UserProfileAccessType = "passthrough"`

      The user profile represents a company that the platform resells Claude access to.

  - `CreatedAt Time`

    When this user profile was created, in RFC 3339 format.

    format: date-time

  - `EnforcementActions []UserProfileEnforcementActionUnion`

    The enforcement actions open on this profile; empty when none is open. Absent under the `user-profiles-2026-09-04` and earlier beta headers.

    - `type UserProfileEnforcementActionRestriction`

      Anthropic has limited how it serves the end user until the action is resolved. The end user may still be served in part.

      - `Type Restriction`

      - `ID string`

        The action's ID (`enac_...`), stable while the action is open.

      - `Action UserProfileEnforcementActionNextStep`

        The next step on the action: `verify` or `null`. `verify`: the end user can clear it now by passing an identity check. `null`: there is nothing the end user can do now to clear it, including while Anthropic reviews an identity check the end user submitted.

      - `ExpiresAt Time`

        When the action ends on its own, in RFC 3339 format; it stops showing once this time has passed. `null` when it has no end date, and always `null` when `reason` is `account_compromise`.

        format: date-time

      - `OpenedAt Time`

        When Anthropic opened the action, in RFC 3339 format.

        format: date-time

      - `Reason UserProfileEnforcementActionReason`

        Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

        - `const UserProfileEnforcementActionReasonUnsupportedRegion UserProfileEnforcementActionReason = "unsupported_region"`

        - `const UserProfileEnforcementActionReasonFraudOrAbuse UserProfileEnforcementActionReason = "fraud_or_abuse"`

        - `const UserProfileEnforcementActionReasonHighHarm UserProfileEnforcementActionReason = "high_harm"`

        - `const UserProfileEnforcementActionReasonUsagePolicyViolation UserProfileEnforcementActionReason = "usage_policy_violation"`

        - `const UserProfileEnforcementActionReasonAccountCompromise UserProfileEnforcementActionReason = "account_compromise"`

        - `const UserProfileEnforcementActionReasonUnspecified UserProfileEnforcementActionReason = "unspecified"`

    - `type UserProfileEnforcementActionBan`

      Anthropic has stopped serving the end user where the ban applies and does not plan to serve them there again.

      - `Type Ban`

      - `ID string`

        The action's ID (`enac_...`), stable while the action is open.

      - `Action UserProfileEnforcementActionNextStep`

        Always `null`: the end user cannot clear a ban.

      - `ExpiresAt Time`

        Always `null`: a ban has no end date.

        format: date-time

      - `OpenedAt Time`

        When Anthropic opened the action, in RFC 3339 format.

        format: date-time

      - `Reason UserProfileEnforcementActionReason`

        Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

  - `EnforcementStatus UserProfileEnforcementStatus`

    Anthropic's enforcement status of this profile, from its open enforcement actions and any identity check under review, by the first rule that applies: `banned` while any open action is a `ban`; `pending` while a restriction that an identity check can clear is open, the end user has submitted that check, Anthropic's review of it has not ended, and no open action's `reason` is `account_compromise`; `restricted` while any action is open; `unrestricted` while none is. Absent under the `user-profiles-2026-09-04` and earlier beta headers.

    - `const UserProfileEnforcementStatusUnrestricted UserProfileEnforcementStatus = "unrestricted"`

    - `const UserProfileEnforcementStatusPending UserProfileEnforcementStatus = "pending"`

    - `const UserProfileEnforcementStatusRestricted UserProfileEnforcementStatus = "restricted"`

    - `const UserProfileEnforcementStatusBanned UserProfileEnforcementStatus = "banned"`

  - `ExternalUserDetails UserProfileExternalUserDetails`

    Details about the entity this profile represents, as the platform states them; not verified by Anthropic. Every field is present, `null` until the platform supplies a value. Absent under the legacy `user-profiles-2026-03-24` and `user-profiles-2026-08-18` beta headers, which serve `reference_id` as the top-level `external_id` and, under `user-profiles-2026-08-18`, `onboarded_at` as `external_user_onboarded_at`.

    - `AccountStatus UserProfileExternalUserAccountStatus`

      The status of the entity's account on the platform: `active`, `suspended` or `blocked`. `null` until the platform supplies one.

      - `const UserProfileExternalUserAccountStatusActive UserProfileExternalUserAccountStatus = "active"`

        The platform has neither restricted nor barred the account of the entity that the user profile represents.

      - `const UserProfileExternalUserAccountStatusSuspended UserProfileExternalUserAccountStatus = "suspended"`

        The platform has restricted the account of the entity that the user profile represents and may restore it.

      - `const UserProfileExternalUserAccountStatusBlocked UserProfileExternalUserAccountStatus = "blocked"`

        The platform has barred the account of the entity that the user profile represents.

    - `Country string`

      The country the platform associates with the entity, as an ISO 3166-1 alpha-2 code. `null` until the platform supplies one.

    - `EmailHash string`

      The platform-computed hash of the entity's email address. `null` until the platform supplies one.

    - `EntityType UserProfileExternalUserEntityType`

      What kind of entity the profile represents: `individual`, `business`, `non_profit` or `government`. `null` until the platform supplies one.

      - `const UserProfileExternalUserEntityTypeIndividual UserProfileExternalUserEntityType = "individual"`

      - `const UserProfileExternalUserEntityTypeBusiness UserProfileExternalUserEntityType = "business"`

      - `const UserProfileExternalUserEntityTypeNonProfit UserProfileExternalUserEntityType = "non_profit"`

      - `const UserProfileExternalUserEntityTypeGovernment UserProfileExternalUserEntityType = "government"`

    - `NameHash string`

      The platform-computed hash of the entity's name. `null` until the platform supplies one.

    - `OnboardedAt Time`

      When the entity opened its account with the platform, as stated by the platform, in RFC 3339 format (UTC). `null` until the platform supplies one.

      format: date-time

    - `ReferenceID string`

      The platform's own reference for the entity. `null` until the platform supplies one.

  - `Metadata map[string]string`

    Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.

  - `Name string`

    Real-world name of the entity this profile represents (company or individual). For a company the platform resells Claude access to (`access_type` `passthrough`) this is that company's name. `null` until the platform supplies one.

  - `Programs UserProfilePrograms`

    The profile's standing in each Anthropic program, such as the Cyber Verification Program. Present when the request sends no user-profiles beta header; absent under the `user-profiles-2026-09-04` and earlier beta headers, which serve `trust_grants` instead.

    - `Cyber UserProfileCyberProgram`

      The profile's standing in the Cyber Verification Program. `null` when the profile has no status in it. Only retrieving the profile gives the full answer: a list or update response can show `null`, or a status other than `active`, for a profile that reads `active` when retrieved.

      - `Requirements UserProfileCyberRequirements`

        What a request that names the profile must allow to get the relaxed safeguards of every `active` tier. `null` when no tier is `active`, and wherever `tiers` is `{}`.

        - `DataRetention bool`

          Whether Anthropic must be able to retain the request's inference data.

        - `HumanReview bool`

          Whether Anthropic personnel must be allowed to review the data retained from the request.

      - `Status UserProfileProgramStatus`

        `active` when at least one tier is `active`, or when the profile has the program's access to earlier models. That access is not a tier: a profile that has it alone reads `active` with every tier `inactive`, or with `tiers` `{}` on a response that does not report tiers. When nothing is `active`, `pending` means that an application or enrollment is under review, or that what Anthropic approved does not yet apply to this profile, and `rejected` means that the application or enrollment was declined.

        - `const UserProfileProgramStatusActive UserProfileProgramStatus = "active"`

          The profile is in the program.

        - `const UserProfileProgramStatusPending UserProfileProgramStatus = "pending"`

          The profile is not in the program yet, and something is still awaited.

        - `const UserProfileProgramStatusRejected UserProfileProgramStatus = "rejected"`

          The profile is not in the program and nothing is awaited: Anthropic has declined, or has withdrawn an earlier approval.

      - `Tiers map[string]UserProfileCyberTier`

        The program's tiers, keyed by tier: `a` (Specialized Access), `b` (Red Team Access) and `c` (Defense Access). A response reports either every tier or none. When it reports them, as retrieving the profile normally does, every tier has a key, whether or not it applies to the profile. When it does not, as in the list of user profiles, `tiers` is `{}`, which does not mean that the tiers are inactive. No tier implies another, so read the tier you need. Anthropic may add tiers; ignore a key you do not recognize.

        - `Status UserProfileCyberTierStatus`

          `active` when the tier applies to the profile, otherwise `inactive`. The response does not say why a tier is `inactive`: it can be in review, declined, withdrawn, never applied for, or approved but not applied to this profile.

          - `const UserProfileCyberTierStatusActive UserProfileCyberTierStatus = "active"`

          - `const UserProfileCyberTierStatusInactive UserProfileCyberTierStatus = "inactive"`

    - `Efs UserProfileEfsProgram`

      The profile's standing in Enterprise Frontier Safeguards. `null` unless the platform's attestation for the program is in place on this profile, or the entity it represents has applied to the program. A list of user profiles does not report this program: there it reads `null` for every profile, so retrieve the profile to read it.

      - `Features map[string]UserProfileEfsFeature`

        The program's features, keyed by feature: `data_retention_exemption` (use of models that normally require data retention, without the data being retained), `cmek` (customer-managed encryption keys) and `storage` (customer-owned storage). Every feature that the caller's organization may read has a key, whether or not it is approved; a missing key does not mean that the feature is inactive. Anthropic may add features; ignore a key you do not recognize.

        - `Status UserProfileEfsFeatureStatus`

          `active` when Anthropic has approved the entity the profile represents to use the feature, otherwise `inactive`. `active` does not mean that the feature is set up or switched on, which is a separate step.

          - `const UserProfileEfsFeatureStatusActive UserProfileEfsFeatureStatus = "active"`

          - `const UserProfileEfsFeatureStatusInactive UserProfileEfsFeatureStatus = "inactive"`

      - `Status UserProfileProgramStatus`

        Anthropic's decision on the entity the profile represents: `pending` while it is awaited, `active` once Anthropic has approved the entity for the program, or `rejected` once Anthropic has declined or has removed the entity from the program. `active` does not mean that any one feature is approved: read the feature you need in `features`.

  - `UpdatedAt Time`

    When this user profile was last modified, in RFC 3339 format. It normally also updates shortly after Anthropic gives the profile an approval or withdraws one. Other changes to the statuses that Anthropic reports do not always update it, so read the status itself rather than watching this timestamp.

    format: date-time

### Example

```go
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go/v2"
	"github.com/anthropics/anthropic-sdk-go/v2/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	userProfile, err := client.UserProfiles.Get(
		context.TODO(),
		"uprof_011CZkZCu8hGbp5mYRQgUmz9",
		anthropic.UserProfileGetParams{},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", userProfile.ID)
}
```

#### Response (200)

```json
{
  "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
  "access_type": "application",
  "created_at": "2026-03-15T10:00:00Z",
  "enforcement_actions": [],
  "enforcement_status": "unrestricted",
  "external_user_details": {
    "account_status": "active",
    "country": "US",
    "email_hash": null,
    "entity_type": "business",
    "name_hash": null,
    "onboarded_at": "2024-11-02T08:15:00Z",
    "reference_id": "user_12345"
  },
  "metadata": {},
  "name": "Example User",
  "programs": {
    "cyber": {
      "requirements": null,
      "status": "active",
      "tiers": {
        "a": {
          "status": "inactive"
        },
        "b": {
          "status": "inactive"
        },
        "c": {
          "status": "inactive"
        }
      }
    },
    "efs": null
  },
  "type": "user_profile",
  "updated_at": "2026-03-15T10:00:00Z"
}
```

## Update User Profile

`client.UserProfiles.Update(ctx, userProfileID, params) (*UserProfile, error)`

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

Update User Profile

### Parameters

- `userProfileID string` (path parameter)

  The ID of the user profile to update (`uprof_...`).

- `params UserProfileUpdateParams`

  - `AccessType UserProfileAccessType Optional`

    If present, replaces the stored access type. Omit to leave unchanged.

  - `ExternalUserDetails UserProfileExternalUserDetailsParams Optional`

    Details about the entity this profile represents, as the platform states them. Each field sent replaces the stored value; omit a field to leave it unchanged. Once set, a value cannot be cleared and `null` is rejected. Not accepted under the legacy `user-profiles-2026-03-24` and `user-profiles-2026-08-18` beta headers.

  - `Metadata map[string]string Optional`

    Key-value pairs to merge into the stored metadata. Keys provided overwrite existing values. To remove a key, set its value to an empty string. Keys not provided are left unchanged. Maximum 16 keys, with keys up to 64 characters and values up to 512 characters.

  - `Name param.Opt[string] Optional`

    If present, replaces the stored name. Omit to leave unchanged. Maximum 255 characters.

    minLength: 1, maxLength: 255

  - `WorkspaceID param.Opt[string] Optional` (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

- `type UserProfile`

  A record of an entity that the platform serves through the API, such as an end-user of the platform's product or a company that the platform resells Claude access to.

  A Messages, Message Batches or token counting request can send a profile's `id` in the `anthropic-user-profile-id` header to attribute the request to that entity.

  - `Type UserProfile`

    Object type. Always `user_profile`.

  - `ID string`

    Unique identifier for this user profile, prefixed `uprof_`.

  - `AccessType UserProfileAccessType`

    How the platform uses the API for this entity: `application` (default) or `passthrough`. Absent under the legacy `user-profiles-2026-03-24` beta header.

    - `const UserProfileAccessTypeApplication UserProfileAccessType = "application"`

      The user profile represents an individual end-user of a product that the platform builds on the API. New profiles get this value by default.

    - `const UserProfileAccessTypePassthrough UserProfileAccessType = "passthrough"`

      The user profile represents a company that the platform resells Claude access to.

  - `CreatedAt Time`

    When this user profile was created, in RFC 3339 format.

    format: date-time

  - `EnforcementActions []UserProfileEnforcementActionUnion`

    The enforcement actions open on this profile; empty when none is open. Absent under the `user-profiles-2026-09-04` and earlier beta headers.

    - `type UserProfileEnforcementActionRestriction`

      Anthropic has limited how it serves the end user until the action is resolved. The end user may still be served in part.

      - `Type Restriction`

      - `ID string`

        The action's ID (`enac_...`), stable while the action is open.

      - `Action UserProfileEnforcementActionNextStep`

        The next step on the action: `verify` or `null`. `verify`: the end user can clear it now by passing an identity check. `null`: there is nothing the end user can do now to clear it, including while Anthropic reviews an identity check the end user submitted.

      - `ExpiresAt Time`

        When the action ends on its own, in RFC 3339 format; it stops showing once this time has passed. `null` when it has no end date, and always `null` when `reason` is `account_compromise`.

        format: date-time

      - `OpenedAt Time`

        When Anthropic opened the action, in RFC 3339 format.

        format: date-time

      - `Reason UserProfileEnforcementActionReason`

        Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

        - `const UserProfileEnforcementActionReasonUnsupportedRegion UserProfileEnforcementActionReason = "unsupported_region"`

        - `const UserProfileEnforcementActionReasonFraudOrAbuse UserProfileEnforcementActionReason = "fraud_or_abuse"`

        - `const UserProfileEnforcementActionReasonHighHarm UserProfileEnforcementActionReason = "high_harm"`

        - `const UserProfileEnforcementActionReasonUsagePolicyViolation UserProfileEnforcementActionReason = "usage_policy_violation"`

        - `const UserProfileEnforcementActionReasonAccountCompromise UserProfileEnforcementActionReason = "account_compromise"`

        - `const UserProfileEnforcementActionReasonUnspecified UserProfileEnforcementActionReason = "unspecified"`

    - `type UserProfileEnforcementActionBan`

      Anthropic has stopped serving the end user where the ban applies and does not plan to serve them there again.

      - `Type Ban`

      - `ID string`

        The action's ID (`enac_...`), stable while the action is open.

      - `Action UserProfileEnforcementActionNextStep`

        Always `null`: the end user cannot clear a ban.

      - `ExpiresAt Time`

        Always `null`: a ban has no end date.

        format: date-time

      - `OpenedAt Time`

        When Anthropic opened the action, in RFC 3339 format.

        format: date-time

      - `Reason UserProfileEnforcementActionReason`

        Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

  - `EnforcementStatus UserProfileEnforcementStatus`

    Anthropic's enforcement status of this profile, from its open enforcement actions and any identity check under review, by the first rule that applies: `banned` while any open action is a `ban`; `pending` while a restriction that an identity check can clear is open, the end user has submitted that check, Anthropic's review of it has not ended, and no open action's `reason` is `account_compromise`; `restricted` while any action is open; `unrestricted` while none is. Absent under the `user-profiles-2026-09-04` and earlier beta headers.

    - `const UserProfileEnforcementStatusUnrestricted UserProfileEnforcementStatus = "unrestricted"`

    - `const UserProfileEnforcementStatusPending UserProfileEnforcementStatus = "pending"`

    - `const UserProfileEnforcementStatusRestricted UserProfileEnforcementStatus = "restricted"`

    - `const UserProfileEnforcementStatusBanned UserProfileEnforcementStatus = "banned"`

  - `ExternalUserDetails UserProfileExternalUserDetails`

    Details about the entity this profile represents, as the platform states them; not verified by Anthropic. Every field is present, `null` until the platform supplies a value. Absent under the legacy `user-profiles-2026-03-24` and `user-profiles-2026-08-18` beta headers, which serve `reference_id` as the top-level `external_id` and, under `user-profiles-2026-08-18`, `onboarded_at` as `external_user_onboarded_at`.

    - `AccountStatus UserProfileExternalUserAccountStatus`

      The status of the entity's account on the platform: `active`, `suspended` or `blocked`. `null` until the platform supplies one.

      - `const UserProfileExternalUserAccountStatusActive UserProfileExternalUserAccountStatus = "active"`

        The platform has neither restricted nor barred the account of the entity that the user profile represents.

      - `const UserProfileExternalUserAccountStatusSuspended UserProfileExternalUserAccountStatus = "suspended"`

        The platform has restricted the account of the entity that the user profile represents and may restore it.

      - `const UserProfileExternalUserAccountStatusBlocked UserProfileExternalUserAccountStatus = "blocked"`

        The platform has barred the account of the entity that the user profile represents.

    - `Country string`

      The country the platform associates with the entity, as an ISO 3166-1 alpha-2 code. `null` until the platform supplies one.

    - `EmailHash string`

      The platform-computed hash of the entity's email address. `null` until the platform supplies one.

    - `EntityType UserProfileExternalUserEntityType`

      What kind of entity the profile represents: `individual`, `business`, `non_profit` or `government`. `null` until the platform supplies one.

      - `const UserProfileExternalUserEntityTypeIndividual UserProfileExternalUserEntityType = "individual"`

      - `const UserProfileExternalUserEntityTypeBusiness UserProfileExternalUserEntityType = "business"`

      - `const UserProfileExternalUserEntityTypeNonProfit UserProfileExternalUserEntityType = "non_profit"`

      - `const UserProfileExternalUserEntityTypeGovernment UserProfileExternalUserEntityType = "government"`

    - `NameHash string`

      The platform-computed hash of the entity's name. `null` until the platform supplies one.

    - `OnboardedAt Time`

      When the entity opened its account with the platform, as stated by the platform, in RFC 3339 format (UTC). `null` until the platform supplies one.

      format: date-time

    - `ReferenceID string`

      The platform's own reference for the entity. `null` until the platform supplies one.

  - `Metadata map[string]string`

    Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.

  - `Name string`

    Real-world name of the entity this profile represents (company or individual). For a company the platform resells Claude access to (`access_type` `passthrough`) this is that company's name. `null` until the platform supplies one.

  - `Programs UserProfilePrograms`

    The profile's standing in each Anthropic program, such as the Cyber Verification Program. Present when the request sends no user-profiles beta header; absent under the `user-profiles-2026-09-04` and earlier beta headers, which serve `trust_grants` instead.

    - `Cyber UserProfileCyberProgram`

      The profile's standing in the Cyber Verification Program. `null` when the profile has no status in it. Only retrieving the profile gives the full answer: a list or update response can show `null`, or a status other than `active`, for a profile that reads `active` when retrieved.

      - `Requirements UserProfileCyberRequirements`

        What a request that names the profile must allow to get the relaxed safeguards of every `active` tier. `null` when no tier is `active`, and wherever `tiers` is `{}`.

        - `DataRetention bool`

          Whether Anthropic must be able to retain the request's inference data.

        - `HumanReview bool`

          Whether Anthropic personnel must be allowed to review the data retained from the request.

      - `Status UserProfileProgramStatus`

        `active` when at least one tier is `active`, or when the profile has the program's access to earlier models. That access is not a tier: a profile that has it alone reads `active` with every tier `inactive`, or with `tiers` `{}` on a response that does not report tiers. When nothing is `active`, `pending` means that an application or enrollment is under review, or that what Anthropic approved does not yet apply to this profile, and `rejected` means that the application or enrollment was declined.

        - `const UserProfileProgramStatusActive UserProfileProgramStatus = "active"`

          The profile is in the program.

        - `const UserProfileProgramStatusPending UserProfileProgramStatus = "pending"`

          The profile is not in the program yet, and something is still awaited.

        - `const UserProfileProgramStatusRejected UserProfileProgramStatus = "rejected"`

          The profile is not in the program and nothing is awaited: Anthropic has declined, or has withdrawn an earlier approval.

      - `Tiers map[string]UserProfileCyberTier`

        The program's tiers, keyed by tier: `a` (Specialized Access), `b` (Red Team Access) and `c` (Defense Access). A response reports either every tier or none. When it reports them, as retrieving the profile normally does, every tier has a key, whether or not it applies to the profile. When it does not, as in the list of user profiles, `tiers` is `{}`, which does not mean that the tiers are inactive. No tier implies another, so read the tier you need. Anthropic may add tiers; ignore a key you do not recognize.

        - `Status UserProfileCyberTierStatus`

          `active` when the tier applies to the profile, otherwise `inactive`. The response does not say why a tier is `inactive`: it can be in review, declined, withdrawn, never applied for, or approved but not applied to this profile.

          - `const UserProfileCyberTierStatusActive UserProfileCyberTierStatus = "active"`

          - `const UserProfileCyberTierStatusInactive UserProfileCyberTierStatus = "inactive"`

    - `Efs UserProfileEfsProgram`

      The profile's standing in Enterprise Frontier Safeguards. `null` unless the platform's attestation for the program is in place on this profile, or the entity it represents has applied to the program. A list of user profiles does not report this program: there it reads `null` for every profile, so retrieve the profile to read it.

      - `Features map[string]UserProfileEfsFeature`

        The program's features, keyed by feature: `data_retention_exemption` (use of models that normally require data retention, without the data being retained), `cmek` (customer-managed encryption keys) and `storage` (customer-owned storage). Every feature that the caller's organization may read has a key, whether or not it is approved; a missing key does not mean that the feature is inactive. Anthropic may add features; ignore a key you do not recognize.

        - `Status UserProfileEfsFeatureStatus`

          `active` when Anthropic has approved the entity the profile represents to use the feature, otherwise `inactive`. `active` does not mean that the feature is set up or switched on, which is a separate step.

          - `const UserProfileEfsFeatureStatusActive UserProfileEfsFeatureStatus = "active"`

          - `const UserProfileEfsFeatureStatusInactive UserProfileEfsFeatureStatus = "inactive"`

      - `Status UserProfileProgramStatus`

        Anthropic's decision on the entity the profile represents: `pending` while it is awaited, `active` once Anthropic has approved the entity for the program, or `rejected` once Anthropic has declined or has removed the entity from the program. `active` does not mean that any one feature is approved: read the feature you need in `features`.

  - `UpdatedAt Time`

    When this user profile was last modified, in RFC 3339 format. It normally also updates shortly after Anthropic gives the profile an approval or withdraws one. Other changes to the statuses that Anthropic reports do not always update it, so read the status itself rather than watching this timestamp.

    format: date-time

### Example

```go
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go/v2"
	"github.com/anthropics/anthropic-sdk-go/v2/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	userProfile, err := client.UserProfiles.Update(
		context.TODO(),
		"uprof_011CZkZCu8hGbp5mYRQgUmz9",
		anthropic.UserProfileUpdateParams{},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", userProfile.ID)
}
```

#### Response (200)

```json
{
  "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
  "access_type": "application",
  "created_at": "2026-03-15T10:00:00Z",
  "enforcement_actions": [],
  "enforcement_status": "unrestricted",
  "external_user_details": {
    "account_status": "active",
    "country": "US",
    "email_hash": null,
    "entity_type": "business",
    "name_hash": null,
    "onboarded_at": "2024-11-02T08:15:00Z",
    "reference_id": "user_12345"
  },
  "metadata": {},
  "name": "Example User",
  "programs": {
    "cyber": {
      "requirements": null,
      "status": "active",
      "tiers": {
        "a": {
          "status": "inactive"
        },
        "b": {
          "status": "inactive"
        },
        "c": {
          "status": "inactive"
        }
      }
    },
    "efs": null
  },
  "type": "user_profile",
  "updated_at": "2026-03-15T10:00:00Z"
}
```

## Delete User Profile

`client.UserProfiles.Delete(ctx, userProfileID, body) (*DeletedUserProfile, error)`

**DELETE** `/v1/user_profiles/{user_profile_id}`

Delete User Profile

### Parameters

- `userProfileID string` (path parameter)

  The ID of the user profile to delete (`uprof_...`).

- `body UserProfileDeleteParams`

  - `WorkspaceID param.Opt[string] Optional` (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

- `type DeletedUserProfile`

  - `Type UserProfileDeleted`

    Object type. Always `user_profile_deleted`.

  - `ID string`

    Identifier of the deleted user profile, prefixed `uprof_`.

### Example

```go
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go/v2"
	"github.com/anthropics/anthropic-sdk-go/v2/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	deletedUserProfile, err := client.UserProfiles.Delete(
		context.TODO(),
		"uprof_011CZkZCu8hGbp5mYRQgUmz9",
		anthropic.UserProfileDeleteParams{},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", deletedUserProfile.ID)
}
```

#### Response (200)

```json
{
  "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
  "type": "user_profile_deleted"
}
```

## Domain types

### Deleted User Profile

- `type DeletedUserProfile`

  - `Type UserProfileDeleted`

    Object type. Always `user_profile_deleted`.

  - `ID string`

    Identifier of the deleted user profile, prefixed `uprof_`.

### User Profile

- `type UserProfile`

  A record of an entity that the platform serves through the API, such as an end-user of the platform's product or a company that the platform resells Claude access to.

  A Messages, Message Batches or token counting request can send a profile's `id` in the `anthropic-user-profile-id` header to attribute the request to that entity.

  - `Type UserProfile`

    Object type. Always `user_profile`.

  - `ID string`

    Unique identifier for this user profile, prefixed `uprof_`.

  - `AccessType UserProfileAccessType`

    How the platform uses the API for this entity: `application` (default) or `passthrough`. Absent under the legacy `user-profiles-2026-03-24` beta header.

    - `const UserProfileAccessTypeApplication UserProfileAccessType = "application"`

      The user profile represents an individual end-user of a product that the platform builds on the API. New profiles get this value by default.

    - `const UserProfileAccessTypePassthrough UserProfileAccessType = "passthrough"`

      The user profile represents a company that the platform resells Claude access to.

  - `CreatedAt Time`

    When this user profile was created, in RFC 3339 format.

    format: date-time

  - `EnforcementActions []UserProfileEnforcementActionUnion`

    The enforcement actions open on this profile; empty when none is open. Absent under the `user-profiles-2026-09-04` and earlier beta headers.

    - `type UserProfileEnforcementActionRestriction`

      Anthropic has limited how it serves the end user until the action is resolved. The end user may still be served in part.

      - `Type Restriction`

      - `ID string`

        The action's ID (`enac_...`), stable while the action is open.

      - `Action UserProfileEnforcementActionNextStep`

        The next step on the action: `verify` or `null`. `verify`: the end user can clear it now by passing an identity check. `null`: there is nothing the end user can do now to clear it, including while Anthropic reviews an identity check the end user submitted.

      - `ExpiresAt Time`

        When the action ends on its own, in RFC 3339 format; it stops showing once this time has passed. `null` when it has no end date, and always `null` when `reason` is `account_compromise`.

        format: date-time

      - `OpenedAt Time`

        When Anthropic opened the action, in RFC 3339 format.

        format: date-time

      - `Reason UserProfileEnforcementActionReason`

        Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

        - `const UserProfileEnforcementActionReasonUnsupportedRegion UserProfileEnforcementActionReason = "unsupported_region"`

        - `const UserProfileEnforcementActionReasonFraudOrAbuse UserProfileEnforcementActionReason = "fraud_or_abuse"`

        - `const UserProfileEnforcementActionReasonHighHarm UserProfileEnforcementActionReason = "high_harm"`

        - `const UserProfileEnforcementActionReasonUsagePolicyViolation UserProfileEnforcementActionReason = "usage_policy_violation"`

        - `const UserProfileEnforcementActionReasonAccountCompromise UserProfileEnforcementActionReason = "account_compromise"`

        - `const UserProfileEnforcementActionReasonUnspecified UserProfileEnforcementActionReason = "unspecified"`

    - `type UserProfileEnforcementActionBan`

      Anthropic has stopped serving the end user where the ban applies and does not plan to serve them there again.

      - `Type Ban`

      - `ID string`

        The action's ID (`enac_...`), stable while the action is open.

      - `Action UserProfileEnforcementActionNextStep`

        Always `null`: the end user cannot clear a ban.

      - `ExpiresAt Time`

        Always `null`: a ban has no end date.

        format: date-time

      - `OpenedAt Time`

        When Anthropic opened the action, in RFC 3339 format.

        format: date-time

      - `Reason UserProfileEnforcementActionReason`

        Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

  - `EnforcementStatus UserProfileEnforcementStatus`

    Anthropic's enforcement status of this profile, from its open enforcement actions and any identity check under review, by the first rule that applies: `banned` while any open action is a `ban`; `pending` while a restriction that an identity check can clear is open, the end user has submitted that check, Anthropic's review of it has not ended, and no open action's `reason` is `account_compromise`; `restricted` while any action is open; `unrestricted` while none is. Absent under the `user-profiles-2026-09-04` and earlier beta headers.

    - `const UserProfileEnforcementStatusUnrestricted UserProfileEnforcementStatus = "unrestricted"`

    - `const UserProfileEnforcementStatusPending UserProfileEnforcementStatus = "pending"`

    - `const UserProfileEnforcementStatusRestricted UserProfileEnforcementStatus = "restricted"`

    - `const UserProfileEnforcementStatusBanned UserProfileEnforcementStatus = "banned"`

  - `ExternalUserDetails UserProfileExternalUserDetails`

    Details about the entity this profile represents, as the platform states them; not verified by Anthropic. Every field is present, `null` until the platform supplies a value. Absent under the legacy `user-profiles-2026-03-24` and `user-profiles-2026-08-18` beta headers, which serve `reference_id` as the top-level `external_id` and, under `user-profiles-2026-08-18`, `onboarded_at` as `external_user_onboarded_at`.

    - `AccountStatus UserProfileExternalUserAccountStatus`

      The status of the entity's account on the platform: `active`, `suspended` or `blocked`. `null` until the platform supplies one.

      - `const UserProfileExternalUserAccountStatusActive UserProfileExternalUserAccountStatus = "active"`

        The platform has neither restricted nor barred the account of the entity that the user profile represents.

      - `const UserProfileExternalUserAccountStatusSuspended UserProfileExternalUserAccountStatus = "suspended"`

        The platform has restricted the account of the entity that the user profile represents and may restore it.

      - `const UserProfileExternalUserAccountStatusBlocked UserProfileExternalUserAccountStatus = "blocked"`

        The platform has barred the account of the entity that the user profile represents.

    - `Country string`

      The country the platform associates with the entity, as an ISO 3166-1 alpha-2 code. `null` until the platform supplies one.

    - `EmailHash string`

      The platform-computed hash of the entity's email address. `null` until the platform supplies one.

    - `EntityType UserProfileExternalUserEntityType`

      What kind of entity the profile represents: `individual`, `business`, `non_profit` or `government`. `null` until the platform supplies one.

      - `const UserProfileExternalUserEntityTypeIndividual UserProfileExternalUserEntityType = "individual"`

      - `const UserProfileExternalUserEntityTypeBusiness UserProfileExternalUserEntityType = "business"`

      - `const UserProfileExternalUserEntityTypeNonProfit UserProfileExternalUserEntityType = "non_profit"`

      - `const UserProfileExternalUserEntityTypeGovernment UserProfileExternalUserEntityType = "government"`

    - `NameHash string`

      The platform-computed hash of the entity's name. `null` until the platform supplies one.

    - `OnboardedAt Time`

      When the entity opened its account with the platform, as stated by the platform, in RFC 3339 format (UTC). `null` until the platform supplies one.

      format: date-time

    - `ReferenceID string`

      The platform's own reference for the entity. `null` until the platform supplies one.

  - `Metadata map[string]string`

    Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.

  - `Name string`

    Real-world name of the entity this profile represents (company or individual). For a company the platform resells Claude access to (`access_type` `passthrough`) this is that company's name. `null` until the platform supplies one.

  - `Programs UserProfilePrograms`

    The profile's standing in each Anthropic program, such as the Cyber Verification Program. Present when the request sends no user-profiles beta header; absent under the `user-profiles-2026-09-04` and earlier beta headers, which serve `trust_grants` instead.

    - `Cyber UserProfileCyberProgram`

      The profile's standing in the Cyber Verification Program. `null` when the profile has no status in it. Only retrieving the profile gives the full answer: a list or update response can show `null`, or a status other than `active`, for a profile that reads `active` when retrieved.

      - `Requirements UserProfileCyberRequirements`

        What a request that names the profile must allow to get the relaxed safeguards of every `active` tier. `null` when no tier is `active`, and wherever `tiers` is `{}`.

        - `DataRetention bool`

          Whether Anthropic must be able to retain the request's inference data.

        - `HumanReview bool`

          Whether Anthropic personnel must be allowed to review the data retained from the request.

      - `Status UserProfileProgramStatus`

        `active` when at least one tier is `active`, or when the profile has the program's access to earlier models. That access is not a tier: a profile that has it alone reads `active` with every tier `inactive`, or with `tiers` `{}` on a response that does not report tiers. When nothing is `active`, `pending` means that an application or enrollment is under review, or that what Anthropic approved does not yet apply to this profile, and `rejected` means that the application or enrollment was declined.

        - `const UserProfileProgramStatusActive UserProfileProgramStatus = "active"`

          The profile is in the program.

        - `const UserProfileProgramStatusPending UserProfileProgramStatus = "pending"`

          The profile is not in the program yet, and something is still awaited.

        - `const UserProfileProgramStatusRejected UserProfileProgramStatus = "rejected"`

          The profile is not in the program and nothing is awaited: Anthropic has declined, or has withdrawn an earlier approval.

      - `Tiers map[string]UserProfileCyberTier`

        The program's tiers, keyed by tier: `a` (Specialized Access), `b` (Red Team Access) and `c` (Defense Access). A response reports either every tier or none. When it reports them, as retrieving the profile normally does, every tier has a key, whether or not it applies to the profile. When it does not, as in the list of user profiles, `tiers` is `{}`, which does not mean that the tiers are inactive. No tier implies another, so read the tier you need. Anthropic may add tiers; ignore a key you do not recognize.

        - `Status UserProfileCyberTierStatus`

          `active` when the tier applies to the profile, otherwise `inactive`. The response does not say why a tier is `inactive`: it can be in review, declined, withdrawn, never applied for, or approved but not applied to this profile.

          - `const UserProfileCyberTierStatusActive UserProfileCyberTierStatus = "active"`

          - `const UserProfileCyberTierStatusInactive UserProfileCyberTierStatus = "inactive"`

    - `Efs UserProfileEfsProgram`

      The profile's standing in Enterprise Frontier Safeguards. `null` unless the platform's attestation for the program is in place on this profile, or the entity it represents has applied to the program. A list of user profiles does not report this program: there it reads `null` for every profile, so retrieve the profile to read it.

      - `Features map[string]UserProfileEfsFeature`

        The program's features, keyed by feature: `data_retention_exemption` (use of models that normally require data retention, without the data being retained), `cmek` (customer-managed encryption keys) and `storage` (customer-owned storage). Every feature that the caller's organization may read has a key, whether or not it is approved; a missing key does not mean that the feature is inactive. Anthropic may add features; ignore a key you do not recognize.

        - `Status UserProfileEfsFeatureStatus`

          `active` when Anthropic has approved the entity the profile represents to use the feature, otherwise `inactive`. `active` does not mean that the feature is set up or switched on, which is a separate step.

          - `const UserProfileEfsFeatureStatusActive UserProfileEfsFeatureStatus = "active"`

          - `const UserProfileEfsFeatureStatusInactive UserProfileEfsFeatureStatus = "inactive"`

      - `Status UserProfileProgramStatus`

        Anthropic's decision on the entity the profile represents: `pending` while it is awaited, `active` once Anthropic has approved the entity for the program, or `rejected` once Anthropic has declined or has removed the entity from the program. `active` does not mean that any one feature is approved: read the feature you need in `features`.

  - `UpdatedAt Time`

    When this user profile was last modified, in RFC 3339 format. It normally also updates shortly after Anthropic gives the profile an approval or withdraws one. Other changes to the statuses that Anthropic reports do not always update it, so read the status itself rather than watching this timestamp.

    format: date-time

### User Profile Access Type

- `type UserProfileAccessType string`

  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.

  - `const UserProfileAccessTypeApplication UserProfileAccessType = "application"`

    The user profile represents an individual end-user of a product that the platform builds on the API. New profiles get this value by default.

  - `const UserProfileAccessTypePassthrough UserProfileAccessType = "passthrough"`

    The user profile represents a company that the platform resells Claude access to.

### User Profile Billing Not Authorized Error Details

- `type UserProfileBillingNotAuthorizedErrorDetails`

  - `ErrorCode UserProfileBillingNotAuthorizedErrorCode`

### User Profile Cyber Program

- `type UserProfileCyberProgram`

  A user profile's standing in the Cyber Verification Program, which relaxes cyber safeguards for requests that name the profile.

  - `Requirements UserProfileCyberRequirements`

    What a request that names the profile must allow to get the relaxed safeguards of every `active` tier. `null` when no tier is `active`, and wherever `tiers` is `{}`.

    - `DataRetention bool`

      Whether Anthropic must be able to retain the request's inference data.

    - `HumanReview bool`

      Whether Anthropic personnel must be allowed to review the data retained from the request.

  - `Status UserProfileProgramStatus`

    `active` when at least one tier is `active`, or when the profile has the program's access to earlier models. That access is not a tier: a profile that has it alone reads `active` with every tier `inactive`, or with `tiers` `{}` on a response that does not report tiers. When nothing is `active`, `pending` means that an application or enrollment is under review, or that what Anthropic approved does not yet apply to this profile, and `rejected` means that the application or enrollment was declined.

    - `const UserProfileProgramStatusActive UserProfileProgramStatus = "active"`

      The profile is in the program.

    - `const UserProfileProgramStatusPending UserProfileProgramStatus = "pending"`

      The profile is not in the program yet, and something is still awaited.

    - `const UserProfileProgramStatusRejected UserProfileProgramStatus = "rejected"`

      The profile is not in the program and nothing is awaited: Anthropic has declined, or has withdrawn an earlier approval.

  - `Tiers map[string]UserProfileCyberTier`

    The program's tiers, keyed by tier: `a` (Specialized Access), `b` (Red Team Access) and `c` (Defense Access). A response reports either every tier or none. When it reports them, as retrieving the profile normally does, every tier has a key, whether or not it applies to the profile. When it does not, as in the list of user profiles, `tiers` is `{}`, which does not mean that the tiers are inactive. No tier implies another, so read the tier you need. Anthropic may add tiers; ignore a key you do not recognize.

    - `Status UserProfileCyberTierStatus`

      `active` when the tier applies to the profile, otherwise `inactive`. The response does not say why a tier is `inactive`: it can be in review, declined, withdrawn, never applied for, or approved but not applied to this profile.

      - `const UserProfileCyberTierStatusActive UserProfileCyberTierStatus = "active"`

      - `const UserProfileCyberTierStatusInactive UserProfileCyberTierStatus = "inactive"`

### User Profile Cyber Requirements

- `type UserProfileCyberRequirements`

  What a request that names the profile must allow to get the relaxed safeguards of the profile's `active` tiers. A field reads `true` when at least one of those tiers has the requirement and Anthropic has not waived it on that tier for the profile. A request that does not meet a requirement is still served, without the relaxed safeguards of the tiers that have it. The values differ between profiles and can change, so read them rather than assuming them.

  - `DataRetention bool`

    Whether Anthropic must be able to retain the request's inference data.

  - `HumanReview bool`

    Whether Anthropic personnel must be allowed to review the data retained from the request.

### User Profile Cyber Tier

- `type UserProfileCyberTier`

  One tier of the Cyber Verification Program.

  - `Status UserProfileCyberTierStatus`

    `active` when the tier applies to the profile, otherwise `inactive`. The response does not say why a tier is `inactive`: it can be in review, declined, withdrawn, never applied for, or approved but not applied to this profile.

    - `const UserProfileCyberTierStatusActive UserProfileCyberTierStatus = "active"`

    - `const UserProfileCyberTierStatusInactive UserProfileCyberTierStatus = "inactive"`

### User Profile Efs Feature

- `type UserProfileEfsFeature`

  One feature of Enterprise Frontier Safeguards.

  - `Status UserProfileEfsFeatureStatus`

    `active` when Anthropic has approved the entity the profile represents to use the feature, otherwise `inactive`. `active` does not mean that the feature is set up or switched on, which is a separate step.

    - `const UserProfileEfsFeatureStatusActive UserProfileEfsFeatureStatus = "active"`

    - `const UserProfileEfsFeatureStatusInactive UserProfileEfsFeatureStatus = "inactive"`

### User Profile Efs Program

- `type UserProfileEfsProgram`

  A user profile's standing in Enterprise Frontier Safeguards, a program under which Anthropic approves the entity the profile represents and may approve any of the program's features.

  - `Features map[string]UserProfileEfsFeature`

    The program's features, keyed by feature: `data_retention_exemption` (use of models that normally require data retention, without the data being retained), `cmek` (customer-managed encryption keys) and `storage` (customer-owned storage). Every feature that the caller's organization may read has a key, whether or not it is approved; a missing key does not mean that the feature is inactive. Anthropic may add features; ignore a key you do not recognize.

    - `Status UserProfileEfsFeatureStatus`

      `active` when Anthropic has approved the entity the profile represents to use the feature, otherwise `inactive`. `active` does not mean that the feature is set up or switched on, which is a separate step.

      - `const UserProfileEfsFeatureStatusActive UserProfileEfsFeatureStatus = "active"`

      - `const UserProfileEfsFeatureStatusInactive UserProfileEfsFeatureStatus = "inactive"`

  - `Status UserProfileProgramStatus`

    Anthropic's decision on the entity the profile represents: `pending` while it is awaited, `active` once Anthropic has approved the entity for the program, or `rejected` once Anthropic has declined or has removed the entity from the program. `active` does not mean that any one feature is approved: read the feature you need in `features`.

    - `const UserProfileProgramStatusActive UserProfileProgramStatus = "active"`

      The profile is in the program.

    - `const UserProfileProgramStatusPending UserProfileProgramStatus = "pending"`

      The profile is not in the program yet, and something is still awaited.

    - `const UserProfileProgramStatusRejected UserProfileProgramStatus = "rejected"`

      The profile is not in the program and nothing is awaited: Anthropic has declined, or has withdrawn an earlier approval.

### User Profile Enforcement Action

- `type UserProfileEnforcementActionUnion interface{…}`

  A limit Anthropic has placed on the entity this profile represents and not yet resolved, discriminated by `type`: `restriction` or `ban`. More types may be added; read a `type` you do not recognize as `restriction`.

  - `type UserProfileEnforcementActionRestriction`

    Anthropic has limited how it serves the end user until the action is resolved. The end user may still be served in part.

    - `Type Restriction`

    - `ID string`

      The action's ID (`enac_...`), stable while the action is open.

    - `Action UserProfileEnforcementActionNextStep`

      The next step on the action: `verify` or `null`. `verify`: the end user can clear it now by passing an identity check. `null`: there is nothing the end user can do now to clear it, including while Anthropic reviews an identity check the end user submitted.

    - `ExpiresAt Time`

      When the action ends on its own, in RFC 3339 format; it stops showing once this time has passed. `null` when it has no end date, and always `null` when `reason` is `account_compromise`.

      format: date-time

    - `OpenedAt Time`

      When Anthropic opened the action, in RFC 3339 format.

      format: date-time

    - `Reason UserProfileEnforcementActionReason`

      Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

      - `const UserProfileEnforcementActionReasonUnsupportedRegion UserProfileEnforcementActionReason = "unsupported_region"`

      - `const UserProfileEnforcementActionReasonFraudOrAbuse UserProfileEnforcementActionReason = "fraud_or_abuse"`

      - `const UserProfileEnforcementActionReasonHighHarm UserProfileEnforcementActionReason = "high_harm"`

      - `const UserProfileEnforcementActionReasonUsagePolicyViolation UserProfileEnforcementActionReason = "usage_policy_violation"`

      - `const UserProfileEnforcementActionReasonAccountCompromise UserProfileEnforcementActionReason = "account_compromise"`

      - `const UserProfileEnforcementActionReasonUnspecified UserProfileEnforcementActionReason = "unspecified"`

  - `type UserProfileEnforcementActionBan`

    Anthropic has stopped serving the end user where the ban applies and does not plan to serve them there again.

    - `Type Ban`

    - `ID string`

      The action's ID (`enac_...`), stable while the action is open.

    - `Action UserProfileEnforcementActionNextStep`

      Always `null`: the end user cannot clear a ban.

    - `ExpiresAt Time`

      Always `null`: a ban has no end date.

      format: date-time

    - `OpenedAt Time`

      When Anthropic opened the action, in RFC 3339 format.

      format: date-time

    - `Reason UserProfileEnforcementActionReason`

      Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

### User Profile Enforcement Action Ban

- `type UserProfileEnforcementActionBan`

  Anthropic has stopped serving the end user where the ban applies and does not plan to serve them there again.

  - `Type Ban`

  - `ID string`

    The action's ID (`enac_...`), stable while the action is open.

  - `Action UserProfileEnforcementActionNextStep`

    Always `null`: the end user cannot clear a ban.

  - `ExpiresAt Time`

    Always `null`: a ban has no end date.

    format: date-time

  - `OpenedAt Time`

    When Anthropic opened the action, in RFC 3339 format.

    format: date-time

  - `Reason UserProfileEnforcementActionReason`

    Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

    - `const UserProfileEnforcementActionReasonUnsupportedRegion UserProfileEnforcementActionReason = "unsupported_region"`

    - `const UserProfileEnforcementActionReasonFraudOrAbuse UserProfileEnforcementActionReason = "fraud_or_abuse"`

    - `const UserProfileEnforcementActionReasonHighHarm UserProfileEnforcementActionReason = "high_harm"`

    - `const UserProfileEnforcementActionReasonUsagePolicyViolation UserProfileEnforcementActionReason = "usage_policy_violation"`

    - `const UserProfileEnforcementActionReasonAccountCompromise UserProfileEnforcementActionReason = "account_compromise"`

    - `const UserProfileEnforcementActionReasonUnspecified UserProfileEnforcementActionReason = "unspecified"`

### User Profile Enforcement Action Next Step

- `type UserProfileEnforcementActionNextStep string`

  The next step on this enforcement action: `verify` means the end user can clear the action by passing an identity check. More values may be added; read a value you do not recognize as `null`.

### User Profile Enforcement Action Reason

- `type UserProfileEnforcementActionReason string`

  Why Anthropic placed this enforcement action: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`. More values may be added; read a value you do not recognize as `unspecified`.

  - `const UserProfileEnforcementActionReasonUnsupportedRegion UserProfileEnforcementActionReason = "unsupported_region"`

  - `const UserProfileEnforcementActionReasonFraudOrAbuse UserProfileEnforcementActionReason = "fraud_or_abuse"`

  - `const UserProfileEnforcementActionReasonHighHarm UserProfileEnforcementActionReason = "high_harm"`

  - `const UserProfileEnforcementActionReasonUsagePolicyViolation UserProfileEnforcementActionReason = "usage_policy_violation"`

  - `const UserProfileEnforcementActionReasonAccountCompromise UserProfileEnforcementActionReason = "account_compromise"`

  - `const UserProfileEnforcementActionReasonUnspecified UserProfileEnforcementActionReason = "unspecified"`

### User Profile Enforcement Action Restriction

- `type UserProfileEnforcementActionRestriction`

  Anthropic has limited how it serves the end user until the action is resolved. The end user may still be served in part.

  - `Type Restriction`

  - `ID string`

    The action's ID (`enac_...`), stable while the action is open.

  - `Action UserProfileEnforcementActionNextStep`

    The next step on the action: `verify` or `null`. `verify`: the end user can clear it now by passing an identity check. `null`: there is nothing the end user can do now to clear it, including while Anthropic reviews an identity check the end user submitted.

  - `ExpiresAt Time`

    When the action ends on its own, in RFC 3339 format; it stops showing once this time has passed. `null` when it has no end date, and always `null` when `reason` is `account_compromise`.

    format: date-time

  - `OpenedAt Time`

    When Anthropic opened the action, in RFC 3339 format.

    format: date-time

  - `Reason UserProfileEnforcementActionReason`

    Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.

    - `const UserProfileEnforcementActionReasonUnsupportedRegion UserProfileEnforcementActionReason = "unsupported_region"`

    - `const UserProfileEnforcementActionReasonFraudOrAbuse UserProfileEnforcementActionReason = "fraud_or_abuse"`

    - `const UserProfileEnforcementActionReasonHighHarm UserProfileEnforcementActionReason = "high_harm"`

    - `const UserProfileEnforcementActionReasonUsagePolicyViolation UserProfileEnforcementActionReason = "usage_policy_violation"`

    - `const UserProfileEnforcementActionReasonAccountCompromise UserProfileEnforcementActionReason = "account_compromise"`

    - `const UserProfileEnforcementActionReasonUnspecified UserProfileEnforcementActionReason = "unspecified"`

### User Profile Enforcement Status

- `type UserProfileEnforcementStatus string`

  Anthropic's enforcement status of this profile: `unrestricted`, `pending`, `restricted` or `banned`. More values may be added; read a value you do not recognize as `restricted`.

  - `const UserProfileEnforcementStatusUnrestricted UserProfileEnforcementStatus = "unrestricted"`

  - `const UserProfileEnforcementStatusPending UserProfileEnforcementStatus = "pending"`

  - `const UserProfileEnforcementStatusRestricted UserProfileEnforcementStatus = "restricted"`

  - `const UserProfileEnforcementStatusBanned UserProfileEnforcementStatus = "banned"`

### User Profile External User Account Status

- `type UserProfileExternalUserAccountStatus string`

  The status of the entity's account on the platform, as the platform states it: `active`; `suspended`, when the platform has restricted the account and may restore it; or `blocked`, when the platform has barred it. It records the platform's decision only. The statuses that Anthropic itself reports for the profile, such as its status in a program, are Anthropic's decisions and do not change with it.

  - `const UserProfileExternalUserAccountStatusActive UserProfileExternalUserAccountStatus = "active"`

    The platform has neither restricted nor barred the account of the entity that the user profile represents.

  - `const UserProfileExternalUserAccountStatusSuspended UserProfileExternalUserAccountStatus = "suspended"`

    The platform has restricted the account of the entity that the user profile represents and may restore it.

  - `const UserProfileExternalUserAccountStatusBlocked UserProfileExternalUserAccountStatus = "blocked"`

    The platform has barred the account of the entity that the user profile represents.

### User Profile External User Details

- `type UserProfileExternalUserDetails`

  Details about the entity this profile represents, as the platform states them. Anthropic does not verify them. Every field is present, `null` until the platform supplies a value.

  - `AccountStatus UserProfileExternalUserAccountStatus`

    The status of the entity's account on the platform: `active`, `suspended` or `blocked`. `null` until the platform supplies one.

    - `const UserProfileExternalUserAccountStatusActive UserProfileExternalUserAccountStatus = "active"`

      The platform has neither restricted nor barred the account of the entity that the user profile represents.

    - `const UserProfileExternalUserAccountStatusSuspended UserProfileExternalUserAccountStatus = "suspended"`

      The platform has restricted the account of the entity that the user profile represents and may restore it.

    - `const UserProfileExternalUserAccountStatusBlocked UserProfileExternalUserAccountStatus = "blocked"`

      The platform has barred the account of the entity that the user profile represents.

  - `Country string`

    The country the platform associates with the entity, as an ISO 3166-1 alpha-2 code. `null` until the platform supplies one.

  - `EmailHash string`

    The platform-computed hash of the entity's email address. `null` until the platform supplies one.

  - `EntityType UserProfileExternalUserEntityType`

    What kind of entity the profile represents: `individual`, `business`, `non_profit` or `government`. `null` until the platform supplies one.

    - `const UserProfileExternalUserEntityTypeIndividual UserProfileExternalUserEntityType = "individual"`

    - `const UserProfileExternalUserEntityTypeBusiness UserProfileExternalUserEntityType = "business"`

    - `const UserProfileExternalUserEntityTypeNonProfit UserProfileExternalUserEntityType = "non_profit"`

    - `const UserProfileExternalUserEntityTypeGovernment UserProfileExternalUserEntityType = "government"`

  - `NameHash string`

    The platform-computed hash of the entity's name. `null` until the platform supplies one.

  - `OnboardedAt Time`

    When the entity opened its account with the platform, as stated by the platform, in RFC 3339 format (UTC). `null` until the platform supplies one.

    format: date-time

  - `ReferenceID string`

    The platform's own reference for the entity. `null` until the platform supplies one.

### User Profile External User Details Params

- `type UserProfileExternalUserDetailsParams`

  - `AccountStatus UserProfileExternalUserAccountStatus Optional`

    The status of the entity's account on the platform: `active`, `suspended` or `blocked`.

    - `const UserProfileExternalUserAccountStatusActive UserProfileExternalUserAccountStatus = "active"`

      The platform has neither restricted nor barred the account of the entity that the user profile represents.

    - `const UserProfileExternalUserAccountStatusSuspended UserProfileExternalUserAccountStatus = "suspended"`

      The platform has restricted the account of the entity that the user profile represents and may restore it.

    - `const UserProfileExternalUserAccountStatusBlocked UserProfileExternalUserAccountStatus = "blocked"`

      The platform has barred the account of the entity that the user profile represents.

  - `Country string Optional`

    The country of the entity (not of the platform), as the platform determines it: an ISO 3166-1 alpha-2 code in upper case, for example `US`. Only the form, two uppercase ASCII letters, is checked.

    pattern: ^[A-Z]{2}$

  - `EmailHash string Optional`

    A hash of the entity's email address, computed by the platform. Anthropic treats it as an opaque string and does not prescribe the hash function. 1 to 255 characters.

    minLength: 1, maxLength: 255

  - `EntityType UserProfileExternalUserEntityType Optional`

    What kind of entity the profile represents: `individual`, `business`, `non_profit` or `government`.

    - `const UserProfileExternalUserEntityTypeIndividual UserProfileExternalUserEntityType = "individual"`

    - `const UserProfileExternalUserEntityTypeBusiness UserProfileExternalUserEntityType = "business"`

    - `const UserProfileExternalUserEntityTypeNonProfit UserProfileExternalUserEntityType = "non_profit"`

    - `const UserProfileExternalUserEntityTypeGovernment UserProfileExternalUserEntityType = "government"`

  - `NameHash string Optional`

    A hash of the entity's name, computed by the platform. Anthropic treats it as an opaque string and does not prescribe the hash function. 1 to 255 characters.

    minLength: 1, maxLength: 255

  - `OnboardedAt Time Optional`

    When the entity opened its account with the platform, in RFC 3339 format: for an `application` profile, when the end-user signed up; for a `passthrough` profile, when the company became the platform's customer. Must be a complete timestamp no more than 1 minute in the future.

    format: date-time

  - `ReferenceID string Optional`

    The platform's own reference for the entity, for example the key of the end-user's row in the platform's database. Not interpreted by Anthropic and not enforced unique. 1 to 255 characters.

    minLength: 1, maxLength: 255

### User Profile External User Entity Type

- `type UserProfileExternalUserEntityType string`

  What kind of entity the profile represents, as the platform states it: `individual`, `business`, `non_profit` or `government`.

  - `const UserProfileExternalUserEntityTypeIndividual UserProfileExternalUserEntityType = "individual"`

  - `const UserProfileExternalUserEntityTypeBusiness UserProfileExternalUserEntityType = "business"`

  - `const UserProfileExternalUserEntityTypeNonProfit UserProfileExternalUserEntityType = "non_profit"`

  - `const UserProfileExternalUserEntityTypeGovernment UserProfileExternalUserEntityType = "government"`

### User Profile List Order

- `type UserProfileListOrder string`

  The direction that a list of user profiles is sorted in.

  - `const UserProfileListOrderAsc UserProfileListOrder = "asc"`

    Oldest first when `order_by` is `created_at`, or names in ascending order when `order_by` is `name`.

  - `const UserProfileListOrderDesc UserProfileListOrder = "desc"`

    Newest first when `order_by` is `created_at`, or names in descending order when `order_by` is `name`. This is the default.

### User Profile List Order By

- `type UserProfileListOrderBy string`

  Sort field for listing user profiles: `created_at` (default) or `name` (case-insensitive; profiles without a name sort last).

  - `const UserProfileListOrderByCreatedAt UserProfileListOrderBy = "created_at"`

    Sort by when each user profile was created. This is the default.

  - `const UserProfileListOrderByName UserProfileListOrderBy = "name"`

    Sort by `name`, ignoring the case of ASCII letters. Profiles without a name come last in either direction.

### User Profile Not Billable Error Details

- `type UserProfileNotBillableErrorDetails`

  - `ErrorCode UserProfileNotBillableErrorCode`

### User Profile Not Found Error Details

- `type UserProfileNotFoundErrorDetails`

  - `ErrorCode UserProfileNotFoundErrorCode`

### User Profile Program Status

- `type UserProfileProgramStatus string`

  A user profile's status in a program. Each program's `status` field says what the values mean there.

  - `const UserProfileProgramStatusActive UserProfileProgramStatus = "active"`

    The profile is in the program.

  - `const UserProfileProgramStatusPending UserProfileProgramStatus = "pending"`

    The profile is not in the program yet, and something is still awaited.

  - `const UserProfileProgramStatusRejected UserProfileProgramStatus = "rejected"`

    The profile is not in the program and nothing is awaited: Anthropic has declined, or has withdrawn an earlier approval.

### User Profile Programs

- `type UserProfilePrograms`

  A user profile's standing in each program. A program is a set of capabilities or exemptions that Anthropic approves for the entity the profile represents. A program reads `null` when the profile has no status in it, when the caller's organization is not entitled to read programs, or when the response does not report that program. Retrieving the profile reports every program. Anthropic may add programs; ignore a key you do not recognize.

  - `Cyber UserProfileCyberProgram`

    The profile's standing in the Cyber Verification Program. `null` when the profile has no status in it. Only retrieving the profile gives the full answer: a list or update response can show `null`, or a status other than `active`, for a profile that reads `active` when retrieved.

    - `Requirements UserProfileCyberRequirements`

      What a request that names the profile must allow to get the relaxed safeguards of every `active` tier. `null` when no tier is `active`, and wherever `tiers` is `{}`.

      - `DataRetention bool`

        Whether Anthropic must be able to retain the request's inference data.

      - `HumanReview bool`

        Whether Anthropic personnel must be allowed to review the data retained from the request.

    - `Status UserProfileProgramStatus`

      `active` when at least one tier is `active`, or when the profile has the program's access to earlier models. That access is not a tier: a profile that has it alone reads `active` with every tier `inactive`, or with `tiers` `{}` on a response that does not report tiers. When nothing is `active`, `pending` means that an application or enrollment is under review, or that what Anthropic approved does not yet apply to this profile, and `rejected` means that the application or enrollment was declined.

      - `const UserProfileProgramStatusActive UserProfileProgramStatus = "active"`

        The profile is in the program.

      - `const UserProfileProgramStatusPending UserProfileProgramStatus = "pending"`

        The profile is not in the program yet, and something is still awaited.

      - `const UserProfileProgramStatusRejected UserProfileProgramStatus = "rejected"`

        The profile is not in the program and nothing is awaited: Anthropic has declined, or has withdrawn an earlier approval.

    - `Tiers map[string]UserProfileCyberTier`

      The program's tiers, keyed by tier: `a` (Specialized Access), `b` (Red Team Access) and `c` (Defense Access). A response reports either every tier or none. When it reports them, as retrieving the profile normally does, every tier has a key, whether or not it applies to the profile. When it does not, as in the list of user profiles, `tiers` is `{}`, which does not mean that the tiers are inactive. No tier implies another, so read the tier you need. Anthropic may add tiers; ignore a key you do not recognize.

      - `Status UserProfileCyberTierStatus`

        `active` when the tier applies to the profile, otherwise `inactive`. The response does not say why a tier is `inactive`: it can be in review, declined, withdrawn, never applied for, or approved but not applied to this profile.

        - `const UserProfileCyberTierStatusActive UserProfileCyberTierStatus = "active"`

        - `const UserProfileCyberTierStatusInactive UserProfileCyberTierStatus = "inactive"`

  - `Efs UserProfileEfsProgram`

    The profile's standing in Enterprise Frontier Safeguards. `null` unless the platform's attestation for the program is in place on this profile, or the entity it represents has applied to the program. A list of user profiles does not report this program: there it reads `null` for every profile, so retrieve the profile to read it.

    - `Features map[string]UserProfileEfsFeature`

      The program's features, keyed by feature: `data_retention_exemption` (use of models that normally require data retention, without the data being retained), `cmek` (customer-managed encryption keys) and `storage` (customer-owned storage). Every feature that the caller's organization may read has a key, whether or not it is approved; a missing key does not mean that the feature is inactive. Anthropic may add features; ignore a key you do not recognize.

      - `Status UserProfileEfsFeatureStatus`

        `active` when Anthropic has approved the entity the profile represents to use the feature, otherwise `inactive`. `active` does not mean that the feature is set up or switched on, which is a separate step.

        - `const UserProfileEfsFeatureStatusActive UserProfileEfsFeatureStatus = "active"`

        - `const UserProfileEfsFeatureStatusInactive UserProfileEfsFeatureStatus = "inactive"`

    - `Status UserProfileProgramStatus`

      Anthropic's decision on the entity the profile represents: `pending` while it is awaited, `active` once Anthropic has approved the entity for the program, or `rejected` once Anthropic has declined or has removed the entity from the program. `active` does not mean that any one feature is approved: read the feature you need in `features`.

### User Profile Required Error Details

- `type UserProfileRequiredErrorDetails`

  - `ErrorCode UserProfileRequiredErrorCode`

## Errors

### ErrorCodeUserProfileNotFound

HTTP status 400, error code `user_profile_not_found`

- `const ErrorCodeUserProfileNotFound ErrorCode = "user_profile_not_found"`

  The request depends on a user profile that does not exist in the organization or is no longer active. The request either names this user profile by ID, or names a resource, such as an External Key, that is bound to it.

### ErrorCodeUserProfileRequired

HTTP status 400, error code `user_profile_required`

- `const ErrorCodeUserProfileRequired ErrorCode = "user_profile_required"`

  The request sets `billing_policy.bill_to` to `"user_profile"` but names no user profile. Name the profile to bill in the `anthropic-user-profile-id` header.

### ErrorCodeUserProfileBillingNotAuthorized

HTTP status 403, error code `user_profile_billing_not_authorized`

- `const ErrorCodeUserProfileBillingNotAuthorized ErrorCode = "user_profile_billing_not_authorized"`

  The customer that the request's user profile represents has not authorized the caller to bill them, or the authorization that the request's credential uses has ended. The response does not say which applies.

### ErrorCodeUserProfileNotBillable

HTTP status 403, error code `user_profile_not_billable`

- `const ErrorCodeUserProfileNotBillable ErrorCode = "user_profile_not_billable"`

  The request's user profile cannot be billed. The response gives no more specific error code and does not say what the reason is.

## User Profiles › Action URLs

### Create Action URL

`client.UserProfiles.ActionURLs.New(ctx, userProfileID, params) (*UserProfileActionURL, error)`

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

Create Action URL

#### Parameters

- `userProfileID string` (path parameter)

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

- `params UserProfileActionURLNewParams`

  - `Action UserProfileActionUnionParam`

    The action that the person who opens the URL takes.

  - `WorkspaceID param.Opt[string] Optional` (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

- `type UserProfileActionURL`

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

  - `Type UserProfileActionURL`

    Object type. Always `user_profile_action_url`.

  - `ExpiresAt Time`

    When the URL stops working, in RFC 3339 format.

    format: date-time

  - `URL string`

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

#### Example

```go
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go/v2"
	"github.com/anthropics/anthropic-sdk-go/v2/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	userProfileActionURL, err := client.UserProfiles.ActionURLs.New(
		context.TODO(),
		"uprof_011CZkZCu8hGbp5mYRQgUmz9",
		anthropic.UserProfileActionURLNewParams{
			Action: anthropic.UserProfileActionUnionParam{
				OfEnrollEndUser: &anthropic.UserProfileEnrollEndUserActionParam{},
			},
		},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", userProfileActionURL.ExpiresAt)
}
```

##### Response (200)

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