Create Api Key

Create a new API key. The full key is returned only once. > **Real-money operation.** This call moves real funds (or mints a real-money credential) when authenticated with a `drzl_live_` key. In the interactive API Explorer, use a `drzl_test_` **paper** key against **staging** — a live-money endpoint called with a test key is rejected with `403 TEST_KEY_LIVE_ENDPOINT`. Never paste a `drzl_live_` key into a browser.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

X-API-Keystring or nullOptional

Request

This endpoint expects an object.
namestringRequired1-100 characters
A label for this API key
acknowledge_write_scopesbooleanOptionalDefaults to false
Required when requesting any write or admin scope.
environmentenumOptionalDefaults to live

DX-34: the key class. ‘live’ (default) reaches the real-money API; ‘test’ mints a paper-only sandbox key (prefix drzl_test_) that is routed onto the paper-trading engine and rejected on every real-money endpoint. Test keys require the sandbox to be enabled.

expires_in_daysinteger or nullOptional1-365

Key expires after this many days. Null = never expires.

scopeslist of strings or nullOptional

Permission scopes. Defaults to read-only scopes.

signing_requiredbooleanOptionalDefaults to false

FP-107: require HMAC request signing for this key. When true, a signing secret is returned once at creation and every request must carry a valid X-Drazill-Signature.

Response

Successful Response
created_atdatetime
idstringformat: "uuid"
is_activeboolean
keystring

The full API key. Store it securely — it cannot be retrieved again.

key_prefixstring
namestring
rate_limit_tierstring
scopeslist of strings
environmentstringDefaults to live
expires_atdatetime or null
last_used_atdatetime or null
requested_tierstring or null
signing_secretstring or null

HMAC signing secret (only when signing_required). Store it securely.

tier_requested_atdatetime or null
warningslist of strings

Errors

401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error