Use theDocumentation Index
Fetch the complete documentation index at: https://docs.blackbox.dasha.ai/llms.txt
Use this file to discover all available pages before exploring further.
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:
| Type Value | Description | Status |
|---|---|---|
StartWebHookPayload | Call is starting (pre-call webhook) | Queued |
CompletedWebHookPayload | Call completed successfully | Completed |
FailedWebHookPayload | Call failed with an error | Failed |
CallDeadLineWebHookPayload | Call canceled due to deadline expiration | Canceled |
TransferWebHookPayload | Transfer decision requested (HTTP transfer) | Running |
ToolWebHookPayload | Tool/function execution requested | Running |
UnknownWebHookPayload | Unknown or unhandled payload type | - |
Common Payload Fields
All webhook payloads inherit fromBaseWebHookPayload and include these common fields:
| Field | Type | Required | Description |
|---|---|---|---|
type | WebHookPayloadType | Yes | Discriminator field identifying the payload type |
status | CallStatus | Yes | Current call status (Queued, Running, Completed, Failed, Canceled) |
callId | string | Yes | Unique identifier for the call |
agentId | string | Yes | ID of the agent handling the call |
orgId | string | Yes | Organization identifier |
callAdditionalData | object | Yes | Custom metadata passed when creating the call |
agentAdditionalData | object | Yes | Custom metadata from agent configuration |
serverJobId | string | No | Internal server job identifier |
sip | IncomingSipInfo | No | SIP protocol information (if available) |
endpoint | string | No | Call endpoint (phone number, SIP URI, etc.) |
IncomingSipInfo Structure
Whensip is present:
| Field | Type | Description |
|---|---|---|
fromUser | string | User part of SIP From header |
fromDomain | string | Domain part of SIP From header |
toUser | string | User part of SIP To header |
toDomain | string | Domain part of SIP To header |
diversion | string[] | Array of diversion headers |
CallStatus Values
| Value | Description |
|---|---|
Unknown | Unknown status |
Created | Call created but not yet queued |
Pending | Call pending execution |
Queued | Call queued and ready to start |
Running | Call in progress |
Completed | Call completed successfully |
Failed | Call failed with error |
Canceled | Call was canceled |
CallConnectionType Values
| Value | Description |
|---|---|
Unknown | Unknown connection type |
InboundAudio | Inbound phone call |
OutboundAudio | Outbound phone call |
WebChat | Web-based chat session |
WebCall | Web-based voice call |
WebPhone | Web phone connection |
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
| Field | Type | Required | Description |
|---|---|---|---|
type | "StartWebHookPayload" | Yes | Discriminator |
status | "Queued" | Yes | Always Queued for start payloads |
originalAgentConfig | AgentConfigDto | Yes | The current agent configuration at call start |
| (common fields) | - | Yes | All fields from BaseWebHookPayload |
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.| Field | Type | Required | Description |
|---|---|---|---|
accept | true | Yes | Must be true to accept |
overrideAgentConfig | AgentConfigDto | No | Complete agent configuration to use instead of the original. Note: This replaces the entire configuration, not a partial merge. |
additionalData | object | No | Additional data to inject into the call context |
Example: Accept Response
Example: Accept Response
StartWebHookResponseReject
Return this to reject the call.| Field | Type | Required | Description |
|---|---|---|---|
accept | false | Yes | Must be false to reject |
reasonMessage | string | Yes | Reason for rejection (minimum 1 character) |
Example: Reject Response
Example: Reject Response
CompletedWebHookPayload
Sent when a call completes successfully. Contains the full transcription and call results. Status:Completed
Fields
| Field | Type | Required | Description |
|---|---|---|---|
type | "CompletedWebHookPayload" | Yes | Discriminator |
status | "Completed" | Yes | Always Completed |
callType | CallConnectionType | Yes | Type of call connection |
result | CompletedOutput | Yes | Call result data including post-call analysis |
transcription | Transcription[] | Yes | Complete conversation transcript |
inspectorUrl | string | Yes | URL to view call in Call Inspector |
recordingUrl | string | No | URL to call recording (if enabled) |
createdTime | string (ISO 8601) | Yes | When the call was created |
completedTime | string (ISO 8601) | Yes | When the call completed |
durationSeconds | number | Yes | Total call duration in seconds |
| (common fields) | - | Yes | All fields from BaseWebHookPayload |
CompletedOutput Structure
| Field | Type | Description |
|---|---|---|
failDetails | string | Failure details (if any) |
finishReason | string | Reason for call completion |
serviceStatus | string | Service status code |
status | string | Final status |
postCallAnalysis | object | Results from configured post-call analysis labels |
transferInformation | TransferInfo[] | Array of transfer information (duration, etc.) |
Transcription Structure
| Field | Type | Description |
|---|---|---|
speaker | string | Speaker identifier ("user" or "assistant") |
name | string | Speaker name (optional) |
text | string | Transcribed text |
startTime | string (ISO 8601) | When this segment started |
endTime | string (ISO 8601) | When this segment ended |
Example Payload
Example Payload
FailedWebHookPayload
Sent when a call fails due to an error. Status:Failed
Fields
| Field | Type | Required | Description |
|---|---|---|---|
type | "FailedWebHookPayload" | Yes | Discriminator |
status | "Failed" | Yes | Always Failed |
callType | CallConnectionType | Yes | Type of call connection |
errorMessage | string | Yes | Description of the error |
inspectorUrl | string | No | URL to view call in Call Inspector |
recordingUrl | string | No | URL to partial recording (if available) |
createdTime | string (ISO 8601) | Yes | When the call was created |
completedTime | string (ISO 8601) | Yes | When the call failed |
| (common fields) | - | Yes | All fields from BaseWebHookPayload |
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
| Field | Type | Required | Description |
|---|---|---|---|
type | "CallDeadLineWebHookPayload" | Yes | Discriminator |
status | "Canceled" | Yes | Always Canceled |
callType | CallConnectionType | Yes | Type of call connection |
reasonMessage | string | No | Reason for cancellation |
createdTime | string (ISO 8601) | No | When the call was created |
completedTime | string (ISO 8601) | No | When the call was canceled |
| (common fields) | - | Yes | All fields from BaseWebHookPayload |
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
| Field | Type | Required | Description |
|---|---|---|---|
type | "TransferWebHookPayload" | Yes | Discriminator |
status | "Running" | Yes | Always Running |
transferReason | string | No | Reason for transfer execution |
transcription | Transcription[] | Yes | Partial transcription up to the transfer moment |
| (common fields) | - | Yes | All fields from BaseWebHookPayload |
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
| Field | Type | Required | Description |
|---|---|---|---|
type | "ToolWebHookPayload" | Yes | Discriminator |
status | "Running" | Yes | Always Running |
toolName | string | Yes | Name of the tool being called |
arguments | object | Yes | Arguments passed to the tool (as defined in tool schema) |
| (common fields) | - | Yes | All fields from BaseWebHookPayload |
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