Skip to main content
POST
/
api-keys
Create API key
curl --request POST \
  --url https://ascii.dev/api/box/v1/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
{
  "ok": true,
  "type": "api_key.created",
  "apiKey": {
    "id": "sak_123",
    "name": "Production worker",
    "keyPrefix": "box_live",
    "keyLastFour": "9abc",
    "createdAt": "2026-05-31T12:00:00Z",
    "lastUsedAt": null
  },
  "secret": "box_live_...9abc",
  "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.

Body

application/json
name
string

Optional human-readable key name. The backend sanitizes blank names to a default.

Maximum string length: 80

Response

API key created.

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.