Admiral

Api keys

Revoke an API key

POST
/v1/api-keys/{api_key_id}/revoke

Scope: apikey:write

Authorization

bearerAuth
AuthorizationBearer <token>

An API key, or an access token minted from one. Pass it in the Authorization header: Bearer admp_...

In: header

Path Parameters

api_key_id*api_key_id

The unique identifier of the key to revoke.

Match^key-[0-9a-z]+$

Response Body

application/json

curl -X POST "https://example.com/v1/api-keys/string/revoke"
{  "api_key": {    "id": "string",    "name": "string",    "scopes": [      "string"    ],    "status": "API_KEY_STATUS_UNSPECIFIED",    "expires_at": "2023-01-15T01:30:15.01Z",    "last_used_at": "2023-01-15T01:30:15.01Z",    "revoked_at": "2023-01-15T01:30:15.01Z",    "created_by": {      "id": "string",      "display_name": "string",      "email": "string"    },    "created_at": "2023-01-15T01:30:15.01Z"  }}