Docs Blog Sign in

Users

The Users API allows you to manage users in your Airclou organization. You can create, retrieve, update, and delete users, as well as manage their roles and permissions.

The user object

A user represents an individual with access to your Airclou organization.

Attributes

AttributeTypeDescription
idstringUnique identifier for the user
emailstringUser’s email address (unique)
namestringUser’s full name
avatar_urlstringURL to user’s profile picture
rolestringUser role: owner, admin, member, or viewer
statusstringAccount status: active, invited, or suspended
created_attimestampWhen the user was created
updated_attimestampWhen the user was last updated
last_login_attimestampWhen the user last logged in

Example object

{
  "id": "usr_1234567890",
  "email": "john.doe@example.com",
  "name": "John Doe",
  "avatar_url": "https://app.airclou.com/playbook/avatars/usr_1234567890",
  "role": "admin",
  "status": "active",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-11-01T14:20:00Z",
  "last_login_at": "2025-11-06T09:15:00Z"
}

List all users

Retrieve a paginated list of users in your organization.

Endpoint

GET /playbook/api/v1/users

Query parameters

ParameterTypeDescription
limitintegerNumber of users to return (1-100). Default: 50
cursorstringPagination cursor from previous response
rolestringFilter by role: owner, admin, member, or viewer
statusstringFilter by status: active, invited, or suspended
searchstringSearch by name or email

Example request

curl "https://app.airclou.com/playbook/api/v1/users?limit=25&role=admin" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

{
  "data": [
    {
      "id": "usr_1234567890",
      "email": "john.doe@example.com",
      "name": "John Doe",
      "role": "admin",
      "status": "active",
      "created_at": "2025-01-15T10:30:00Z"
    },
    {
      "id": "usr_0987654321",
      "email": "jane.smith@example.com",
      "name": "Jane Smith",
      "role": "admin",
      "status": "active",
      "created_at": "2025-02-20T15:45:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "eyJpZCI6InVzcl8wOTg3NjU0MzIxIn0",
    "has_more": true,
    "total_count": 156
  }
}

Retrieve a user

Get details about a specific user by ID.

Endpoint

GET /playbook/api/v1/users/{user_id}

Path parameters

ParameterTypeDescription
user_idstringThe ID of the user to retrieve

Example request

curl "https://app.airclou.com/playbook/api/v1/users/usr_1234567890" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

{
  "id": "usr_1234567890",
  "email": "john.doe@example.com",
  "name": "John Doe",
  "avatar_url": "https://app.airclou.com/playbook/avatars/usr_1234567890",
  "role": "admin",
  "status": "active",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-11-01T14:20:00Z",
  "last_login_at": "2025-11-06T09:15:00Z"
}

Create a user

Create a new user and send them an invitation email.

Endpoint

POST /playbook/api/v1/users

Request body

FieldTypeRequiredDescription
emailstringYesUser’s email address
namestringYesUser’s full name
rolestringNoUser role (default: member)
send_invitationbooleanNoSend invitation email (default: true)

Example request

curl -X POST "https://app.airclou.com/playbook/api/v1/users" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "new.user@example.com",
    "name": "New User",
    "role": "member",
    "send_invitation": true
  }'

Example response

{
  "id": "usr_9876543210",
  "email": "new.user@example.com",
  "name": "New User",
  "avatar_url": null,
  "role": "member",
  "status": "invited",
  "created_at": "2025-11-06T10:00:00Z",
  "updated_at": "2025-11-06T10:00:00Z",
  "last_login_at": null
}

Update a user

Update an existing user’s information.

Endpoint

PATCH /playbook/api/v1/users/{user_id}

Path parameters

ParameterTypeDescription
user_idstringThe ID of the user to update

Request body

FieldTypeDescription
namestringUser’s full name
rolestringUser role: owner, admin, member, or viewer
statusstringAccount status: active or suspended

Example request

curl -X PATCH "https://app.airclou.com/playbook/api/v1/users/usr_1234567890" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Smith",
    "role": "admin"
  }'

Example response

{
  "id": "usr_1234567890",
  "email": "john.doe@example.com",
  "name": "John Smith",
  "avatar_url": "https://app.airclou.com/playbook/avatars/usr_1234567890",
  "role": "admin",
  "status": "active",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-11-06T10:30:00Z",
  "last_login_at": "2025-11-06T09:15:00Z"
}

Delete a user

Permanently delete a user from your organization.

Endpoint

DELETE /playbook/api/v1/users/{user_id}

Path parameters

ParameterTypeDescription
user_idstringThe ID of the user to delete

Example request

curl -X DELETE "https://app.airclou.com/playbook/api/v1/users/usr_1234567890" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

204 No Content

Note: Deleting a user is permanent and cannot be undone. Consider suspending the user instead if you might need to restore access later.


Roles and permissions

Users can have one of four roles, each with different permission levels:

Owner

  • Full access to all resources
  • Can manage billing and subscriptions
  • Can delete the organization
  • Only one owner per organization

Admin

  • Can manage users and teams
  • Can create and delete projects
  • Can view billing information
  • Cannot delete the organization

Member

  • Can create and edit projects
  • Can invite other members
  • Cannot manage billing or users

Viewer

  • Read-only access to all resources
  • Cannot create or modify anything
  • Useful for clients or stakeholders

Error responses

Common errors when working with the Users API:

400 Bad Request

{
  "error": {
    "code": "validation_error",
    "message": "Invalid email address format",
    "field": "email"
  }
}

404 Not Found

{
  "error": {
    "code": "resource_not_found",
    "message": "User not found"
  }
}

409 Conflict

{
  "error": {
    "code": "resource_already_exists",
    "message": "A user with this email already exists"
  }
}