إنتقل إلى المحتوى الرئيسي

Get an agent's website widget and embed code

GET 

/v1/agents/:agentId/widget

x-scope: "connections:read"

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.

Request​

Responses​

The widget and its embed code.

Response Headers
    X-Correlation-ID

    Correlation id for this request — paste into support tickets.