Skip to main content
POST
/
api
/
v1
/
webhooks
/
test
Test webhook endpoints with realistic payload simulation
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
}

Body

Webhook configuration and test parameters

Request body for testing webhooks

webHook
object
required

Webhook configuration with URL and headers

webhookType
enum<string>
required

Type of webhook to test

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

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