Skip to main content
Put data from the call straight into a webhook request. Write a variable such as {{callAdditionalData.orderId}} in the webhook URL, a header, a query parameter or the body, and Dasha BlackBox replaces it with the real value before it sends the request. What you’ll learn: Where variables work, which variables exist, how to change the HTTP method, query string and body, and how to test the result.

Quick example

You create a call with this additional data:
You configure a tool webhook like this: Your API receives:
The body is still the standard JSON payload for that webhook. Templating changes only the parts you put variables in.

Where variables work

Variables work the same way in all four webhooks: Within a webhook, you can use variables in: In the dashboard, every field that accepts variables has a { } button. Click it to pick a variable from the list for that webhook. For callAdditionalData. and agentAdditionalData., pick the entry and type your own key. The cursor stays inside the braces.
Existing webhooks are not affected. A webhook without variables or advanced settings is sent exactly as before, with the same JSON payload.

Variable reference

A variable is a path into the webhook’s JSON payload. Every field described in Webhook Events is available.

Available in every webhook

Specific to one webhook


How values are rendered


Advanced request settings

Open Advanced request settings under the headers to change the request itself.
GET requests are sent without a body. Your API receives only the URL, query parameters and headers. Put everything it needs into those.

Request body formats

For JSON object and Form, each row has a field name and a value:
  • For JSON, the field name is a dotted path in the output, so customer.id creates { "customer": { "id": … } }.
  • A value that is exactly one variable, such as {{arguments.units}}, keeps its original type: a number stays a number. You can add a fallback used when the variable is missing.
  • Any other value is a literal or a text template, such as order-{{callAdditionalData.orderId}}.
Changing the body format of a result or start webhook replaces the standard payload. Your endpoint then receives only the fields you map. For the start webhook, your endpoint must still return an accept or reject response.

Configure in the dashboard

1

Pass the data with the call

Include additionalData when you create or register the call, for example { "customerId": "c-42" }.
2

Open the webhook

Open the tool, the result or start webhook, or the HTTP transfer you want to change.
3

Insert variables

In Webhook URL or a header value, click { } and pick a variable. For custom data, pick callAdditionalData. and type the key.
4

Adjust the request if needed

Open Advanced request settings to change the method, add query parameters or change the body.
5

Test and save

Fill in Test values for custom data, click Test Tool or Test Webhook, and check Request Sent. Then save.
An amber Unknown variable hint under a field means the name is not in the list for that webhook. Check it for typos.

Configure via API

Set customSettings on the webhook object. This example is a tool webhook that sends a GET request:
The same webhook object shape is used by config.resultWebhook, config.startWebhook.webhook and the HTTP transfer webhook.
Variables are replaced only when the webhook has customSettings. Without it, the URL and headers are sent exactly as written, including the braces. If you only need variables, add the minimal setting "customSettings": { "httpMethod": "POST" }. The dashboard adds this for you when a URL or header contains a variable.
Each field mapping has:
Request body:

Test with sample values

callAdditionalData and agentAdditionalData exist only on a real call, so a test needs stand-in values. In the dashboard: the editor shows Test values for custom data with one input for every custom-data variable the webhook uses. Sample values are never saved. A blank agentAdditionalData value falls back to the agent’s real Additional Data. The test result includes Request Sent, the exact URL, headers and body that were sent. Via API: pass the values to the test endpoint:
See Testing Webhooks for more testing methods.

Good to know

  • One result webhook, three payloads. A variable that a payload does not have is sent as written. Use variables that exist for every outcome, such as {{status}} or {{callAdditionalData.<key>}}, in the URL of a result webhook.
  • The URL is rebuilt when customSettings is set. Ordinary URLs are unchanged. A query parameter with an empty value, such as ?flag=, is left out, and an encoded slash (%2F) in the path is decoded. Give parameters a value and avoid encoded slashes in templated webhook URLs.
  • Query parameters merge. A parameter in both the URL and the advanced settings is sent with both values.
  • Secrets stay in headers. Put API keys in a header value, not in the URL, so they do not appear in access logs.

Troubleshooting


What’s next

Webhook Events

Every payload field you can reference

Tools & Functions

Define tools and their webhooks

HTTP Transfer

Route transfers with your own API

Testing Webhooks

Testing and debugging