Documentation

Three steps to live chat that verifies customers, resolves failed payments and pings whoever is on duty.

1 · Install the widget

Copy the exact snippet from your workspace and place it before </body>. Your saved widget settings load automatically.

<script
  src="https://your-relaychat-domain/widget.js"
  data-key="YOUR_WORKSPACE_KEY"
  async
></script>

2 · Return customer context

Optional: give relaychat an address in your app that returns verified account details. Without it, AI never invents private customer data.

POST /support/context
{
  "email": "customer@example.com",
  "customer_id": "your_customer_id"
}

200 OK
{
  "customer_id": "your_customer_id",
  "plan": "your_plan",
  "balance": 0,
  "transactions": [
    { "id": "your_transaction_id", "amount": 0, "status": "failed",
      "reason": "your_failure_reason" }
  ]
}

3 · Choose where alerts land

Each agent can answer in the relaychat console with browser notifications and a sound alert, in Telegram, or both. Replies from either side land in the same thread.

relaychat.configure({
  notify: { channel: "both", sound: "chime", desktop: true }
});

Interactive reference

The full REST reference with copyable cURL, JavaScript and React examples lives inside the dashboard.