POST /api/v1/{context_id}/keys
Changed onMint a new data-plane API key bound to the caller's own principal. The optional grants body only attenuates (never widens) the caller's effective grants. Gated by the Context's allow_self_service_keys flag; rejects legacy / delegated callers.
Request
- The document declares no server URL.
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
context_idstring required
Spectron context id
Query parameters
ttlSecondsinteger nullable
Seconds until the minted/rotated key expires. Omitted on create = "never expires" (subject to the Context's max_token_ttl_seconds cap). Omitted on rotate = inherit the key's current expiry.
Request body
Response
Plaintext key returned once
Changes
- info
added the non-success response with the status
- info
- info
endpoint added
- info