List API Keys
Retrieve a list of API keys belonging to the authenticated user.
curl -X GET "https://api.example.com/api/v1/api_keys" \
-H "X-API-Key: your-api-key-here"
Response
Response status information
Array of API key objectsType of key: ‘private’ or ‘public’
Descriptive name for the key
The actual key (only returned on creation)
Array of allowed CORS origins
Array of assistant IDs the key can access
Whether the key supports transient assistants
ISO 8601 creation timestamp
ISO 8601 last update timestamp
{
"status": {
"code": 200,
"message": "Success"
},
"data": [
{
"id": 1,
"key_type": "private",
"name": "Production API Key",
"key_value": null,
"allowed_origins": ["https://example.com"],
"allowed_assistants": ["123", "456"],
"transient_assistant": false,
"user_id": 1,
"user_email": "[email protected]",
"created_at": "2024-01-10T08:00:00Z",
"updated_at": "2024-01-10T08:00:00Z"
}
]
}
The key_value field is only returned when creating a new API key. It cannot be retrieved later for security reasons.
Error Responses
Unauthorized - Invalid or missing authentication