v1

latestOpenAPI 3.1.12026-07-124448163.2 KB
users

Invite a user

Invites a new client user and returns the created record.

post/users

Headers

x-client-idstring cuid required

The ID of the client

Example:cmf41ajzv003706un4i99q19z

Request body

emailstring email required

Email address that should receive the invitation.

role'admin' | 'user' required

Role to assign to the invited user. Can be 'admin', 'user'.

workspaceIdsstring[]

Optional list of workspace IDs the user should join immediately.

Example request

{
  "email": "frida@example.com",
  "role": "admin",
  "workspaceIds": [
    "cmf41ajzv003706un4i99q19z"
  ]
}

Response

User invited

idstring cuid required

Identifier of the client user.

createdAtstring date-time required

The date and time when the client user record was created. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).

emailstring email required

Email address of the client user.

firstNamestring nullable required

First name of the client user, if provided.

lastNamestring nullable required

Last name of the client user, if provided.

rolesstring[] required

List of role names assigned to the user.

Example response

{
  "id": "cmf41ajzv003706un4i99q1a0",
  "createdAt": "2024-05-14T08:30:00Z",
  "email": "frida@example.com",
  "firstName": "Frida",
  "lastName": "Meyer",
  "roles": [
    "client_admin"
  ]
}