Add a user to a space
Add a single existing account user to a space with a specified role.
Payload Requirements
user_idis required and must be a valid user identifier (base64).roleis required and must be a role assignment object with atypediscriminator:{ "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
annotatoraccount role can only be assigned theannotatorpredefined space role. - Users with a non-annotator account role cannot be assigned the
annotatorpredefined space role.
Authorization
Requires space admin role when using a PREDEFINED role, or ROLE_BINDING_CREATE
permission (RBAC) when using a CUSTOM role.
Authorizations
Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format
Path Parameters
The unique space identifier (base64) A universally unique identifier (base64-encoded opaque string).
"RW50aXR5OjEyMzQ1"
Body
Body containing the user to add to the space
The unique identifier of the user to add
"RW50aXR5OjEyMzQ1"
Strict request form of SpaceRoleAssignment. Used in write request bodies.
PREDEFINED:{ "type": "PREDEFINED", "name": "ADMIN" | "MEMBER" | "READ_ONLY" | "ANNOTATOR" }CUSTOM:{ "type": "CUSTOM", "id": "<encoded-role-id>" }
- Option 1
- Option 2
Response
User successfully added to the space
A space membership record.
Unique identifier for the membership record
"RW50aXR5OjEyMzQ1"
The unique identifier of the user
"RW50aXR5OjEyMzQ1"
The unique identifier of the space
"RW50aXR5OjEyMzQ1"
Specifies which role to assign within a space. Discriminated by type:
PREDEFINED: a built-in platform role —{ "type": "PREDEFINED", "name": "ADMIN" | "MEMBER" | "READ_ONLY" | "ANNOTATOR" }CUSTOM: a custom RBAC role identified by its ID —{ "type": "CUSTOM", "id": "<encoded-role-id>" }
Used wherever a space-level role assignment is required (memberships, service key bindings, etc.).
- Option 1
- Option 2