Skip to content
Raster
Esc
navigateopen⌘Jpreview

revoke an api key

DELETE/v1/api-keys/{api_key_id}
Authorization
AuthorizationBearer token · headerrequired
an organization api key. browser clients use the session cookie instead.
or
computer_sessionAPI key · cookierequired
first-party httponly browser session; never readable from javascript.
Path parameters
api_key_idstringrequired
matches ^key_[0-9a-z]{20,32}$
Responses
200OK
idstringrequired
api key identifier
matches ^key_[0-9a-z]{20,32}$
organization_idstringrequired
organization identifier
matches ^org_[0-9a-z]{20,32}$
namestringrequired
min length 1 · max length 255
prefixstringrequired
first characters of the secret, for display and matching
scopesApiKeyScope[]required
created_bystringrequired
user identifier
matches ^usr_[0-9a-z]{20,32}$
created_atstring<date-time>required
last_used_atstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
expires_atstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
revoked_atstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
400invalid request
errorobjectrequired
Show properties
codeErrorCoderequired
Allowed:invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailable
messagestringrequired
human-readable, not machine-parseable
request_idstringrequired
detailsFieldError[]
Show properties
Array of FieldError
fieldstringrequired
dotted path into the request body
messagestringrequired
quotaobject
Show properties
limitstringrequired
the entitlement that declined this request
currentintegerrequired
min 0 · max 9007199254740991
maximuminteger | anyrequired
Show properties
Any of:
integer
integer
any
any
plan_idstringrequired
upgrade_urlstring | anyrequired
Show properties
Any of:
string
string
any
any
401unauthenticated
errorobjectrequired
Show properties
codeErrorCoderequired
Allowed:invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailable
messagestringrequired
human-readable, not machine-parseable
request_idstringrequired
detailsFieldError[]
Show properties
Array of FieldError
fieldstringrequired
dotted path into the request body
messagestringrequired
quotaobject
Show properties
limitstringrequired
the entitlement that declined this request
currentintegerrequired
min 0 · max 9007199254740991
maximuminteger | anyrequired
Show properties
Any of:
integer
integer
any
any
plan_idstringrequired
upgrade_urlstring | anyrequired
Show properties
Any of:
string
string
any
any
402quota exceeded
errorobjectrequired
Show properties
codeErrorCoderequired
Allowed:invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailable
messagestringrequired
human-readable, not machine-parseable
request_idstringrequired
detailsFieldError[]
Show properties
Array of FieldError
fieldstringrequired
dotted path into the request body
messagestringrequired
quotaobject
Show properties
limitstringrequired
the entitlement that declined this request
currentintegerrequired
min 0 · max 9007199254740991
maximuminteger | anyrequired
Show properties
Any of:
integer
integer
any
any
plan_idstringrequired
upgrade_urlstring | anyrequired
Show properties
Any of:
string
string
any
any
403permission denied
errorobjectrequired
Show properties
codeErrorCoderequired
Allowed:invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailable
messagestringrequired
human-readable, not machine-parseable
request_idstringrequired
detailsFieldError[]
Show properties
Array of FieldError
fieldstringrequired
dotted path into the request body
messagestringrequired
quotaobject
Show properties
limitstringrequired
the entitlement that declined this request
currentintegerrequired
min 0 · max 9007199254740991
maximuminteger | anyrequired
Show properties
Any of:
integer
integer
any
any
plan_idstringrequired
upgrade_urlstring | anyrequired
Show properties
Any of:
string
string
any
any
404not found
errorobjectrequired
Show properties
codeErrorCoderequired
Allowed:invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailable
messagestringrequired
human-readable, not machine-parseable
request_idstringrequired
detailsFieldError[]
Show properties
Array of FieldError
fieldstringrequired
dotted path into the request body
messagestringrequired
quotaobject
Show properties
limitstringrequired
the entitlement that declined this request
currentintegerrequired
min 0 · max 9007199254740991
maximuminteger | anyrequired
Show properties
Any of:
integer
integer
any
any
plan_idstringrequired
upgrade_urlstring | anyrequired
Show properties
Any of:
string
string
any
any
409conflict with current state
errorobjectrequired
Show properties
codeErrorCoderequired
Allowed:invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailable
messagestringrequired
human-readable, not machine-parseable
request_idstringrequired
detailsFieldError[]
Show properties
Array of FieldError
fieldstringrequired
dotted path into the request body
messagestringrequired
quotaobject
Show properties
limitstringrequired
the entitlement that declined this request
currentintegerrequired
min 0 · max 9007199254740991
maximuminteger | anyrequired
Show properties
Any of:
integer
integer
any
any
plan_idstringrequired
upgrade_urlstring | anyrequired
Show properties
Any of:
string
string
any
any
412precondition failed
errorobjectrequired
Show properties
codeErrorCoderequired
Allowed:invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailable
messagestringrequired
human-readable, not machine-parseable
request_idstringrequired
detailsFieldError[]
Show properties
Array of FieldError
fieldstringrequired
dotted path into the request body
messagestringrequired
quotaobject
Show properties
limitstringrequired
the entitlement that declined this request
currentintegerrequired
min 0 · max 9007199254740991
maximuminteger | anyrequired
Show properties
Any of:
integer
integer
any
any
plan_idstringrequired
upgrade_urlstring | anyrequired
Show properties
Any of:
string
string
any
any
429rate limited
errorobjectrequired
Show properties
codeErrorCoderequired
Allowed:invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailable
messagestringrequired
human-readable, not machine-parseable
request_idstringrequired
detailsFieldError[]
Show properties
Array of FieldError
fieldstringrequired
dotted path into the request body
messagestringrequired
quotaobject
Show properties
limitstringrequired
the entitlement that declined this request
currentintegerrequired
min 0 · max 9007199254740991
maximuminteger | anyrequired
Show properties
Any of:
integer
integer
any
any
plan_idstringrequired
upgrade_urlstring | anyrequired
Show properties
Any of:
string
string
any
any
500internal error
errorobjectrequired
Show properties
codeErrorCoderequired
Allowed:invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailable
messagestringrequired
human-readable, not machine-parseable
request_idstringrequired
detailsFieldError[]
Show properties
Array of FieldError
fieldstringrequired
dotted path into the request body
messagestringrequired
quotaobject
Show properties
limitstringrequired
the entitlement that declined this request
currentintegerrequired
min 0 · max 9007199254740991
maximuminteger | anyrequired
Show properties
Any of:
integer
integer
any
any
plan_idstringrequired
upgrade_urlstring | anyrequired
Show properties
Any of:
string
string
any
any
501unsupported operation
errorobjectrequired
Show properties
codeErrorCoderequired
Allowed:invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailable
messagestringrequired
human-readable, not machine-parseable
request_idstringrequired
detailsFieldError[]
Show properties
Array of FieldError
fieldstringrequired
dotted path into the request body
messagestringrequired
quotaobject
Show properties
limitstringrequired
the entitlement that declined this request
currentintegerrequired
min 0 · max 9007199254740991
maximuminteger | anyrequired
Show properties
Any of:
integer
integer
any
any
plan_idstringrequired
upgrade_urlstring | anyrequired
Show properties
Any of:
string
string
any
any
503compute unavailable
errorobjectrequired
Show properties
codeErrorCoderequired
Allowed:invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailable
messagestringrequired
human-readable, not machine-parseable
request_idstringrequired
detailsFieldError[]
Show properties
Array of FieldError
fieldstringrequired
dotted path into the request body
messagestringrequired
quotaobject
Show properties
limitstringrequired
the entitlement that declined this request
currentintegerrequired
min 0 · max 9007199254740991
maximuminteger | anyrequired
Show properties
Any of:
integer
integer
any
any
plan_idstringrequired
upgrade_urlstring | anyrequired
Show properties
Any of:
string
string
any
any
Try it
Server
Authorization
Parameters
Request
curl -X DELETE "https://api.raster.sh/v1/v1/api-keys/key_01h8xk2q4v9m3n7p5r0t" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "id": "key_01h8xk2q4v9m3n7p5r0t",
  "organization_id": "org_01h8xk2q4v9m3n7p5r0t",
  "name": "string",
  "prefix": "ck_live_9f3a",
  "scopes": [
    "machines:read"
  ],
  "created_by": "usr_01h8xk2q4v9m3n7p5r0t",
  "created_at": "2026-08-19T12:00:00Z",
  "last_used_at": "2026-08-19T12:00:00Z",
  "expires_at": "2026-08-19T12:00:00Z",
  "revoked_at": "2026-08-19T12:00:00Z"
}