List API keys
Retrieve all API keys with their owner and usage metadata.
GET
/api/admin/api-keys
🔒 API key · admin roleReturns every API key with owner and usage metadata. The full secret is never returned after creation — only the start prefix is shown for display.
Example request
curl https://app.talent-ray.com/api/admin/api-keys \
-H "Authorization: Bearer tr_YOUR_ADMIN_KEY"
Response
200 OK
{
"success": true,
"data": [
{
"id": "apikey_xyz789",
"name": "Karaca SAP nightly sync",
"prefix": "tr_",
"start": "tr_aaaa",
"enabled": true,
"createdAt": "2026-06-04T10:00:00Z",
"updatedAt": "2026-06-04T10:00:00Z",
"lastRequest": "2026-06-04T15:30:45Z",
"expiresAt": "2026-09-03T12:00:00Z",
"requestCount": 1250,
"owner": {
"id": "user_abc123",
"email": "[email protected]",
"name": "Admin User",
"platformRole": "admin",
"orgRole": null,
"organizationId": null
}
}
]
}
| Field | Type | Description |
|---|---|---|
id | string | Key ID. |
name | string | null | Label set at creation. |
start | string | First characters of the key, for display. |
enabled | boolean | Whether the key is active. |
lastRequest | string | null | ISO 8601 timestamp of last use. |
expiresAt | string | null | ISO 8601 expiry. |
requestCount | integer | Lifetime request count. |
owner | object | The user the key acts as. |
Status codes
| Status | Meaning |
|---|---|
200 | Success. |
401 | No valid API key. |
403 | Caller is not an admin. |
429 | Rate limited. |