> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # body > Set the request body for a webhook. [ref-datamap]: /docs/server-sdks/reference/typescript/agents/data-map [params]: /docs/server-sdks/reference/typescript/agents/data-map/params Set the request body for the most recently added webhook. Used for POST/PUT requests. Writes to the `body` key of the webhook definition. > **Warning** > > `body()` and [`params()`][params] write to different keys in the webhook > specification: `body` sets the request body, while `params` sets > query/form parameters. ## **Parameters** **`data`** `Record` — required Request body data. Supports `${variable}` substitutions. --- ## **Returns** [`DataMap`][ref-datamap] -- Self for method chaining. Throws an `Error` if no webhook has been added yet. ## **Example** ```typescript {10} import { DataMap, FunctionResult } from '@signalwire/sdk'; const search = new DataMap('search_docs'); search .purpose('Search documentation') .parameter('query', 'string', 'Search query', { required: true }) .webhook('POST', 'https://api.docs.example.com/search', { headers: { Authorization: 'Bearer TOKEN' }, }) .body({ query: '${args.query}', limit: 3 }) .output(new FunctionResult('Found: ${response.results[0].title}')); ``` > Set the request body for a webhook.