Skip to main content
POST
Create Key
Requires an admin key. On Honcho Cloud (api.honcho.dev) the returned key is a real cloud key on the calling key’s instance, attributed to its owner and revocable from the API Keys page. On a self-hosted instance it returns an error when AUTH_USE_AUTH is disabled.Provide at least one of workspace_id, peer_id, or session_id — a request carrying none of them is rejected. A key scoped to a peer or a session must also carry its workspace_id. On Honcho Cloud, pass either admin=true or a workspace_id.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

workspace_id
string | null

ID of the workspace to scope the key to

peer_id
string | null

ID of the peer to scope the key to

session_id
string | null

ID of the session to scope the key to

expires_at
string<date-time> | null

Response

Successful Response