Users

Create

Creates a user.

POST /users
const response = await client.users.create(
  { external_id: 'user_ext_123', role: 'admin' }
);
Parameters
NameDescription
external_idstring, required

User-provided unique ID.

rolestring, required

Name of the role to assign. Must match an existing role.

tagsobject[]

Tags for the user. Set at creation; mutation is not yet supported.

Response
NameDescription
dataobject

User object.

{
  "data": {
    "id": "user_abc123",
    "external_id": "user_ext_123",
    "role": "admin",
    "tags": [
      {
        "key": "department",
        "value": "engineering"
      }
    ]
  }
}

List

Lists all users.

GET /users
const response = await client.users.list();
Response
NameDescription
dataobject[]

List of users.

{
  "data": [
    {
      "id": "user_abc123",
      "external_id": "user_ext_123",
      "role": "admin",
      "tags": [
        {
          "key": "department",
          "value": "engineering"
        }
      ]
    }
  ]
}