Test webhook endpoint
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webHook: {
url: '<string>',
headers: {},
customSettings: {queryParams: {}, bodyFormat: {template: '<string>'}}
},
toolName: '<string>',
agentId: '<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));curl --request POST \
--url https://blackbox.dasha.ai/api/v1/webhooks/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"webHook": {
"url": "<string>",
"headers": {},
"customSettings": {
"queryParams": {},
"bodyFormat": {
"template": "<string>"
}
}
},
"toolName": "<string>",
"agentId": "<string>",
"toolArguments": {},
"agentAdditionalData": {},
"callAdditionalData": {}
}
'import requests
url = "https://blackbox.dasha.ai/api/v1/webhooks/test"
payload = {
"webHook": {
"url": "<string>",
"headers": {},
"customSettings": {
"queryParams": {},
"bodyFormat": { "template": "<string>" }
}
},
"toolName": "<string>",
"agentId": "<string>",
"toolArguments": {},
"agentAdditionalData": {},
"callAdditionalData": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"httpStatus": 123,
"httpStatusText": "<string>",
"responseData": "<unknown>",
"validationResult": {
"isValid": true,
"errors": [
"<string>"
]
},
"error": "<string>",
"timeTaken": 123,
"sentRequest": {
"method": "<string>",
"url": "<string>",
"contentType": "<string>",
"body": "<string>",
"headers": {}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Test webhook endpoint
Tests a webhook endpoint with realistic payload simulation. Sends a test payload to the webhook URL and validates the response. Returns test results including HTTP status, response data, and execution time.
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: {queryParams: {}, bodyFormat: {template: '<string>'}}
},
toolName: '<string>',
agentId: '<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));curl --request POST \
--url https://blackbox.dasha.ai/api/v1/webhooks/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"webHook": {
"url": "<string>",
"headers": {},
"customSettings": {
"queryParams": {},
"bodyFormat": {
"template": "<string>"
}
}
},
"toolName": "<string>",
"agentId": "<string>",
"toolArguments": {},
"agentAdditionalData": {},
"callAdditionalData": {}
}
'import requests
url = "https://blackbox.dasha.ai/api/v1/webhooks/test"
payload = {
"webHook": {
"url": "<string>",
"headers": {},
"customSettings": {
"queryParams": {},
"bodyFormat": { "template": "<string>" }
}
},
"toolName": "<string>",
"agentId": "<string>",
"toolArguments": {},
"agentAdditionalData": {},
"callAdditionalData": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"httpStatus": 123,
"httpStatusText": "<string>",
"responseData": "<unknown>",
"validationResult": {
"isValid": true,
"errors": [
"<string>"
]
},
"error": "<string>",
"timeTaken": 123,
"sentRequest": {
"method": "<string>",
"url": "<string>",
"contentType": "<string>",
"body": "<string>",
"headers": {}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Webhook Types
Start Webhook:- Called when a call begins
- Can modify agent configuration dynamically
- Returns start webhook response with optional config overrides
- Called when agent uses a custom tool
- Requires tool name and arguments
- Returns tool execution results
- Called before transferring a call
- Returns transfer destination information
- 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
application/jsontext/jsonapplication/*+json
Webhook configuration and test parameters
Request body for testing webhooks
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 Response
Webhook test completed successfully
Response for webhook tests
Was this page helpful?