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

# List User Profiles

`$client->userProfiles->list(?list<UserProfileEnforcementStatus> enforcementStatus, ?int limit, ?UserProfileListOrder order, ?UserProfileListOrderBy orderBy, ?string page, ?string workspaceID): PageCursor<UserProfile>`

**GET** `/v1/user_profiles`

List User Profiles

## Parameters

- `enforcementStatus?: optional list<UserProfileEnforcementStatus>` (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.

- `limit?: optional int` (query parameter)

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

- `order?: optional UserProfileListOrder` (query parameter)

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

- `orderBy?: optional UserProfileListOrderBy` (query parameter)

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

- `page?: optional string` (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?: optional string` (header parameter)

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

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

## Returns

- `class UserProfile`

  - `"user_profile" type`

    Object type. Always `user_profile`.

  - `string id`

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

  - `UserProfileAccessType accessType`

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

  - `\Datetime createdAt`

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

  - `list<UserProfileEnforcementAction> enforcementActions`

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

  - `UserProfileEnforcementStatus enforcementStatus`

    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.

  - `UserProfileExternalUserDetails externalUserDetails`

    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`.

  - `array<string,string> metadata`

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

  - `?string name`

    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.

  - `UserProfilePrograms programs`

    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.

  - `\Datetime updatedAt`

    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.

## Example

```php
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;
use Anthropic\UserProfiles\UserProfileEnforcementStatus;
use Anthropic\UserProfiles\UserProfileListOrder;
use Anthropic\UserProfiles\UserProfileListOrderBy;

$client = new Client(apiKey: 'my-anthropic-api-key');

$page = $client->userProfiles->list(
  enforcementStatus: [UserProfileEnforcementStatus::UNRESTRICTED],
  limit: 0,
  order: UserProfileListOrder::ASC,
  orderBy: UserProfileListOrderBy::CREATED_AT,
  page: 'page',
  workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);

var_dump($page);
```

### Response (200)

```json
{
  "data": [
    {
      "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
      "access_type": "application",
      "created_at": "2026-03-15T10:00:00Z",
      "enforcement_actions": [
        {
          "id": "enac_011CZkZCu8hGbp5mYRQgUmz9",
          "action": "verify",
          "expires_at": null,
          "opened_at": "2026-10-02T19:30:00Z",
          "reason": "fraud_or_abuse",
          "type": "restriction"
        }
      ],
      "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": {
            "data_retention": true,
            "human_review": true
          },
          "status": "active",
          "tiers": {}
        },
        "efs": {
          "features": {
            "data_retention_exemption": {
              "status": "inactive"
            },
            "cmek": {
              "status": "active"
            },
            "storage": {
              "status": "inactive"
            }
          },
          "status": "active"
        }
      },
      "type": "user_profile",
      "updated_at": "2026-03-15T10:00:00Z"
    }
  ],
  "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}
```
