Mint a virtual key. The secret is returned EXACTLY once. Honors an `Idempotency-Key` header (per-principal ~10min replay)

Changed on
post/api/v1/admin/keys

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header x-admin-token
    • HTTP bearer

Request body

allowed_poolsstring[] nullable

Pools this key may target. OMITTED = ALL pools; an explicit [] = NO pools.

expires_atinteger nullable

Token expiry as an absolute Unix-seconds timestamp. Mutually exclusive with expires_in.

expires_instring nullable

Token lifetime as a duration string (7d, 24h, 30m, 3600s) - the token's exp is now + expires_in. Mutually exclusive with expires_at. Absent (and no expires_at) => a sane long default (see DEFAULT_KEY_TTL_SECS).

groupstring nullable

The groups: bucket this key binds to (at most one). A key with NO group is authed + unlimited (access only). If the named group EXISTS, the key binds to it. If it does NOT exist, the mint 400s UNLESS parent is given, in which case it is AUTO-PROVISIONED as a leaf under parent (self-service; see parent).

issue_aws_credentialboolean

When true, ALSO issue an AWS-style access-key-id + secret access key (the MinIO/S3-compatible model) so a Bedrock-SDK client can authenticate via inbound SigV4. Both are returned ONCE.

labelsobject

Optional mint-time labels echoed onto this key's metric series; never interpreted by enforcement.

namestring required
parentstring nullable

AUTO-PROVISION target: the EXISTING parent group under which to create group as a leaf when group does not yet exist: the first-self-mint materialization of a user:<sub> personal budget bucket. The new leaf's limits come from the nearest-ancestor child_default template (inherit-only when none up the chain), created through the same validate-at-the-door path as POST /groups. If group ALREADY exists, parent must equal its actual parent (else 409); a mint never re-homes an existing group. Ignored when group is absent (a key with no group has nothing to provision).

Response

Created (body includes the once-shown secret)

allowed_poolsstring[] nullable required
aws_access_key_idstring nullable

AWS AccessKeyId (present only when issue_aws_credential was set). Not secret.

aws_secret_access_keystring nullable

AWS SigV4 secret access key, shown once (present only with an AWS credential).

created_atinteger required
enabledboolean required
expires_atinteger required

Unix-seconds expiry of the signed token.

groupstring nullable required
group_provisionedboolean required

Whether this mint AUTO-PROVISIONED its bound group leaf (self-service); lets a portal distinguish "bound to an existing bucket" from "created your personal bucket + bound".

idstring required
labelsobject required
namestring required
statestring required

Same field as KeyView.state; a fresh mint is always "active" (enabled, not revoked, not deleted).

tokenstring required

The busbar-SIGNED token: the key credential (1.5.0), shown EXACTLY once and never returned by any read. (This is the field a client must capture to authenticate.)

Changes

    • breaking

      added required request body

    • breaking

      the response property became nullable for the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • info

      api operation id PostKeys was added

    • info

      added the non-success response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status