SPB Git

Repository Public

update.md 1.8 KB 112 lines markdown

1---2title: Update User3url: https://platform.claude.com/docs/en/api/beta/organization/users/update4---56# Update User78**POST** `/v1/organizations/users/{user_id}`910Update a member's organization role.1112## Path parameters1314- `user_id: string`1516  ID of the User.1718## Body parameters1920- `role: "billing" or "claude_code_user" or "developer" or 2 more`2122  New role for the User.2324  The accepted values depend on the organization type. Console and API organizations accept `user`, `developer`, `billing`, and `claude_code_user`; `admin` cannot be assigned through the API. Claude Enterprise organizations accept `user` and `managed`.2526  - `"billing"`2728  - `"claude_code_user"`2930  - `"developer"`3132  - `"managed"`3334  - `"user"`3536## Returns3738- `BetaOrganizationUser object`3940  - `type: "user"`4142    Object type.4344    For Users, this is always `"user"`.4546    default: user4748  - `id: string`4950    ID of the User.5152  - `added_at: string`5354    RFC 3339 datetime string indicating when the User joined the Organization.5556    format: date-time5758  - `email: string`5960    Email of the User.6162  - `name: string`6364    Name of the User.6566  - `role: BetaOrganizationRole`6768    Organization role of the User.6970    - `"admin"`7172    - `"billing"`7374    - `"claude_code_user"`7576    - `"developer"`7778    - `"managed"`7980    - `"membership_admin"`8182    - `"owner"`8384    - `"primary_owner"`8586    - `"user"`8788## Example8990```bash91curl https://api.anthropic.com/v1/organizations/users/$USER_ID \92    -H 'Content-Type: application/json' \93    -H 'anthropic-version: 2023-06-01' \94    -H "X-Api-Key: $ANTHROPIC_API_KEY" \95    -d '{96          "role": "user"97        }'98```99100### Response (200)101102```json103{104  "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",105  "added_at": "2024-10-30T23:58:27.427722Z",106  "email": "user@emaildomain.com",107  "name": "Jane Doe",108  "role": "admin",109  "type": "user"110}111```112
Files main
Menu

Theme