iAdvizeDocs

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.

POST
/api/v1/sites/{siteId}/agents/{id}/go-live

Authorization

ApiKeyAuth
AuthorizationBearer <token>

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

siteId*string

The site id (prefixed site_). A site id that isn't yours is a 404, same as any other cross-tenant id.

id*string

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"  }}