POST /v1/sessions
POST
/v1/sessionsAuthorization
AuthorizationBearer token · headerrequiredHeader parameters
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
Kikuvi-Workspacestring<uuid>Workspace to create in. Required for a user caller; implied by the key for an API key caller.
Request body
requiredapplication/jsonagent_idstring<uuid>requireddisplay_namestringHuman label for the session. Omitted reads as empty.
max length 200
vault_idsstring<uuid>[]Vaults this session may draw tool-source credentials from; each must
be a live vault in the session's workspace.
max items 10
Responses
200Replayed receipt. The token secret is never replayed. If the first response was lost, mint a replacement with a new key. The original token remains valid until expiry.
agent_idstring<uuid>requiredagent_version_idstring<uuid>requiredcreated_atstring<date-time>requireddisplay_namestringrequiredidstring<uuid>requiredsession_token_expires_atstring<date-time>requiredsession_token_idstring<uuid>requiredstatusSessionStatusBodyrequiredAllowed:
idleactiveworkspace_idstring<uuid>required201Created. The session token is shown once.
agent_idstring<uuid>requiredagent_version_idstring<uuid>requiredcreated_atstring<date-time>requireddisplay_namestringrequiredidstring<uuid>requiredsession_tokenstringrequiredShown once. Store it now; it cannot be retrieved again.
session_token_expires_atstring<date-time>requiredstatusSessionStatusBodyrequiredAllowed:
idleactiveworkspace_idstring<uuid>required400Malformed body, a display_name over 200 characters, more than 10 vault_ids, an agent with no live version, a vault outside the workspace, a malformed workspace header, or a user caller with 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_requestsinternalmessagestringrequired403Caller lacks session.create, or an API key's Kikuvi-Workspace header names another workspace.
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, agent, or vault -- 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 was already used for a different request. The same vault named twice.
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