Agents

Publish an agent (Preview)

Preview · Available to selected organizations. Publishes the draft as the next immutable version.

POST
/v1/agents/{id}/publish

Publishes the draft as the next immutable version. Each conversation moves to it from its next agent reply; a reply already running finishes on the version it started on. The request names the revision it read; a stale revision returns 409. Publishing a draft identical to the newest version changes nothing and answers published false. An endpoint answers for one agent at a time: publishing a draft whose endpoint another agent answers on returns 409. In supervised mode each reply waits for a person to approve it.

x-api-key<token>

In: header

Path Parameters

id*string
Match^agt_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

revision*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/agents/string/publish" \  -H "Content-Type: application/json" \  -d '{    "revision": "string"  }'
{  "agent": {    "id": "string",    "name": "string",    "namespaceId": "string",    "revision": "string",    "draft": {      "instructions": "string",      "knowledge": "string",      "endpointIds": [        "string"      ],      "integrationIds": [        "string"      ],      "mode": "live",      "model": "standard",      "approvalPolicy": "toolActions",      "workingHours": {        "timeZone": "string",        "ranges": [          {            "day": "monday",            "opens": "string",            "closes": "string"          }        ]      },      "takeoverTimeoutMinutes": 1    },    "publishedVersion": -9007199254740991,    "publishedAt": "string",    "createdAt": "string",    "updatedAt": "string"  },  "version": {    "agentId": "string",    "version": -9007199254740991,    "definition": {      "instructions": "string",      "knowledge": "string",      "endpointIds": [        "string"      ],      "integrationIds": [        "string"      ],      "mode": "live",      "model": "standard",      "approvalPolicy": "toolActions",      "workingHours": {        "timeZone": "string",        "ranges": [          {            "day": "monday",            "opens": "string",            "closes": "string"          }        ]      },      "takeoverTimeoutMinutes": 1    },    "publishedAt": "string"  },  "published": true}

Related documentation