Manage human escalation and takeover
Human escalation alerts your team when a conversation needs attention. Human takeover controls when AI replies resume after a person takes over. Use the Escalation reference for the full request and response formats.
| Task | Endpoint | Scope |
|---|---|---|
| Read escalation rules | GET /v2/pub/escalation-settings |
escalation:read |
| Edit escalation rules | PATCH /v2/pub/escalation-settings |
escalation:write |
| Read the takeover delay | GET /v2/pub/human-takeover-settings |
escalation:read |
| Edit the takeover delay | PATCH /v2/pub/human-takeover-settings |
escalation:write |
| See why a contact needs attention | GET /v2/pub/clients/{clientId}/escalation |
inbox:read |
| Close a contact’s open escalations | POST /v2/pub/clients/{clientId}/escalation/resolve |
inbox:write |
| Pause or resume AI replies for a contact | PATCH /v2/pub/clients/{clientId}/ai |
inbox:write |
| Archive or reopen a conversation | PATCH /v2/pub/clients/{clientId}/archive |
inbox:write |
Edit company settings
- Read the settings to see what is set now. For escalation rules,
data.isDefaulttells you whether LeadTruffle is using its built-in settings. - Send only the fields you want to change. Escalation policy fields go at the top level of the request body. Sending
exampleCriteriareplaces the list. - Optional: send the
data.versionyou read asexpectedVersionto avoid overwriting someone else's edit. If the settings changed since, the API returns409 VERSION_CONFLICT; read them again and apply your edit to the latest values. A400 INVALID_REQUESTcan includeerror.fieldErrors, keyed by field name.
For acknowledgement and fallback messages, use plain text or one of the supported placeholders. For example, Thanks, {{client.firstName}}. Our team will follow up shortly. You can also use {{client.lastName}}, {{company.name}}, {{companyBranding.companyPhone}}, {{companyBranding.companyEmail}}, and {{companyBranding.companyWebsite}}.
For example, send {"enabled":true,"minutes":15} to the takeover settings endpoint to resume AI 15 minutes after a person takes over. Changing this setting to enabled: false cancels scheduled resumes.
Settings edits appear under the API key’s label in LeadTruffle’s AI Behavior History. data.historyChangeId identifies the change and is null when the saved behavior stayed the same.
Handle an open escalation
Read a contact’s escalation to see its status, reason, and open and resolved times. The response shows the newest open escalation first, then the latest past escalation if none are open.
- Send
{"action":"DISMISS"}to close open escalations while leaving the contact’s AI controls as they are. - Send
{"action":"RESOLVE_AND_KEEP_AI_OFF"}to close open escalations and keep AI paused. - Send
{"action":"RESOLVE_AND_RESUME_AI"}to close open escalations and resume AI when an escalation was linked to a lead inquiry. Checkdata.ai.statein the response. - Send
{"enabled":false}to the contact AI endpoint to pause replies. Sending{"enabled":true}while an escalation is open returns409 HUMAN_ESCALATION_OPEN. Resolve the escalation first. - Send
{"archived":true}to archive the conversation or{"archived":false}to reopen it. New activity can also reopen it.
Contact actions return the current state. Read that state after a timeout to see whether the change was saved.