Add Workspace Member

Give an organization member a role in a workspace.

Give a member of your organization a role in a workspace.

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

Path parameters

workspace_idstringrequired

The workspace's ID.

Body

user_idstringrequired

The user's ID. They must be a member of your organization.

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 new [workspace member object](/api-reference/admin/workspace- members#the-workspace-member-object).

Errors

StatusReason
400A field is invalid, the role is workspace_billing, the user is an organization owner or admin (already workspace_admin), or the workspace is archived.
404The workspace, or the user in your organization, doesn't exist.
409The user already has a role in this workspace. Use update instead.