Update a member's organization role.

post/v1/organizations/users/{user_id}?beta=true

Request

Path parameters

user_idstring required

ID of the User.

Headers

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

Request body

role'billing' | 'claude_code_user' | 'developer' | 'managed' | 'user' required

New role for the User.

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; changing a User's role to managed requires the write:rbac_groups scope in addition to write:members.

Example request

{
  "role": "user"
}

Response

Successful Response

added_atstring date-time required

RFC 3339 datetime string indicating when the User joined the Organization.

emailstring required

Email of the User.

idstring required

ID of the User.

namestring required

Name of the User.

role'admin' | 'billing' | 'claude_code_user' | 'developer' | 'managed' | 'membership_admin' | 'owner' | 'primary_owner' | 'user' required
type'user' required

Object type.

For Users, this is always "user".

Example response

{
  "added_at": "2024-10-30T23:58:27.427722Z",
  "email": "user@emaildomain.com",
  "id": "user_01WxYzAbCdEfGhJkMnPqRsTu",
  "name": "Jane Doe"
}

Changes

    • breaking

      the response's property type changed from no type to object for status

    • info

      added the optional property / to the response with the status

    • info

      removed discriminator from response property for the response status

    • info

      removed from the response property oneOf list for the response status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status