Create an API key

View as Markdown

Create an organization or subaccount API key. The secret is returned once in the response. To rotate a key, create its replacement first, cut traffic over, then revoke the old key — key prefixes identify which key made a request.

Authentication

AuthorizationBearer

Use Bearer <api-key>.

Request

This endpoint expects an object.
expiresAtdatetime or nullOptional
namestringOptional1-200 characters

Customer-facing resource name. 1–200 characters.

scopeslist of "*"Optional
subaccountIdstringOptional1-64 characters
Opaque identifier for a BCTRL subaccount.

Response

Created
dataobject
secretstring

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
429
Too Many Requests Error