This endpoint allows white label admins to generate an API token for any of their platform users without needing the user’s password. Use this to programmatically access user data for building dashboards, email sequences, or automated workflows.
This endpoint requires authentication as a white label admin . Only users belonging to your platform can have tokens generated.
Request Body
The platform user’s ID. Required if email is not provided.
The platform user’s email address. Required if user_id is not provided.
Optional name/label for the API token (e.g., “kpi-dashboard”, “email-automation”). Defaults to “api-token”.
Response
The user’s information The user’s unique identifier
The API token for the platform user
The name/label of the token
200 Response
404 User Not Found
403 Not White Label Admin
422 Validation Error
{
"message" : "Token created successfully." ,
"user" : {
"id" : 123 ,
"name" : "John Doe" ,
"email" : "john@example.com"
},
"token" : "2|abc123xyz789..." ,
"token_name" : "api-token"
}
Example Request
curl -X POST https://app.autocalls.ai/api/white-label/token \
-H "Authorization: Bearer YOUR_ADMIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_id": 123
}'
Or by email:
curl -X POST https://app.autocalls.ai/api/white-label/token \
-H "Authorization: Bearer YOUR_ADMIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "platformuser@example.com",
"token_name": "kpi-dashboard"
}'
Using the User Token
The returned token belongs to the platform user and can be used for their authenticated requests:
curl -X GET https://app.autocalls.ai/api/user/calls?date_from=2026-03-01 & per_page = 100 \
-H "Authorization: Bearer 2|abc123xyz789..."
Building a KPI Dashboard
To build a dashboard with all your users’ data:
List your users — GET /api/white-label/users with your admin key
Generate a token for each user — POST /api/white-label/token with their user_id
Fetch each user’s data using their token:
GET /api/user/calls — call history with duration, status, cost
GET /api/user/campaigns — campaign statuses
GET /api/user/leads — leads with statuses
GET /api/user/me — profile and balance info
Tokens never expire, so you only need to generate them once per user. Store the tokens and reuse them for subsequent API calls.