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

# Unipile: Create Webhook

> Creates a webhook on the customer’s Unipile workspace that POSTs new messages, emails, email tracking, calendar, account-status, or new-relation events to a.

Creates a webhook on the customer’s Unipile workspace that POSTs new messages, emails, email tracking, calendar, account-status, or new-relation events to a.

> [!NOTE]
>
> Tool ID: `unipile_create_webhook`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'unipile_create_webhook',
  {
    "request_url": "https://example.com",
    "source": "messaging"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute unipile_create_webhook --input '{
  "request_url": "https://example.com",
  "source": "messaging"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "object": "WebhookCreated",
    "webhook_id": "webhook_123"
  }
}
```

Use `deepline describe unipile_create_webhook --json` for the latest machine-readable contract.

## Input reference

Create a webhook.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.request_url` | `string` | Yes | — | The url to associate with the webhook. |
| `payload.name` | `string` | No | — | This field will be sent back to you in the notify\_url to help match the added account with your user. |
| `payload.format` | `"json" \| "form"` | No | — | The format of data you recieve from the webhook. Accepted values: json \| form Allowed: `json`, `form`. |
| `payload.account_ids` | `array` | No | — | An optional list of account ids to be targeted by the webhook. If not set, the webhook will apply to all current and future accounts connected to Unipile. |
| `payload.enabled` | `boolean` | No | — | A boolean to activate or disable the webhook. |
| `payload.headers` | `array` | No | — | An optional field to add some headers to the webhook. |
| `payload.source` | `"messaging" \| "users" \| "account_status" \| "email" \| "email_tracking" \| "calendar_event"` | Yes | — | A literal to pick the kind of data you expect to receive from the webhook. Allowed: `messaging`, `users`, `account_status`, `email`, `email_tracking`, `calendar_event`. |
| `payload.events` | `array` | No | — | — |
| `payload.data` | `array` | No | — | — |

> [!NOTE]
>
> This input schema is too large for an inline display. Read the complete live contract with `deepline describe unipile_create_webhook --json`.

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.object` | `"WebhookCreated"` | Yes | — | Allowed: `WebhookCreated`. |
| `result.data.webhook_id` | `string` | Yes | — | — |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "WebhookCreated"
            ]
          },
          "webhook_id": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "webhook_id"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Unipile provider guide](https://deepline.com/docs/providers/unipile/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.