Skip to main content

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​

EventWhendata fields
conversation.startedA visitor started a chatconversationId, context, channel, pageUrl, endUserId
gate.capturedA visitor filled in the front desk gateconversationId, leadId, name, email, phone, company, pageUrl
frontdesk.routedThe front desk sent the visitor to a roleconversationId, roleId, roleName, ruleNumber, reason
role.stage_changedA role moved the conversation to its next stepconversationId, roleId, from, to, stageName
knowledge.query_proposedA turn decided to search the knowledge base, or drafted a database queryconversationId, turnId, source, query, connection, mode, template, queryId
knowledge.query_ranA knowledge search or a database query finishedconversationId, turnId, source, query, outcome, topScore, results, sourceIds, connection, queryId, rowCount, latencyMs, cached
booking.createdA visitor booked a callconversationId, bookingId, startsAt, endsAt, timezone, visitor, roleName, summary
conversation.endedA conversation endedconversationId, leadId, context, roleName, turns, credits, endedReason, escalated, rating
visitor.purgedA visitor’s data was deleted on requestemail, conversations

People in the loop​

EventWhendata fields
handoff.triggeredThe AI handed the chat to the teamconversationId, requestId, trigger, context, visitor, lastMessage, roleName, consoleUrl
handoff.notifiedThe team was first told about a handoffconversationId, requestId, notified
handoff.taken_overA team member took over the chatconversationId, requestId, userId, waitedSeconds
handoff.handed_backA team member handed the chat back to the AIconversationId, requestId, userId, note
handoff.timed_outNobody took over in timeconversationId, requestId, followUpId
consult.requestedThe AI asked the team a questionconversationId, requestId, trigger, question, waitSeconds, consoleUrl
consult.answeredThe team answered the AI’s questionconversationId, requestId, userId, optionUsed, remembered
consult.relayedThe AI passed the team’s answer to the visitorconversationId, requestId, status
consult.timed_outThe team didn’t answer in timeconversationId, requestId, followUpId
callback.requestedThe visitor asked to be called backconversationId, requestId, trigger, afterHours, contact, reason, consoleUrl
reply.escalatedA Replies item waited too longrequestId, kind, waitedMinutes, notifiedUserIds
reply.resolvedA Replies item was resolvedrequestId, kind, resolution

Leads​

EventWhendata fields
lead.createdA new lead appearedleadId, conversationId, source, channel, name, email, phone, company
lead.status_changedA lead’s status changedleadId, from, to, changedBy
lead.assignedA lead got a new owner (or none)leadId, ownerId, assignedBy, reason
lead.mergedTwo leads were merged into oneleadId, mergedLeadId, automatic
lead.deletedA lead was deletedleadId, reason

Actions​

EventWhendata fields
action.proposedA run waits for the visitor’s yes or the team’s approvalconversationId, runId, actionKey, status
action.executedAn action ran and succeededconversationId, runId, actionKey, latencyMs, result
action.failedAn action failed or timed outconversationId, runId, actionKey, status, error
action.declinedThe visitor said no, or the team rejected the actionconversationId, runId, actionKey, by

Knowledge sources​

EventWhendata fields
source.indexedA knowledge source is livesourceId, name, pages, chunks
source.awaiting_approvalA recrawl changed a lot and waits for approvalsourceId, name, runNumber
source.failedA knowledge source run failedsourceId, name, runNumber, errorCode, error
source.recrawledA recrawl finishedsourceId, name, runNumber, trigger, pagesChanged, added, removed, result
gap_report.readyThe weekly unanswered-questions report is readyweek, questionCount, top, topRequests

Databases​

EventWhendata fields
db_connection.status_changedA database connection became failing, suspended, disabled or active againconnectionId, name, status, reason

Channels​

EventWhendata fields
voice.session_startedA voice session openedconversationId, voiceSessionId, mode
voice.session_endedA voice session endedconversationId, voiceSessionId, minutes, turns, reason
slack.connectedSlack was connected to the workspaceteamName
slack.disconnectedSlack was disconnectedteamName, reason
whatsapp.delivery_failedWhatsApp could not deliver a messageconversationId, messageId, errorCode

Credits and billing​

EventWhendata fields
credits.thresholdThe balance fell below a warning levellevel, balance, reference
credits.adjustedSarthi changed the balanceentry, balance, status, restored
credits.coupon_redeemedA coupon added creditscode, credits, balance, status, restored
credits.cycle_renewedA new monthly cycle startedgranted, expired, storageOverage, cycleEnd
credits.purchase_requestedA credit purchase was orderedpurchaseId, credits, totalInr, invoiceNumber
credits.purchasedA credit purchase was paidpurchaseId, credits, totalInr, paymentReference, paymentMethod, settledVia
credits.payment_failedAn online payment for credits failedpurchaseId, method, errorCode, errorReason
workspace.grace_startedThe balance ran out: grace period startedbalance, graceEndsAt
workspace.pausedThe website chat paused for lack of creditsbalance, pausedAt
workspace.restoredThe website chat is back after a top-upby, balance
workspace.plan_changedThe plan changedfrom, to, creditsGranted

Workspace​

EventWhendata fields
model.retiringA model the workspace uses will be retiredmodelId, retireAt, suggestedReplacement, note
model.retirement_cancelledA model retirement was cancelledmodelId
model.retiredA model was retiredmodelId, replacement
workspace.grace_startedThe balance ran out: grace period startedbalance, graceEndsAt
workspace.pausedThe website chat paused for lack of creditsbalance, pausedAt
workspace.restoredThe website chat is back after a top-upby, balance
workspace.createdSarthi created the workspacename, plan, region, ownerStatus
workspace.plan_changedThe plan changedfrom, to, creditsGranted
workspace.disabledSarthi switched the website chat offreason
workspace.enabledSarthi switched the website chat back on—
support_access.startedSarthi support started viewing the workspacesessionId, mode, minutes, reason
support_access.endedSarthi support stopped viewing the workspacesessionId, endReason, requestCount
evals.failedAn eval run found failing checksrunId, trigger, failed, cases