v1
protected
api-keys

Create a new API key. The raw token value is returned once — store it securely.

post/v1/workspaces/{workspace}/api-keys/

Request

Path parameters

workspacestring required

Slug of the workspace the request acts in

Request body

agent_idstring uuid nullable

Bind the key to one agent of this workspace: it then reaches only that agent over A2A, nothing else. The key to hand to a caller outside the workspace.

expires_in_daysinteger nullable

Optional expiry in days (omit for non-expiring)

namestring required

Human-friendly label for this API key

Response

Successful Response

access_countinteger required
agent_idstring uuid nullable

The one agent the key reaches over A2A; None for a workspace key

created_atstring date-time required
expires_atstring date-time nullable required
idstring uuid required
is_activeboolean required
last_accessed_atstring date-time nullable required
namestring required
tokenstring required

Raw token value — copy it now, it won't be shown again

token_prefixstring required

Changes

    • breaking

      the request property's minLength was increased from 0 to 1

    • warning

      the request property's maxLength was set to 255

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status