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:
IncomingSipInfo Structure
Whensip is present:
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 completes successfully. Contains the full transcription and call results. Status:Completed
Fields
CompletedOutput Structure
Transcription Structure
Example Payload
Example Payload
FailedWebHookPayload
Sent when a call fails due to an error. Status:Failed
Fields
Example Payload
Example Payload
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