POST /v1/api-keys
POST
/v1/api-keysAuthorization
AuthorizationBearer token · headerrequiredHeader parameters
Kikuvi-Workspacestring<uuid>requiredWorkspace to mint the key in
Idempotency-KeystringRetry the same operation with this key to return its saved receipt. Scoped by the operation's authenticated caller or resource. A different input under the same key returns 409. Receipts are retained for at least 7 days after completion, then removed by an hourly sweep. After removal the key can execute again. Fresh-only secrets are never included in a replay.
min length 1 · max length 255
Request body
requiredapplication/jsonexpires_atstring<date-time> | nulllabelstringrequiredmax length 200
permissionsKeyPermissionSchema[]requiredOne of the workspace resource permissions.
Responses
200Replayed creation receipt. The secret cannot be recovered. If the first response was lost, revoke this key and mint a replacement with a new Idempotency-Key.
created_atstring<date-time>requiredexpires_atstring<date-time> | nullrequiredidstring<uuid>requiredlabelstringrequiredpermissionsKeyPermissionSchema[]requiredprefixstringrequired201Minted. The secret is shown once.
created_atstring<date-time>requiredexpires_atstring<date-time> | nullrequiredidstring<uuid>requiredlabelstringrequiredpermissionsKeyPermissionSchema[]requiredprefixstringrequiredsecretstringrequiredShown once. Store it now; it cannot be retrieved again.
400Malformed body, an unknown or ungrantable permission, an empty permission set, a non-future expires_at, a malformed workspace header, or no workspace header.
errorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired401Missing, malformed, or invalid bearer token.
errorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired404No such workspace, or the caller cannot see it.
errorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired409Idempotency-Key reused with a different operation or input.
errorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired