Connects agents with customers when an escalation is triggered using the Widget Escalation API.

All requests should be made to your API base URL: https://api.ultimate.ai

JSON format

Escalation API requests are represented as JSON objects with the following properties:

NameTypeRequiredDescription
platformConversationIdstringYesUnique identifier for the conversation, generated by the custom CRM application.
eventTypestringYesThe type of escalation event. Possible values: "escalationQueueUpdate", "escalationSuccess", "message", "escalationFailed", "agentDisconnect"
textstringNoText content of the agent’s message (required if eventType is "message"
agentstringNoName of the agent if eventType is "escalationSuccess"
agentAvatarstringNoURL for the agent’s avatar if eventType is "escalationSuccess"
queuePositionstringNoVisitor’s position in the queue if eventType is "escalationSuccess"
waitingTimestringNoEstimated wait time for the visitor in minutes if eventType is "escalationSuccess".

Send escalation events to a widget

POST /agent/converse/send-message-to-widget

Use this endpoint to send escalation updates or agent messages to an active widget session. The API acknowledges your request with a 200 OK and processes it asynchronously. The customer-facing widget is updated in real time as events are received.

Parameters

NameTypeInRequiredDescription
AuthorizationstringheaderYesAPI key for the bot. Generate the key from the Custom CRM integration page in the Ultimate.ai dashboard. See the Authentication article for details.
botidstringheaderYesThe ID of the bot sending or receiving the event.

Example body

{  "platformConversationId": "123456789",  "eventType": "escalationSuccess",  "agent": "John Smith",  "agentAvatar": "https://example.com/avatar/john-smith.png"}

Responses

200 The request has been acknowledged and will be processed. The actual response will be delivered through webhooks.
400 Bad request. The request body is invalid or missing required fields.
401 Unauthorized. Missing or invalid API key or bot ID.
404 Not found. The specified endpoint does not exist.