Skip to main content
POST
/
api
/
v1
/
webhooks
/
test
Test webhook endpoint
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    webHook: {
      url: '<string>',
      headers: {},
      customSettings: {httpMethod: 'GET', queryParams: {}, bodyFormat: {template: '<string>'}}
    },
    webhookType: 'UnknownWebHookPayload',
    toolName: '<string>',
    toolArguments: {},
    agentAdditionalData: {},
    callAdditionalData: {}
  })
};

fetch('https://blackbox.dasha.ai/api/v1/webhooks/test', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "httpStatus": 123,
  "httpStatusText": "<string>",
  "responseData": "<unknown>",
  "validationResult": {
    "isValid": true,
    "errors": [
      "<string>"
    ]
  },
  "error": "<string>",
  "timeTaken": 123
}

Webhook Types

Start Webhook:
  • Called when a call begins
  • Can modify agent configuration dynamically
  • Returns start webhook response with optional config overrides
Tool Webhook:
  • Called when agent uses a custom tool
  • Requires tool name and arguments
  • Returns tool execution results
Transfer Webhook:
  • Called before transferring a call
  • Returns transfer destination information
Result Webhooks (Completed, Failed, Deadline):
  • Fire-and-forget notifications
  • No response data expected

Test Response

The test returns:
  • Success: Whether the webhook responded successfully
  • HTTP status: Status code from webhook endpoint
  • Response data: Parsed response from webhook
  • Validation result: Schema validation for start webhooks
  • Time taken: Execution time in milliseconds
  • Error: Error message if test failed

Body

Webhook configuration and test parameters

Request body for testing webhooks

webHook
object
required

Webhook configuration for HTTP callbacks. Defines the URL endpoint to call, custom HTTP headers, and request customization settings for sending event data or tool invocations to external systems.

webhookType
enum<string>
required

Type of webhook event being sent. Identifies which stage of the call lifecycle or which conversation event triggered the webhook notification. Each type corresponds to a specific payload structure with event-relevant data.

Available options:
UnknownWebHookPayload,
StartWebHookPayload,
FailedWebHookPayload,
CompletedWebHookPayload,
CallDeadLineWebHookPayload,
TransferWebHookPayload,
ToolWebHookPayload
toolName
string | null

Name of the tool being called (required for tool webhooks)

toolArguments
object

Tool arguments (required for tool webhooks)

agentAdditionalData
object

Agent additional data for the test

callAdditionalData
object

Call additional data for the test

Response

Webhook test completed successfully

Response for webhook tests

success
boolean

Whether the webhook test was successful

httpStatus
integer<int32> | null

HTTP status code returned by the webhook endpoint

httpStatusText
string | null

HTTP status text returned by the webhook endpoint

responseData
any | null

Response data from the webhook endpoint

validationResult
object

Validation result for start webhook responses

error
string | null

Error message if the test failed

timeTaken
integer<int64>

Time taken to execute the webhook test in milliseconds