Skip to main content
POST
https://api.onstacks.io
/
v1
/
api-keys
/
{apiKeyId}
/
revoke
Revoke API key
curl --request POST \
  --url https://api.onstacks.io/v1/api-keys/{apiKeyId}/revoke \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "api_key": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "key_prefix": "<string>",
      "scopes": [],
      "expires_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "created_by": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "email": "jsmith@example.com",
        "display_name": "<string>"
      },
      "last_used_at": "2023-11-07T05:31:56Z",
      "revoked_at": "2023-11-07T05:31:56Z"
    }
  },
  "error": null,
  "request_id": "<string>"
}

Authorizations

Authorization
string
header
required

Workspace API key. Send it as Authorization: Bearer <api_key>.

Path Parameters

apiKeyId
string<uuid>
required

Query Parameters

environment
enum<string>
default:sandbox

Environment scope for environment-partitioned resources. Defaults to sandbox when omitted.

Available options:
sandbox,
live

Response

Workspace API key revoked

data
object
required
error
null
required
request_id
string
required