Skip to main content
Changes a member’s role and/or per-member usage cap. Only the fields you send change; null is rejected. The owner role cannot be assigned here, and the owner’s own role and your own role cannot be changed — use Transfer Ownership to hand the team to another member. You can only change members ranked below you: an admin cannot change another admin, and nobody but the owner can change an admin (403 MEMBER_NOT_BELOW_CALLER) — the role and the usage cap alike. An admin-level role (GET /roles, admin_grant_only) can be granted only by the owner (403 ROLE_REQUIRES_OWNER) and never to a virtual member (400 ROLE_NOT_FOR_VIRTUAL_MEMBER). The same rules apply in the console.
Permission required: depends on what you send:
  • When you send role: member:change_role
  • When you send max_tokens: member:set_quota
  • When the role assigned is admin-level: tenant_admin, or a custom role holding any admin-only team action: team owner only
  • When the member is not ranked below you: the owner, an admin, or a holder of an admin-level custom role (403 MEMBER_NOT_BELOW_CALLER) — role and max_tokens alike: team owner only

Path Parameters

string
required
Identifier of the member (principal_id)

Headers

string
Optional. Retrying with the same value replays the first result.

Request Body

integer
Per-member usage cap in tokens, at most 1374389534. 0 removes the cap.
string
New role: tenant_admin, tenant_member, or a custom role key of this team. The owner role cannot be assigned here.

Response

Errors

Errors answer with success: false, a message and an error_code. See Error Codes for every code.