> For the complete documentation index, see [llms.txt](https://chekin.gitbook.io/chekin-public-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chekin.gitbook.io/chekin-public-api/api-reference/webhooks/subscribe-webhook.md).

# Subscribe Webhook

<mark style="color:green;">`POST`</mark> `/webhooks/bulk-subscribe/`

The "Subscribe Webhook" endpoint allows you to subscribe to specific events within our system. By subscribing, you will receive real-time notifications sent to a URL you specify whenever the events occur. This is useful for automating processes, staying informed about changes, and integrating our system's events with your own applications.

### **Key Capabilities**

* **Event Subscription**: Subscribe to specific events such as the creation of guests.
* **Real-Time Updates**: Receive instant notifications as soon as the events happen.
* **Customizable Target**: Define the URL where the notifications should be sent.
* **Event Filtering**: Choose only the events that are relevant to your application.

### **How to Use**

1. **Set Up the Subscription**: Send a POST request to our webhook subscription endpoint with the necessary parameters. "target" and "event"
2. **Handle Notifications**: Ensure your specified URL is capable of handling the incoming POST requests.
3. **Process Events**: Utilize the event data sent to your URL to trigger actions in your application. :wink:

### **Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `JWT <token>`      |

### **Body**

<table><thead><tr><th width="161">Name</th><th width="150">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>events</code></td><td>array</td><td><ul><li><code>PoliceAccount.connected</code></li><li><code>PoliceAccount.disconnected</code></li><li><code>PoliceAccount.updated</code></li><li><code>StatAccount.connected</code></li><li><code>StatAccount.disconnected</code></li><li><code>StatAccount.updated</code></li><li><code>PoliceRegistration.created</code></li><li><code>PoliceRegistration.updated</code></li><li><code>PoliceRegistration.deleted</code></li><li><code>PoliceRegistration.scheduled</code></li><li><code>PoliceRegistration.progress</code></li><li><code>PoliceRegistration.complete</code></li><li><code>PoliceRegistration.error</code></li><li><code>PoliceRegistration.retry_error</code></li><li><code>StatRegistration.created</code></li><li><code>StatRegistration.updated</code></li><li><code>StatRegistration.deleted</code></li><li><code>StatRegistration.scheduled</code></li><li><code>StatRegistration.progress</code></li><li><code>StatRegistration.complete</code></li><li><code>StatRegistration.error</code></li><li><code>Guest.created</code></li><li><code>Guest.updated</code></li><li><code>Guest.deleted</code></li><li><code>Reservation.updated</code></li><li><code>Reservation.guest_registration_status.updated</code></li><li><code>Housing.identity_verification.activated</code></li><li><code>Housing.identity_verification.deactivated</code></li><li><code>Housing.remote_access.activated</code></li><li><code>Housing.remote_access.deactivated</code></li><li><code>Housing.guidebook.activated</code></li><li><code>Housing.guidebook.deactivated</code></li></ul></td></tr><tr><td><code>target</code></td><td>string</td><td>URL where to receive the webhooks</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="Request Body" %}

```json
{
    "events": [
        "Guest.created",
        "Reservation.updated",
        ...
    ],
    "target": "__YOUR_URL__"
}
```

{% endtab %}

{% tab title="Response" %}

```json
[
    {
        "id": "af89ac4a3f8946ec9403b3ff59270d6f",
        "event": "Guest.created",
        "target": "__YOUR_URL__",
        "housing_id": null,
        "whitelist": []
    },
    {
        "id": "5b1ccc9f2ad74f95b83891641eb5e397",
        "event": "Reservation.updated",
        "target": "__YOUR_URL__",
        "housing_id": null,
        "whitelist": []
    },
    ...
]
```

{% endtab %}
{% endtabs %}
