Update Workspace Member

Change a member's role in a workspace.

Change a member's role in a workspace. A member whose role there is inherited (a billing member, or anyone in the Default Workspace) is given the new role instead.

POST /v1/organizations/workspaces/:workspace_id/members/:user_id

Path parameters

workspace_idstringrequired

The workspace's ID.

user_idstringrequired

The user's ID.

Body

workspace_rolestringrequired

The [workspace role](/api-reference/admin/workspace-members#workspace- roles). workspace_billing can't be assigned; it is inherited from the organization billing role.

Allowed values:workspace_userworkspace_developerworkspace_admin

Any other field is rejected with 400.

Response

(object)Workspace memberoptional

The updated [workspace member object](/api-reference/admin/workspace- members#the-workspace-member-object).

Errors

StatusReason
400The role is invalid or workspace_billing, the user is an organization owner or admin, or the workspace is archived.
404The workspace doesn't exist, or the user has no role in it.