Users
api/admin/users
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/admin/users Changed · +40 / -33 lines
### Path parameters #### Response (200) ### Query parameters #### Response (200) ### Path parameters ### Body parameters #### Response (200) ### Path parameters #### Response (200) ## Domain types ### Path Parameters #### Response ### Query Parameters #### Response ### Path Parameters ### Body Parameters #### Response ### Path Parameters #### Response ## Domain Types
---- -title: Users -url: https://platform.claude.com/docs/en/api/admin/users ---- - # Users ## Get User -**get** `/v1/organizations/users/{user_id}` +**GET** `/v1/organizations/users/{user_id}` For Claude Enterprise organizations, this endpoint's availability is in beta. -### Path Parameters +### Path parameters - `user_id: string`
### Returns -- `User object { id, added_at, email, 3 more }` +- `User object` - `id: string`
RFC 3339 datetime string indicating when the User joined the Organization. + format: date-time + - `email: string` Email of the User.
For Users, this is always `"user"`. - - `"user"` + default: user ### Example -```http +```bash curl https://api.anthropic.com/v1/organizations/users/$USER_ID \ -H 'anthropic-version: 2023-06-01' \ -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" ``` -#### Response +#### Response (200) ```json {
## List Users -**get** `/v1/organizations/users` +**GET** `/v1/organizations/users` For Claude Enterprise organizations, this endpoint's availability is in beta. -### Query Parameters +### Query parameters - `after_id: optional string`
Filter by user email. + format: email + - `limit: optional number` Number of items to return per page.
Defaults to `20`. Ranges from `1` to `1000`. + default: 20, maximum: 1000, minimum: 1 + - `roles: optional array of string` Filter to items whose `role` equals one of the supplied values. Repeatable; values are OR'ed together.
RFC 3339 datetime string indicating when the User joined the Organization. + format: date-time + - `email: string` Email of the User.
For Users, this is always `"user"`. - - `"user"` + default: user - `first_id: string or null`
### Example -```http +```bash curl https://api.anthropic.com/v1/organizations/users \ -H 'anthropic-version: 2023-06-01' \ -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" ``` -#### Response +#### Response (200) ```json {
## Update User -**post** `/v1/organizations/users/{user_id}` +**POST** `/v1/organizations/users/{user_id}` For Claude Enterprise organizations, this endpoint's availability is in beta. -### Path Parameters +### Path parameters - `user_id: string` ID of the User. -### Body Parameters +### Body parameters - `role: "billing" or "claude_code_user" or "developer" or 2 more`
### Returns -- `User object { id, added_at, email, 3 more }` +- `User object` - `id: string`
RFC 3339 datetime string indicating when the User joined the Organization. + format: date-time + - `email: string` Email of the User.
For Users, this is always `"user"`. - - `"user"` + default: user ### Example -```http +```bash curl https://api.anthropic.com/v1/organizations/users/$USER_ID \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \
}' ``` -#### Response +#### Response (200) ```json {
## Remove User -**delete** `/v1/organizations/users/{user_id}` +**DELETE** `/v1/organizations/users/{user_id}` For Claude Enterprise organizations, this endpoint's availability is in beta. -### Path Parameters +### Path parameters - `user_id: string`
For Users, this is always `"user_deleted"`. - - `"user_deleted"` + default: user_deleted ### Example -```http +```bash curl https://api.anthropic.com/v1/organizations/users/$USER_ID \ -X DELETE \ -H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" ``` -#### Response +#### Response (200) ```json {
} ``` -## Domain Types +## Domain types ### User -- `User object { id, added_at, email, 3 more }` +- `User object` - `id: string`
RFC 3339 datetime string indicating when the User joined the Organization. + format: date-time + - `email: string` Email of the User.
For Users, this is always `"user"`. - - `"user"` + default: user ### User Delete Response -- `UserDeleteResponse object { id, type }` +- `UserDeleteResponse object` - `id: string`
For Users, this is always `"user_deleted"`. - - `"user_deleted"` + default: user_deleted