Skip to main content
POST
http://localhost:3000
/
api-keys
/
{id}
/
revoke
curl -X POST 'https://api.example.com/api-keys/apk_001/revoke' \
  -H 'Authorization: Bearer YOUR_TOKEN'
{
  "id": "apk_001",
  "name": "CI Pipeline",
  "status": "revoked",
  "revokedAt": "2024-01-16T10:30:00Z",
  "revokedBySubjectId": "subject_jane"
}

Path Parameters

id
string
required
The API key ID to revoke

Response

Returns the revoked API key object with status set to revoked.
Revoking an API key is immediate and permanent. Any requests using this key will be rejected.
curl -X POST 'https://api.example.com/api-keys/apk_001/revoke' \
  -H 'Authorization: Bearer YOUR_TOKEN'
{
  "id": "apk_001",
  "name": "CI Pipeline",
  "status": "revoked",
  "revokedAt": "2024-01-16T10:30:00Z",
  "revokedBySubjectId": "subject_jane"
}