Skip to navigation

Create an agent

View as Markdown

Creates an agent together with its version-1 draft. Authorization: organization administrators only — other callers are rejected with 403. Body: name (required, 1-200 chars); optional role, avatar, visibility (org | private), handle (lowercase/digits/hyphens; derived from the name and de-duplicated — a second “Mike” becomes mike-2 — when omitted) and a full draft version config. 409 handle_taken if an explicit handle is already used. Response 201: { data: { agent, draft, published } }.

Authentication

AuthorizationBearer

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

Request

This endpoint expects an object.
namestringRequired1-200 characters
rolestringOptional<=200 characters
handlestringOptionalformat: "^[a-z0-9][a-z0-9-]{0,30}[a-z0-9]$"2-32 characters

Lowercase, digits and hyphens. Derived from name when omitted.

avatarobjectOptional
visibilityenumOptional
Allowed values:
draftobjectOptional

Response

The created agent and its draft.
dataobject

Errors

409
Conflict Error