Skip to main content
POST
/
api-keys
/
{apiKeyId}
/
rotate
Rotate API key
curl --request POST \
  --url https://ascii.dev/api/box/v1/api-keys/{apiKeyId}/rotate \
  --header 'Authorization: Bearer <token>'
{
  "ok": true,
  "type": "api_key.rotated",
  "apiKey": {
    "id": "sak_123",
    "name": "Production worker",
    "keyPrefix": "box_live",
    "keyLastFour": "wxyz",
    "createdAt": "2026-05-31T12:00:00Z",
    "lastUsedAt": null
  },
  "secret": "box_live_...wxyz",
  "apiKeys": []
}

Authorizations

Authorization
string
header
required

Box API key in the form box_.... Create and rotate keys in the Box dashboard or through the v1 API key endpoints.

Path Parameters

apiKeyId
string
required

API key id returned by list/create API key responses. This is not the raw API key secret.

Response

API key rotated.

ok
boolean
required
Example:

true

type
string
required

Stable success envelope discriminator added by v1.

apiKeys
object[]
required
apiKey
object
secret
string

One-time raw API key secret. Store immediately; it is never returned again.