***

title: params
slug: /reference/typescript/agents/data-map/params
description: Set query or form parameters for the most recently added webhook.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[ref-datamap]: /docs/server-sdks/reference/typescript/agents/data-map

Set request query/form parameters for the most recently added webhook. Writes
to the `params` key of the webhook definition.

<Warning>
  `params()` is **not** an alias for `body()`. They write to different keys in the
  webhook specification: `body` sets the request body, while `params` sets
  query/form parameters.
</Warning>

## **Parameters**

<ParamField path="data" type={"Record<string, unknown>"} required={true} toc={true}>
  Request parameters. Supports `${variable}` substitutions.
</ParamField>

## **Returns**

[`DataMap`][ref-datamap] -- Self for method chaining. Throws an `Error` if no webhook
has been added yet.

## **Example**

```typescript {7}
import { DataMap, FunctionResult } from '@signalwire/sdk';

const dm = new DataMap('search_docs');
dm.purpose('Search documentation');
dm.parameter('query', 'string', 'Search query', { required: true });
dm.webhook('GET', 'https://api.docs.example.com/search');
dm.params({ q: '${args.query}', limit: 10 });
dm.output(new FunctionResult('Found: ${response.results[0].title}'));
```