---
title: "bird webhooks create"
description: "Create a webhook endpoint"
canonical: "https://bird.com/docs/cli/reference/webhooks-create"
---

# `bird webhooks create`

## Usage

```bash
bird webhooks create [url] [flags]
```

## Description

Create a webhook endpoint

Register an endpoint to receive this workspace's events, active immediately. Your own endpoint needs a URL and `events`. A connector endpoint needs neither: Bird builds its URL, and `events` defaults to every event the connector accepts. Its setup is checked against the schema the connector publishes, which --request-schema prints, before anything is sent. Saving does not contact the platform: run `bird webhooks test` to check the fields with it, which the output names under `next` when it includes the connector's destination. The signing secret is written to a file only you can read, --secret-out or webhook-secrets/&lt;webhook-id> in the CLI's config directory, and never printed; it can never be read back afterward, only rotated. https://bird.com/docs/ai/webhook-connectors lists the connectors with their fields, accepted events and platform setup.

Build the request from flags, a JSON WebhookEndpointCreate body via --body-file ("-" reads
stdin), or both — a flag overrides the matching body field. Run --example to
print a ready-to-edit body, or --dry-run to print the resolved request without
sending it.

## Procedure

Step 2 of 3 of "Send events to a webhook destination, and prove one arrives". Previous: bird webhooks list. Next: bird webhooks test.

## Examples

```bash
# print the body shape (no credentials needed)
bird webhooks create --example

# the body it prints:
```

```json
{
  "description": "Production delivery + bounce notifications",
  "events": ["email.delivered", "email.bounced"],
  "url": "https://example.com/webhooks/bird"
}
```

```bash
# deliver to your own endpoint
bird webhooks create https://example.com/bird --events sms.received,whatsapp.received

# start a Claude managed agent session for each inbound message
bird webhooks create --connector claude_managed_agents --field agent_id=agent_123 --field environment_id=env_123 --credential api_key=- < claude-key.txt
```

## Options

#### Endpoint

| Name                 | Description                                                                                                                                                                                                                                                                           |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--url`              | HTTPS URL to deliver events to, also accepted as the positional argument. Omit it with --connector: Bird builds the URL.                                                                                                                                                              |
| `--events <v1,v2,…>` | Event types to subscribe to; the endpoint receives only matching events. See https://bird.com/docs/guides/webhooks#event-catalog for the current values.                                                                                                                              |
| `--description`      | Human-readable label for this endpoint, up to 256 characters.                                                                                                                                                                                                                         |
| `--mailbox`          | Deliver only this mailbox's events, by ID or address; an address is looked up, which needs the mailbox:read scope. A connector endpoint then defaults --events to the mailbox events its action lists, or to email\_mailbox.message\_received for an action that accepts every event. |

#### Connector

| Name                       | Description                                                                                                                                                                    |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--connector`              | Deliver through this connector instead of posting the raw event to the URL. https://bird.com/docs/ai/webhook-connectors lists them.                                            |
| `--action`                 | The connector action each delivery runs. Omit it for a connector with one action; https://bird.com/docs/ai/webhook-connectors lists the actions of the others.                 |
| `--request-schema`         | Print the --connector's setup schema, its fields and actions, instead of creating an endpoint.                                                                                 |
| `--field <key=value>`      | A nonsecret field of the connector, as name=value; repeat for each. Secret fields take --credential, never a value on the command line.                                        |
| `--credential <key=value>` | A secret field of the connector, as name=FILE: the file holding its value, or - for stdin. Repeat for each; only one can read stdin. The value never goes on the command line. |

#### Request

| Name                | Description                                                  |
| ------------------- | ------------------------------------------------------------ |
| `--body-file`       | Read the JSON request body from this file; "-" reads stdin   |
| `--example`         | Print a complete example request body, then exit             |
| `--dry-run`         | Print the resolved request without sending it, then exit     |
| `--idempotency-key` | Deduplication key; a retry with the same key won't act twice |

#### Options

| Name                | Description                                                                                                                                                                                                                                                                                                       |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--secret-out`      | Write the signing secret to this file, readable only by you; it defaults to webhook-secrets/&lt;webhook-id> in the CLI's config directory, and the secret is never printed either way. A secret already in the file moves to &lt;file>.replaced-&lt;time>, since a rotated-out secret keeps signing for 24 hours. |
| `--response-schema` | Print the fields this command returns, then exit                                                                                                                                                                                                                                                                  |

## Related

| Name                                                                        | Description                                    |
| --------------------------------------------------------------------------- | ---------------------------------------------- |
| [`bird webhooks attempts`](/docs/cli/reference/webhooks-attempts)           | List delivery attempts                         |
| [`bird webhooks connect`](/docs/cli/reference/webhooks-connect)             | Connect a connector to this workspace's events |
| [`bird webhooks delete`](/docs/cli/reference/webhooks-delete)               | Delete a webhook endpoint                      |
| [`bird webhooks get`](/docs/cli/reference/webhooks-get)                     | Get a webhook endpoint                         |
| [`bird webhooks list`](/docs/cli/reference/webhooks-list)                   | List webhook endpoints                         |
| [`bird webhooks replay`](/docs/cli/reference/webhooks-replay)               | Replay failed deliveries                       |
| [`bird webhooks rotate-secret`](/docs/cli/reference/webhooks-rotate-secret) | Rotate webhook signing secret                  |
| [`bird webhooks test`](/docs/cli/reference/webhooks-test)                   | Test a webhook with a sample event             |
| [`bird webhooks update`](/docs/cli/reference/webhooks-update)               | Update a webhook endpoint                      |

## Related resources

- [Webhooks done right: reliable delivery events](/learn/basics/webhooks-done-right-reliable-delivery-events) (video)
- [How do I verify a webhook signature?](/explained/platform/how-do-i-verify-a-webhook-signature) (answer)
- [Operate messaging reliably](/learn/paths/reliability) (course)
- [Webhooks & events](/docs/guides/webhooks) (docs)

[Get an implementation brief](/learn/workspace?topic=webhooks)
