Know who's chatting
Call identify() when a customer logs in and agents see their name, email and phone.
One script to embed, a small JavaScript API to pass context, signed webhooks for events and a REST API for the rest.
<script src="https://nivachat.co/widget.js"
data-site-id="YOUR-SITE-ID" async></script>// When a customer signs in
await window.ChatWidget.identify({ name: "Sara Mohammadi", email: "sara@example.com" });
// Anything the agent should see beside the chat
await window.ChatWidget.setCustomData({ plan: "Business", cart: "2 items" });
// Single-page apps: after each route change
window.ChatWidget.pageChanged();
window.ChatWidget.open();POST https://your-app.example/hooks/nivachat
X-Chat-Event: message.created
X-Chat-Signature: sha256=<HMAC-SHA256(body, secret)>
{
"event": "message.created",
"occurred_at": "2026-11-16T10:24:00Z",
"data": { … }
}# List conversations
curl https://nivachat.co/api/public/v1/conversations \
-H "Authorization: Bearer csk_…"
# Reply to one
curl -X POST https://nivachat.co/api/public/v1/conversations/{uuid}/messages \
-H "Authorization: Bearer csk_…" \
-H "Content-Type: application/json" \
-d '{"body": "Hi! How can we help?"}'conversation.createdA visitor starts a new conversation.message.createdA message is sent, by a visitor or an agent.conversation.resolvedA conversation is marked resolved.Call identify() when a customer logs in and agents see their name, email and phone.
setCustomData() puts plan, account id or cart value beside the conversation.
pageChanged() keeps the visitor's path accurate when your app routes without reloading.
conversation.created, message.created and conversation.resolved, delivered to your URL.
List conversations, read messages and reply from your own tools with an API key.
Failed webhooks retry with backoff — after 1 minute, 5 minutes, 30 minutes and 2 hours.
Leave your details and our team will call you to set up Nivachat and show you around — free.