Create an API key

Creates a new API key. Requires an active browser session (cookie auth). Returns the raw key — store it securely, it cannot be retrieved again.

Authentication

AuthorizationBearer

Send as Authorization: Bearer <your-key>. Obtain keys from the portal — prefix sk_live_ for production, sk_test_ for sandbox.

Request

This endpoint expects an object.
namestringRequired>=1 character

Human-readable name for the key

environmentenumRequired
Allowed values:

Response

API key created
keyobject

Errors

401
Unauthorized Error
422
Unprocessable Entity Error