Spaces

Add a user to a space

Changed on

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

Request

  • Base URL
    https://api.arize.com
  • URL
    https://api.arize.com/v2/spaces/{space_id}/users
  • Auth
    HTTP bearer

Path parameters

space_idstring required

A universally unique identifier (base64-encoded opaque string).

Example:RW50aXR5OjEyMzQ1

The unique space identifier (base64)

Request body

user_idstring required

A universally unique identifier (base64-encoded opaque string).

Example request

{
  "user_id": "RW50aXR5OjEyMzQ1",
  "role": {
    "id": "RW50aXR5OjEyMzQ1"
  }
}

Response

User successfully added to the space

idstring required

A universally unique identifier (base64-encoded opaque string).

user_idstring required

A universally unique identifier (base64-encoded opaque string).

space_idstring required

A universally unique identifier (base64-encoded opaque string).

Example response

{
  "id": "RW50aXR5OjEyMzQ1",
  "user_id": "RW50aXR5OjEyMzQ1",
  "space_id": "RW50aXR5OjEyMzQ1",
  "role": {
    "id": "RW50aXR5OjEyMzQ1"
  }
}

Changes

    • breaking

      removed from the request property oneOf list

    • info

      mapped value for discriminator key CUSTOM changed from to for request property

    • info

      mapped value for discriminator key PREDEFINED changed from to for request property

    • info

      added to the request property oneOf list

    • info

      endpoint added