Events reference
Every event Sarthi announces, with the fields in its data. Pick the ones a destination should receive when you create it (see Webhooks). Contact details (name, email, phone, company, visitor) are left out of webhook and Slack deliveries unless the destination was created with "send contact details" switched on.
Every delivery has the same envelope:
{
"id": "01a11fa5-cf24-70f7-8856-fea44a434f75",
"type": "gate.captured",
"version": 1,
"occurredAt": "2026-10-09T07:52:02.596Z",
"workspaceId": "01a11fa5-c7da-722a-b339-039a85acdd9e",
"data": { "...": "the fields listed below" }
}
Generated from the code
This page is written by npm run events in the website package, straight from Sarthi's event registry, so it always matches what the API sends.
Conversations
| Event | When | data fields |
|---|---|---|
conversation.started | A visitor started a chat | conversationId, context, channel, pageUrl, endUserId |
gate.captured | A visitor filled in the front desk gate | conversationId, leadId, name, email, phone, company, pageUrl |
frontdesk.routed | The front desk sent the visitor to a role | conversationId, roleId, roleName, ruleNumber, reason |
role.stage_changed | A role moved the conversation to its next step | conversationId, roleId, from, to, stageName |
knowledge.query_proposed | A turn decided to search the knowledge base, or drafted a database query | conversationId, turnId, source, query, connection, mode, template, queryId |
knowledge.query_ran | A knowledge search or a database query finished | conversationId, turnId, source, query, outcome, topScore, results, sourceIds, connection, queryId, rowCount, latencyMs, cached |
booking.created | A visitor booked a call | conversationId, bookingId, startsAt, endsAt, timezone, visitor, roleName, summary |
conversation.ended | A conversation ended | conversationId, leadId, context, roleName, turns, credits, endedReason, escalated, rating |
visitor.purged | A visitor’s data was deleted on request | email, conversations |
People in the loop
| Event | When | data fields |
|---|---|---|
handoff.triggered | The AI handed the chat to the team | conversationId, requestId, trigger, context, visitor, lastMessage, roleName, consoleUrl |
handoff.notified | The team was first told about a handoff | conversationId, requestId, notified |
handoff.taken_over | A team member took over the chat | conversationId, requestId, userId, waitedSeconds |
handoff.handed_back | A team member handed the chat back to the AI | conversationId, requestId, userId, note |
handoff.timed_out | Nobody took over in time | conversationId, requestId, followUpId |
consult.requested | The AI asked the team a question | conversationId, requestId, trigger, question, waitSeconds, consoleUrl |
consult.answered | The team answered the AI’s question | conversationId, requestId, userId, optionUsed, remembered |
consult.relayed | The AI passed the team’s answer to the visitor | conversationId, requestId, status |
consult.timed_out | The team didn’t answer in time | conversationId, requestId, followUpId |
callback.requested | The visitor asked to be called back | conversationId, requestId, trigger, afterHours, contact, reason, consoleUrl |
reply.escalated | A Replies item waited too long | requestId, kind, waitedMinutes, notifiedUserIds |
reply.resolved | A Replies item was resolved | requestId, kind, resolution |
Leads
| Event | When | data fields |
|---|---|---|
lead.created | A new lead appeared | leadId, conversationId, source, channel, name, email, phone, company |
lead.status_changed | A lead’s status changed | leadId, from, to, changedBy |
lead.assigned | A lead got a new owner (or none) | leadId, ownerId, assignedBy, reason |
lead.merged | Two leads were merged into one | leadId, mergedLeadId, automatic |
lead.deleted | A lead was deleted | leadId, reason |
Actions
| Event | When | data fields |
|---|---|---|
action.proposed | A run waits for the visitor’s yes or the team’s approval | conversationId, runId, actionKey, status |
action.executed | An action ran and succeeded | conversationId, runId, actionKey, latencyMs, result |
action.failed | An action failed or timed out | conversationId, runId, actionKey, status, error |
action.declined | The visitor said no, or the team rejected the action | conversationId, runId, actionKey, by |
Knowledge sources
| Event | When | data fields |
|---|---|---|
source.indexed | A knowledge source is live | sourceId, name, pages, chunks |
source.awaiting_approval | A recrawl changed a lot and waits for approval | sourceId, name, runNumber |
source.failed | A knowledge source run failed | sourceId, name, runNumber, errorCode, error |
source.recrawled | A recrawl finished | sourceId, name, runNumber, trigger, pagesChanged, added, removed, result |
gap_report.ready | The weekly unanswered-questions report is ready | week, questionCount, top, topRequests |
Databases
| Event | When | data fields |
|---|---|---|
db_connection.status_changed | A database connection became failing, suspended, disabled or active again | connectionId, name, status, reason |
Channels
| Event | When | data fields |
|---|---|---|
voice.session_started | A voice session opened | conversationId, voiceSessionId, mode |
voice.session_ended | A voice session ended | conversationId, voiceSessionId, minutes, turns, reason |
slack.connected | Slack was connected to the workspace | teamName |
slack.disconnected | Slack was disconnected | teamName, reason |
whatsapp.delivery_failed | WhatsApp could not deliver a message | conversationId, messageId, errorCode |
Credits and billing
| Event | When | data fields |
|---|---|---|
credits.threshold | The balance fell below a warning level | level, balance, reference |
credits.adjusted | Sarthi changed the balance | entry, balance, status, restored |
credits.coupon_redeemed | A coupon added credits | code, credits, balance, status, restored |
credits.cycle_renewed | A new monthly cycle started | granted, expired, storageOverage, cycleEnd |
credits.purchase_requested | A credit purchase was ordered | purchaseId, credits, totalInr, invoiceNumber |
credits.purchased | A credit purchase was paid | purchaseId, credits, totalInr, paymentReference, paymentMethod, settledVia |
credits.payment_failed | An online payment for credits failed | purchaseId, method, errorCode, errorReason |
workspace.grace_started | The balance ran out: grace period started | balance, graceEndsAt |
workspace.paused | The website chat paused for lack of credits | balance, pausedAt |
workspace.restored | The website chat is back after a top-up | by, balance |
workspace.plan_changed | The plan changed | from, to, creditsGranted |
Workspace
| Event | When | data fields |
|---|---|---|
model.retiring | A model the workspace uses will be retired | modelId, retireAt, suggestedReplacement, note |
model.retirement_cancelled | A model retirement was cancelled | modelId |
model.retired | A model was retired | modelId, replacement |
workspace.grace_started | The balance ran out: grace period started | balance, graceEndsAt |
workspace.paused | The website chat paused for lack of credits | balance, pausedAt |
workspace.restored | The website chat is back after a top-up | by, balance |
workspace.created | Sarthi created the workspace | name, plan, region, ownerStatus |
workspace.plan_changed | The plan changed | from, to, creditsGranted |
workspace.disabled | Sarthi switched the website chat off | reason |
workspace.enabled | Sarthi switched the website chat back on | — |
support_access.started | Sarthi support started viewing the workspace | sessionId, mode, minutes, reason |
support_access.ended | Sarthi support stopped viewing the workspace | sessionId, endReason, requestCount |
evals.failed | An eval run found failing checks | runId, trigger, failed, cases |