Admin Users API

Manage users and their API tokens. Requires Admin API key authentication.

GET/admin/users

List Users

Get a list of all users in the system.

Authentication

Requires Admin API Key in X-Admin-API-Key header.

Query Parameters
skip
skipinteger

Number of users to skip (pagination)

limit
limitinteger

Maximum number of users to return

Code Examples
curl -X GET "https://api.cloud.vexa.ai/admin/users?skip=your_skip&limit=your_limit" \
  -H "X-Admin-API-Key: YOUR_ADMIN_API_KEY" \
  -H "Content-Type: application/json"
Response
[
  {
    "id": "user-123",
    "email": "user@example.com",
    "name": "John Doe",
    "max_concurrent_bots": 3,
    "created_at": "2024-01-01T12:00:00Z"
  }
]
GET/admin/users/{id}

Get User

Get detailed information about a specific user, including their API tokens.

Authentication

Requires Admin API Key in X-Admin-API-Key header.

Path Parameters
id
idstringRequired

The user ID

Code Examples
curl -X GET "https://api.cloud.vexa.ai/admin/users/{id}" \
  -H "X-Admin-API-Key: YOUR_ADMIN_API_KEY" \
  -H "Content-Type: application/json"
Response
{
  "id": "user-123",
  "email": "user@example.com",
  "name": "John Doe",
  "max_concurrent_bots": 3,
  "api_tokens": [
    {
      "id": "token-123",
      "token": "***",
      "user_id": "user-123",
      "created_at": "2024-01-01T12:00:00Z"
    }
  ],
  "created_at": "2024-01-01T12:00:00Z"
}
POST/admin/users

Create User

Create a new user in the system.

Authentication

Requires Admin API Key in X-Admin-API-Key header.

Request Body
{
  "email": "user@example.com",
  "name": "John Doe",
  "max_concurrent_bots": 3
}
Code Examples
curl -X POST "https://api.cloud.vexa.ai/admin/users" \
  -H "X-Admin-API-Key: YOUR_ADMIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "user@example.com",
  "name": "John Doe",
  "max_concurrent_bots": 3
}'
Response
{
  "id": "user-123",
  "email": "user@example.com",
  "name": "John Doe",
  "max_concurrent_bots": 3,
  "created_at": "2024-01-01T12:00:00Z"
}
POST/admin/users/{id}/tokens

Create API Token

Create a new API token for a user. The token value is only shown once at creation.

Authentication

Requires Admin API Key in X-Admin-API-Key header.

Path Parameters
id
idstringRequired

The user ID

Code Examples
curl -X POST "https://api.cloud.vexa.ai/admin/users/{id}/tokens" \
  -H "X-Admin-API-Key: YOUR_ADMIN_API_KEY" \
  -H "Content-Type: application/json"
Response
{
  "id": "token-123",
  "token": "vex_abc123def456...",
  "user_id": "user-123",
  "created_at": "2024-01-01T12:00:00Z"
}
Notes
  • ⚠️ IMPORTANT: Save the token immediately. It cannot be retrieved later.
  • Each user can have multiple API tokens
  • Tokens do not expire but can be revoked