Audit trail for the current user's API keys: lifecycle events (created, revoked) and security failures (use of a revoked/expired key, suspended owner, wrong secret, rate limiting). Successful per-request use is not recorded here. Interactive-session only — cannot be called with an API key.
GET
/me/api-keys/audit
curl \
--request GET 'https://api.your-domain.com/api/me/api-keys/audit' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"code": 200,
"message": "api key audit retrieved successfully",
"data": {
"audit": [
{
"id": "string",
"api_key_id": "string",
"user_id": "string",
"organization_id": "string",
"event": "created",
"reason": "revoked",
"key_name": "string",
"key_mode": "string",
"ip": "string",
"method": "string",
"path": "string",
"created_at": "2026-05-04T09:42:00Z"
}
],
"pagination": {
"page": 1,
"page_size": 20,
"total_count": 156,
"total_pages": 8,
"has_next": true,
"has_prev": false,
"next_page": 2,
"prev_page": 42,
"sort_by": "name",
"sort_direction": "asc"
}
}
}
Response examples (401)
{
"code": 401,
"message": "invalid token",
"data": {}
}
Response examples (403)
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}
Response examples (500)
{
"code": 500,
"message": "internal server error",
"data": {}
}