Admin Users API
Manage users and their API tokens. Requires Admin API key authentication.
GET
/admin/usersList Users
Get a list of all users in the system.
Dashboard Proxy: The dashboard calls
/api/admin/users which forwards to this endpoint.Authentication
Requires Admin API Key in X-Admin-API-Key header.
Query Parameters
skipskipinteger
Number of users to skip (pagination)
limitlimitinteger
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.
Dashboard Proxy: The dashboard calls
/api/admin/users/{id} which forwards to this endpoint.Authentication
Requires Admin API Key in X-Admin-API-Key header.
Path Parameters
ididstringRequired
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/usersCreate User
Create a new user in the system.
Dashboard Proxy: The dashboard calls
/api/admin/users which forwards to this endpoint.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}/tokensCreate API Token
Create a new API token for a user. The token value is only shown once at creation.
Dashboard Proxy: The dashboard calls
/api/admin/users/{id}/tokens which forwards to this endpoint.Authentication
Requires Admin API Key in X-Admin-API-Key header.
Path Parameters
ididstringRequired
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