***

title: webhookExpressions
slug: /reference/typescript/agents/data-map/webhook-expressions
description: Add post-processing expressions for a webhook response.
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

Add expressions that run after the most recently added webhook completes.
Allows conditional output based on the API response.

## **Parameters**

<ParamField path="expressions" type={"Record<string, unknown>[]"} required={true} toc={true}>
  List of expression definitions to evaluate against the webhook response.
</ParamField>

## **Returns**

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

## **Example**

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

const dm = new DataMap('check_status');
dm.webhook('GET', 'https://api.example.com/status');
dm.webhookExpressions([
  {
    string: '${response.status}',
    pattern: 'active',
    output: new FunctionResult('The account is active.').toDict(),
  },
]);
```