API keys

Revoke an API key

POST
/api-keys/{api_key_id}/revoke

Revokes a key immediately. The key stays listed with status: revoked. Repeating the request returns the same result.

With OAuth, members can revoke their own keys; organization admins can revoke any key. Organization API keys can revoke any key in their organization. See conditional writes for ETag and If-Match.

AuthorizationBearer <token>

Organization API key from the console (ak_...), or an OAuth access token with user:org:read, the organization selected during consent, and the capability required by the operation.

In: header

Path Parameters

api_key_id*string

Identifier returned by the API key list.

Header Parameters

If-Match?string

ETag from a preceding response. The write applies only if the resource still has that version; otherwise it returns 412 precondition_failed without changes. Omit to write the current version. See https://typeship.dev/docs/typeship-api#conditional-writes.

Length1 <= length <= 1024

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api-keys/apikey_2nY8mR6pQ4vK9cH3/revoke"
{  "id": "apikey_2nY8mR6pQ4vK9cH3",  "object": "api_key",  "name": "Parcel deployment",  "last4": "c0de",  "status": "revoked",  "last_used_at": "2026-09-23T08:00:00Z",  "created_at": "2026-09-23T08:00:00Z",  "updated_at": "2026-09-23T08:00:00Z",  "request_id": "req_3k8m1v6q9p2d7h4c"}