SPB Git

Repository Public

list.md 2.6 KB 133 lines markdown

1---2title: List Users3url: https://platform.claude.com/docs/en/api/beta/organization/users/list4---56# List Users78**GET** `/v1/organizations/users`910List the organization's members.1112## Query parameters1314- `after_id: optional string`1516  ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.1718- `before_id: optional string`1920  ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.2122- `email: optional string`2324  Filter by user email.2526  format: email2728- `limit: optional number`2930  Number of items to return per page.3132  Defaults to `20`. Ranges from `1` to `1000`.3334  default: 20, maximum: 1000, minimum: 13536- `roles: optional array of string`3738  Filter to items whose `role` equals one of the supplied values. Repeatable; values are OR'ed together.3940  Accepted values depend on the organization type: Console and API organizations accept `user`, `developer`, `billing`, `admin`, and `claude_code_user`; Claude Enterprise organizations accept `user`, `owner`, `primary_owner`, `membership_admin`, and `managed`.4142## Returns4344- `data: array of BetaOrganizationUser`4546  - `type: "user"`4748    Object type.4950    For Users, this is always `"user"`.5152    default: user5354  - `id: string`5556    ID of the User.5758  - `added_at: string`5960    RFC 3339 datetime string indicating when the User joined the Organization.6162    format: date-time6364  - `email: string`6566    Email of the User.6768  - `name: string`6970    Name of the User.7172  - `role: BetaOrganizationRole`7374    Organization role of the User.7576    - `"admin"`7778    - `"billing"`7980    - `"claude_code_user"`8182    - `"developer"`8384    - `"managed"`8586    - `"membership_admin"`8788    - `"owner"`8990    - `"primary_owner"`9192    - `"user"`9394- `first_id: string or null`9596  First ID in the `data` list. Can be used as the `before_id` for the previous page.9798- `has_more: boolean`99100  Indicates if there are more results in the requested page direction.101102- `last_id: string or null`103104  Last ID in the `data` list. Can be used as the `after_id` for the next page.105106## Example107108```bash109curl https://api.anthropic.com/v1/organizations/users \110    -H 'anthropic-version: 2023-06-01' \111    -H "X-Api-Key: $ANTHROPIC_API_KEY"112```113114### Response (200)115116```json117{118  "data": [119    {120      "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",121      "added_at": "2024-10-30T23:58:27.427722Z",122      "email": "user@emaildomain.com",123      "name": "Jane Doe",124      "role": "admin",125      "type": "user"126    }127  ],128  "first_id": "first_id",129  "has_more": true,130  "last_id": "last_id"131}132```133
Files main
Menu

Theme