Skip to content

Revoke an API key

POST
/v1/keys/{id}/revoke
curl --request POST \
--url https://api.overwatch.weareheavy.dev/v1/keys/example/revoke \
--header 'Authorization: Bearer <token>'

Revoke a key. Immediate and irreversible — any integration using it stops working at once. Session-only, owner/admin.

id
required
string

The API key’s id (from GET /v1/keys).

The key was revoked.

Media typeapplication/json
object
revoked
required
boolean
Example
{
"revoked": true
}

Missing or invalid credentials.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "invalid api key"
}

A dashboard session is required (API-key callers are rejected), or the session’s role does not allow this action.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "a dashboard session is required"
}

No key with that id exists in your organization.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "key not found"
}