Spaces
Add a user to a space
Add a single existing account user to a space with a specified role.
Payload Requirements
- user_id is required and must be a valid user identifier (base64).
- role is required and must be a role assignment object with a type discriminator:
- { "type": "PREDEFINED", "name": "ADMIN" } — one of the predefined roles: ADMIN, MEMBER, READ_ONLY, ANNOTATOR.
- { "type": "CUSTOM", "id": "<role_id>" } — a custom RBAC role, using its unique identifier.
- If the user is already a member, their role is updated to the specified value (upsert).
- The user must already be a member of the space's parent organization; auto-enrollment is not performed (400 if not a member).
Role constraints
- Users with an annotator account role can only be assigned the annotator predefined space role.
- Users with a non-annotator account role cannot be assigned the annotator predefined space role.
Authorization Requires space admin role when using a PREDEFINED role, or ROLE_BINDING_CREATE permission (RBAC) when using a CUSTOM role.
<Note>This endpoint is in beta, read more here.</Note>
post/v2/spaces/{space_id}/users
Path parameters
space_idstring required
A universally unique identifier (base64-encoded opaque string).
Example:RW50aXR5OjEyMzQ1
The unique space identifier (base64)
Request body
Example request
{
"user_id": "RW50aXR5OjEyMzQ1",
"role": {
"id": "RW50aXR5OjEyMzQ1"
}
}Response
User successfully added to the space
Example response
{
"id": "RW50aXR5OjEyMzQ1",
"user_id": "RW50aXR5OjEyMzQ1",
"space_id": "RW50aXR5OjEyMzQ1",
"role": {
"id": "RW50aXR5OjEyMzQ1"
}
}