Skip to main content
POST
Mint a scoped child key (sub-account); scopes ⊆ this key's
Self-serve sub-accounts: mint a child key with a label and a subset of your scopes. Returns 201; the raw api_key appears once, in this response only. A child key can never out-rank its parent: request a scope the parent lacks and the mint is refused. Omit scopes to inherit all of the parent’s.

Request example

Response example

Hand the raw key to the sub-account over a secure channel; you cannot retrieve it again.

Errors

  • 422 unprocessable, missing label or scopes not a subset of yours.
Terms used here: API key, child key, scope. Full list in the terminology annexure.

Next steps

Authorizations

X-ScripX-Key
string
header
required

Your API key, e.g. scripx_live_…. Bound to one firm; tenant isolation is enforced.

Body

application/json
label
string
required

human label for the sub-account

scopes
string[]

subset of the parent key's scopes; omit to inherit all

Response

OK

created
boolean
key
object

masked record + api_key (shown ONCE)