---
title: "CreateWebhookSubscriptionBody"
description: "Request body for creating a WebhookSubscription."
section: "Reference"
group: "Types"
order: 263
---

## Definition

```ts
interface CreateWebhookSubscriptionBody {
  workspaceId: string;
  name: string;
  url: string;
  secret?: string | undefined;
  filter?:
    | {
        version: 1;
        root: import("/home/runner/work/aeontel/aeontel/packages/shared/src/conditions/schema").ConditionNode;
      }
    | null
    | undefined;
}
```

## Fields

| Field         | Type                                                                                                                                          | Notes                                                                |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `workspaceId` | `string`                                                                                                                                      | `required` — Workspace that will own the new subscription.           |
| `name`        | `string`                                                                                                                                      | `required` — Subscription name                                       |
| `url`         | `string`                                                                                                                                      | `required` — Destination URL                                         |
| `secret`      | `string \| undefined`                                                                                                                         | `optional` — Signing secret                                          |
| `filter`      | `{ version: 1; root: import("/home/runner/work/aeontel/aeontel/packages/shared/src/conditions/schema").ConditionNode; } \| null \| undefined` | `optional` — Optional filter condition evaluated against each event. |
