> ## Documentation Index
> Fetch the complete documentation index at: https://docs.attio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# createWebhookHandler()

> Creates a webhook handler

```js theme={"system"}
import {createWebhookHandler} from "attio/server"
```

Creates a [webhook handler](/sdk/server/webhooks/webhook-handlers).

## API

```ts TypeScript theme={"system"}
async function createWebhookHandler({fileName}: {fileName: string}): Promise<WebhookHandler>
```

## Arguments

An object containing:

### `fileName : string`

The name of your webhook file ***WITHOUT*** the `.webhook.ts` suffix.

## Returns

A `WebhookHandler` object containing:

### `id : string`

The unique identifier for the webhook handler.

<Tip>
  You may need this for calls to [`updateWebhookHandler()`](./update-webhook-handler) or
  [`deleteWebhookHandler()`](./delete-webhook-handler).
</Tip>

### `url : string`

The URL to trigger the webhook handler.

### `fileName: string`

The name of the webhook file that will be invoked when the webhook is triggered.
