curl --request POST \
--url https://call.aiployees.com/api/user/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"message": "API key created successfully.",
"api_key": {
"name": "Production API Key",
"token": "1|abc123xyz789abcdef...",
"created_at": "2025-01-08T10:30:00.000000Z"
}
}
Generate a new API key for the authenticated user
curl --request POST \
--url https://call.aiployees.com/api/user/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"message": "API key created successfully.",
"api_key": {
"name": "Production API Key",
"token": "1|abc123xyz789abcdef...",
"created_at": "2025-01-08T10:30:00.000000Z"
}
}
{
"message": "API key created successfully.",
"api_key": {
"name": "Production API Key",
"token": "1|abc123xyz789abcdef...",
"created_at": "2025-01-08T10:30:00.000000Z"
}
}
curl -X POST https://call.aiployees.com/api/user/api-keys \
-H "Authorization: Bearer YOUR_EXISTING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Production API Key"
}'