Revoke an API key
POST
/v1/keys/{id}/revoke
const url = 'https://api.overwatch.weareheavy.dev/v1/keys/example/revoke';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”id
required
string
The API key’s id (from GET /v1/keys).
Responses
Section titled “ Responses ”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"}