type field to route incoming webhooks, then reference the tables below for field-by-field details on each payload.
What you’ll learn: Payload type enum, common fields, event-specific schemas, and response format requirements.
WebHookPayloadType Enum
All webhook payloads include atype field that serves as the discriminator. The possible values are:
Common Payload Fields
All webhook payloads inherit fromBaseWebHookPayload and include these common fields:
SipInfo Structure
Whensip is present. On an inbound call, From is the caller and To is the number they dialed; on an outbound call, From is the agent’s caller ID and To is the number dialed at your outbound SIP server.
CallStatus Values
CallConnectionType Values
StartWebHookPayload
Sent when a call is about to start. This is a pre-call webhook that allows you to accept or reject the call, and optionally override the agent configuration. Status:Queued
Fields
Example Payload
Example Payload
Start Webhook Response
Your webhook must return one of two response types:StartWebHookResponseAccept
Return this to accept the call and optionally override the agent configuration.Example: Accept Response
Example: Accept Response
StartWebHookResponseReject
Return this to reject the call.Example: Reject Response
Example: Reject Response
CompletedWebHookPayload
Sent when a call reachesCompleted status. Contains the full transcription and call results; result.status can still report a terminal failure.
Status: Completed
Fields
ConversationFailureDto Structure
failure provides normalized, customer-safe details for FailedWebHookPayload and for a CompletedWebHookPayload whose result.status is Failed.
Ownership fails closed. If
upstreamOwner is missing or unrecognized, BlackBox treats it as platform and omits upstreamMessage. Dasha-managed provider details remain private.
CompletedOutput Structure
IvrDetectionResult Structure
VoiceDetection Structure
Present when IVR voice recognition is enabled for the agent. A call can carry several verdicts, for example a second detection window, so the list keeps them in the order they arrived. A machine verdict ends the call when the agent’s IVR detection says so and setsivrDetection.type to VoiceDetection. A human verdict is listed as well, and it never ends the call.
Transcription Structure
ToolCall Structure
Covers custom webhook tools, MCP tools, and built-in tools.Example Payload
Example Payload
Example: Completed Payload with Terminal Failure
Example: Completed Payload with Terminal Failure
FailedWebHookPayload
Sent when a call fails due to an error. Status:Failed
Fields
Example Payload
Example Payload
errorMessage contains only ownership-approved public text. It may include the sanitized upstreamMessage for a customer-owned upstream, but it never includes Dasha-managed provider details.
CallDeadLineWebHookPayload
Sent when a call is canceled because its scheduled deadline expired before the call could be executed. Status:Canceled
Fields
Example Payload
Example Payload
TransferWebHookPayload
Sent during HTTP transfers to request a transfer decision. Your webhook determines where to route the call. Status:Running
Fields
Example Payload
Example Payload
Transfer Webhook Response
Your webhook should return a transfer decision specifying where to route the call. The response format depends on your transfer configuration.For complete details on transfer webhook responses and HTTP transfer configuration, see Call Transfers. Transfer parameters documented there align with this TransferWebHookPayload.
Example: Cold Transfer Response
Example: Cold Transfer Response
Example: Warm Transfer Response
Example: Warm Transfer Response
ToolWebHookPayload
Sent when the AI agent invokes a configured tool/function during a conversation. Status:Running
Fields
Example Payload
Example Payload
Tool Webhook Response
Tool Webhook Response
Return the tool execution result as JSON. The structure depends on your tool definition.
Event Handling Best Practices
Use the Type Discriminator
Use the Type Discriminator
Always route based on the
type field, not assumptions about payload structure:Respond Quickly
Dasha BlackBox expects webhook responses within the configured timeout (default: 10 seconds for start webhooks, 5 seconds for tools).Example: Async processing for long operations
Example: Async processing for long operations
Handle All Payload Types
Handle All Payload Types
Ensure your webhook handles all possible payload types gracefully:
Complete Webhook Handler Example
Complete Webhook Handler Example
Here’s a production-ready Express.js webhook handler implementing all payload types:
Next Steps
- Configuring Webhooks - Set up webhook endpoints
- Testing Webhooks - Test your webhook integration
- Call Transfers - Transfer parameters align with TransferWebHookPayload
- Tools and Functions - Configure tools for ToolWebHookPayload