Web chat · Publish the agent to a website
Publishes the agent as a website bot and returns it, including the
widget_key and the embed_snippet to paste. The bot is created answering,
and a draft agent is taken live along with it.
Safe to repeat: publishing an agent that already has a bot returns that same
bot, with the same widget_key, and changes nothing. The key goes into the
customer’s page source, so it is never rotated here.
This publishes; it does not configure. A body is optional and applies only on
the first call — on a bot that already exists, settings are left alone. Send
configuration as a PATCH to this same path rather than relying on this body.
Until an origin is allowed the widget answers any site that embeds the key,
so set allowed_origins as part of publishing rather than afterwards.
Authentication
Header authentication of the form Api-Key <token>
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
Agent UUID or slug — both are accepted. From agents_listAgents.
Request
Sites permitted to embed the widget, as origins (https://shop.example). Empty allows any site that has the key.
Response
Already published; the existing bot, unchanged.
