---
api: 'Business API'
---

# Create a new webhook

Create a new webhook to receive event notifications to the specified URL. Provide a list of event types that you want to subscribe to and a URL for the webhook.
Only HTTPS URLs are supported.

For more information, see the guides: [About webhooks](/docs/guides/manage-accounts/webhooks/about-webhooks) and [Manage webhooks](/docs/guides/manage-accounts/webhooks/manage-webhooks#create-a-webhook).

## Endpoint

POST `/webhooks`

## Request body

The webhook to create.

### Attributes

- `url` (string)
    A valid webhook URL to which to send event notifications. The supported protocol is `https`.
- `events` (array of enum, optional)
    A list of event types to subscribe to.
    If you don't provide it, you're automatically subscribed to the [default event types](/docs/guides/manage-accounts/webhooks/about-webhooks#default-event-types).

## Returns

### 201

The successfully created webhook

#### Response attributes

- `id` (string)
    The ID of the webhook.
- `url` (string)
    The valid webhook URL that event notifications are sent to. The supported protocol is `https`.
- `events` (array of enum)
    The list of event types that you are subscribed to.
- `signing_secret` (string)
    The signing secret for the webhook.

## Error responses

| HTTP status code | Description |
| --- | --- |
| 400 | Bad Request |
| 422 | Unprocessable Entity |
