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.
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_).
Response Body
application/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/take-offline"{ "data": { "agentId": "string", "siteId": "string", "status": "live", "versionId": "string", "replacedAgentId": "string" }}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.
List an agent's experiments
Returns a summary of the A/B tests of the agent's versions, newest first, at most 50: the experiment's status, when it started and ended, why it ended, the two versions, the floor and the maximum. It carries no figure and no state: read one experiment with `GET /experiments/{experimentId}` for its figures, its verdict and its daily `series`.