# Webhooks

## /api/webhooks

<mark style="color:green;">`POST`</mark> `https://datelist.io/api/webhooks`

This endpoint allows you to subscribe to a webhook, to receive the new booking notification.&#x20;

#### Headers

| Name           | Type   | Description                                           |
| -------------- | ------ | ----------------------------------------------------- |
| Authentication | string | Authentication token (see the authentication section) |

#### Request Body

| Name         | Type    | Description                                                                 |
| ------------ | ------- | --------------------------------------------------------------------------- |
| url          | string  | The URL where we should POST information about new bookings.                |
| calendar\_id | integer | The ID of the calendar you would like to watch (see the #calendar endpoint) |

{% tabs %}
{% tab title="200 Webhook successfully created" %}

```
{
  "id": 1234,
  "calendar_id": 12,
  "user_id": 23,
  "url": "https://datelist.io/webhooks/12345",
  "created_at": "2021-06-15T12:31:25.652Z",
  "updated_at": "2021-06-15T12:31:25.652Z",
}

```

{% endtab %}
{% endtabs %}
