Agents
Replace an agent draft (Preview)
Preview · Available to selected organizations. Replaces the whole draft and returns the agent with a new revision.
Replaces the whole draft and returns the agent with a new revision. The request names the revision it read; a stale revision returns 409. Published versions, and the conversations answered on them, do not change. An endpoint answers for one agent at a time: a draft that names an endpoint another agent answers on returns 409.
Authorization
apiKey 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
Length
1 <= lengthdefinition*
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/v1/agents/string/draft" \ -H "Content-Type: application/json" \ -d '{ "revision": "string", "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 } }'{ "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"}