Put a version live
Puts one of the agent's versions live: shoppers on the site are served it from now on, and the agent becomes the one that answers on its site. When another agent of the site answered, it stops answering in the same call, and its version stays in its history. The version going live can no longer be changed (save a new version to change it). Putting the version that is already live live again changes nothing. Refused with `version_not_ready` when a condition to go live is unmet, and with `agent_live_changed` when another go-live of the same agent ran at the same time.
Authorization
ApiKeyAuth A WorkOS org-scoped API key, created from the dashboard's organization settings page. Identifies the tenant every read and write is scoped to. Missing, malformed, unknown, revoked, expired, or non-organization-owned keys all return 401 (no distinction, so the response can't be used to probe which keys or org ids exist).
In: header
Path Parameters
The site id (prefixed site_). A site id that isn't yours is a 404, same as any other cross-tenant id.
The agent id (prefixed agt_).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/api/v1/sites/string/agents/string/go-live" \ -H "Content-Type: application/json" \ -d '{ "versionId": "agtv_01kvnwmagvf27rc9cze5rm9e1r" }'{ "data": { "agentId": "string", "siteId": "string", "status": "live", "versionId": "string", "replacedAgentId": "string" }}Delete an agent
Soft-deletes the agent: it disappears from every read, but its versions and conversations are preserved. Returns the id and a deleted flag.
Take the answering agent offline
Stops the agent that answers on its site: afterwards no agent answers there, so the web tag shows no widget and the hosted page serves nothing, until a version goes live. No version changes: the version that was live is kept and reads `offline`, and going live with it (`go-live`) brings the agent back. Refused with `agent_not_answering` when the agent does not answer.