⌘ FOR DEVELOPERS

One platform. Three powerful surfaces.

Pull conversations with the REST API, listen to events in real time with HMAC-signed webhooks, and control the chat bubble on your site programmatically with the Widget JS API.

200 OK · 42 ms HMAC-SHA256 signed webhooks API key access
01 · Getting started

Your first request in 5 minutes

There's one prerequisite for every surface: create an API key on the Developers page of your dashboard. With your key you can pull data over REST, set up webhooks and control the widget.

1
Create a key
Dashboard → Developers → New key
2
Send a request
With an Authorization: Bearer header
3
Listen for events
Set your webhook URL
02 · Authentication

Authenticate with a Bearer key

Add your key to every REST request in the Authorization header. Keys start with the rc_live_ prefix and are shown only once, when they're created — store yours somewhere safe.

curl
curl https://revochat.app/api/v1/conversations \
  -H "Authorization: Bearer rc_live_XXXXXXXXXXXX"
03 · REST API

Programmatic access to your data

Base URL: https://revochat.app/api/v1

GET/conversations

Lists conversations, most recently updated first. Parameters: status (open | closed), limit (default 50, max 200). The response returns a data array; each record includes the site, visitor, assigned agent, tags, CSAT score and timestamps.

curl
curl "https://revochat.app/api/v1/conversations?status=open&limit=20" \
  -H "Authorization: Bearer rc_live_..."
GET/conversations/:id

Returns a single conversation with all its messages (internal notes excluded). Messages include sender, content, type and file fields where present. Returns 404 if not found.

An invalid or missing key gets a 401 with a { "error": "..." } body. Older keys with the cd_live_ prefix keep working.

04 · Webhooks

Events in your hands the moment they happen

Set a webhook URL in your dashboard; the events you choose are sent with a JSON body as a POST the moment they happen. Every request carries two headers: X-RevoChat-Event (the event name) and X-RevoChat-Signature (an HMAC-SHA256 signature of the raw body, made with your webhook secret) — verify it before processing. Body shape: { event, createdAt, data }. Deliveries time out after 5 seconds, so respond quickly.

conversation.created
A new conversation started
message.created
A new message arrived
conversation.closed
A conversation was closed
conversation.rated
A visitor left a CSAT rating
node — signature check
const crypto = require("crypto");
const expected = crypto
  .createHmac("sha256", process.env.WEBHOOK_SECRET)
  .update(rawBody) // raw body — BEFORE JSON.parse
  .digest("hex");
if (expected !== req.headers["x-revochat-signature"]) return res.status(401).end();
05 · Widget JS API

Full control of the chat bubble

Once the install script has loaded, the window.RevoChat object is ready:

widget.js
RevoChat.open();                    // open the panel
RevoChat.close();                   // close the panel
RevoChat.toggle();                  // open/close
RevoChat.isOpen();                  // is it open? (boolean)

RevoChat.identify({                 // identify the visitor
  name: "Jane Doe",
  email: "[email protected]",
});

RevoChat.on("ready", () => {});     // widget loaded
RevoChat.on("open", () => {});      // panel opened
RevoChat.on("close", () => {});     // panel closed
RevoChat.on("message", (m) => {});  // new message ({ sender, content, type })

Add data-lang="en" to the script tag to override the widget language per page (tr / en / de / es). The data-canli-destek attribute from older embed codes is still supported.

06 · Sales tracking

Tie chats to revenue

Add one line to your order confirmation page; the sale is linked to the visitor's latest conversation and reported in Analytics as "chat-attributed revenue".

widget.js
RevoChat.track("purchase", {
  orderId: "ORD-1042",   // optional
  amount: 1299.9,        // required (number)
  currency: "USD",       // default: TRY
});

For now the only supported event is purchase; the sale is attributed to the visitor's most recent conversation.

Get your key, connect in 5 minutes

API keys and webhook secrets are managed on the Developers page in your dashboard.

Go to Developers →
200 OK · 42 ms