Get an agent's website widget and embed code
get_widgetGet an agent's website widget and embed code
The agent's website chat widget as visitors see it, with the code to paste into a site.
Every agent has one widget, the same one the dashboard shows; if the agent has none yet,
this call sets it up with the defaults, switched on. embed_code.default adds Mojeeb's
floating chat button (the simple install); embed_code.headless adds no button, and your
page opens the chat with MojeebWidget.open() or MojeebWidget.attach(selector) (the
custom install). Paste one of them once per page, before the closing body tag, exactly
as returned. Changing the widget stays in the dashboard.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | The agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`. |