API referenceAPI Keys

Revoke the calling API key

Revokes the key that authenticates this request, flipping its status to revoked so its secret can no longer authenticate — the call to make when a script or CLI signs out.

Endpoint
DELETE https://api.dairo.app/v1/api-keys/current

Revokes the key that authenticates this request, flipping its status to revoked so its secret can no longer authenticate — the call to make when a script or CLI signs out. Any key may revoke itself whatever its scopes, so no keys:write is needed; revoking any other key is DELETE /v1/api-keys/{apiKeyId}. A successful revoke returns 204 No Content with an empty body, and the same secret is refused from then on.

Scope: __any__. Send the API key as a bearer token; Scopes lists what each one reaches.

Request

cURL
curl -X DELETE "https://api.dairo.app/v1/api-keys/current" \
  -H "Authorization: Bearer $DAIRO_API_KEY"

Response

204 Success, no body.

Errors

Every error has the same body, {"error": {"type", "code", "message", "param"}}; branch on code. Errors lists every code.

StatusMeaning
400The request is malformed or a value is invalid (invalid_request, invalid_domain, idempotency_key_mismatch).
401The API key is missing or invalid.
404No such resource in this account (resource_not_found).
429Rate limit, plan limit, budget or spend cap reached (rate_limited, plan_limit_reached, budget_exceeded, spend_cap_reached).
500An unexpected error; retry with backoff, then contact support (internal_error).

On this page