Skip to content

Widget appearance

GET/widget/{widgetKey}/config

Public. What the embedded widget needs to draw itself, from the connection settings.

Auth
None

Path parameters

  • widgetKeystringrequired

    The externalAccountId the widget was connected with.

Response fields 200
  • titlestringrequired
  • greetingstring | nullrequired
  • accentColorstringrequired

WidgetConfig

  • titlestringrequired
  • greetingstring | nullrequired
  • accentColorstringrequired

Responses

  • 200Title, greeting and colour.
  • 401Missing, malformed, revoked or expired API key.
  • 404Not found, or not visible to this organization.
  • 422Request failed validation.
  • 429Rate limited.
  • 500Unexpected error. The correlationId ties it to our logs.
Request
curl "https://api.getengageai.app/widget/$WIDGET_KEY/config"
Response · 200
{
  "title": "Returns policy",
  "greeting": "string",
  "accentColor": "string"
}

A website visitor's conversation

GET/widget/{widgetKey}/messages

Public, polled by widget.js. Returns only what the visitor sent and what the business actually delivered — never drafts held for review. Scoped to the visitor token, so no token can read another visitor's thread.

Auth
None

Path parameters

  • widgetKeystringrequired
Response fields 200
  • messagesobject[]required
  • messages[].idstring (uuid)required
  • messages[].fromenumrequired

    One of visitor, business

  • messages[].textstringrequired
  • messages[].atstring (date-time)required

WidgetTranscript

  • messagesobject[]required
  • messages[].idstring (uuid)required
  • messages[].fromenumrequired

    One of visitor, business

  • messages[].textstringrequired
  • messages[].atstring (date-time)required

Responses

  • 200Oldest first.
  • 401Missing, malformed, revoked or expired API key.
  • 404Not found, or not visible to this organization.
  • 422Request failed validation.
  • 429Rate limited.
  • 500Unexpected error. The correlationId ties it to our logs.
Request
curl "https://api.getengageai.app/widget/$WIDGET_KEY/messages"
Response · 200
{
  "messages": [
    {
      "id": "3f6c2a1e-8b4d-4e7a-9c15-2d0b7e6f4a91",
      "from": "visitor",
      "text": "Yes — the Trailhead Mid GTX goes up to a UK 13, so an 11 is in the range.",
      "at": "2026-10-16T09:30:00.000Z"
    }
  ]
}

Send a message from a website visitor

POST/widget/{widgetKey}/messages

Public, called by widget.js. Enters the same pipeline as a WhatsApp message: stored, answered by the assistant or held for a person according to the channel's auto-reply mode, and visible in the inbox. The reply is collected by polling GET /widget/{widgetKey}/messages.

Limited to 12 messages a minute per visitor and 60 per IP. When the connection lists allowedOrigins, a request from any other site is refused with 401.

Auth
None
Body
application/json

Path parameters

  • widgetKeystringrequired

Request body

  • visitorTokenstringrequired

    Random, generated by the browser and kept in localStorage. It is the only thing that grants access to this visitor's transcript, so treat it as a secret.

    Min 20 characters · Max 200 characters

  • clientMessageIdstringrequired

    Unique per message. A retried POST with the same id is one message, not two.

    Max 100 characters

  • textstringrequired

    Max 2000 characters

  • namestring

    Shown to the business. Not verified.

    Max 100 characters

  • pageUrlstring

    The page the visitor was on.

    Max 500 characters

Response fields 200
  • statusenumrequired

    One of accepted, duplicate, ignored

Responses

  • 200Queued for a reply.
  • 401Missing, malformed, revoked or expired API key.
  • 404Not found, or not visible to this organization.
  • 422Request failed validation.
  • 429Rate limited.
  • 500Unexpected error. The correlationId ties it to our logs.
Request
curl -X POST "https://api.getengageai.app/widget/$WIDGET_KEY/messages" \
  -H "Content-Type: application/json" \
  -d '{
    "visitorToken": "8c1f0e2d9b3a47c6a5e4d3c2b1a0f9e8",
    "clientMessageId": "0b6f0f0a-3d6e-4b5e-9a3c-8d2f1e7c6b5a",
    "text": "Is the Ridgeline tent still in stock?",
    "pageUrl": "https://acme.example/products/ridgeline-tent"
  }'
Response · 200
{
  "status": "accepted"
}