# Webhook

Rental Cover provides webhooks that partners can register and listen to, in order to receive automatic updates regarding bookings. For example, information about booking cancellations.

To manage webhooks, you can inform your Client Solution Engineer (CSE) from Rentalcover and configure webhook events.

To process webhooks, you need to:

1. [Expose an endpoint on your server.](#expose-an-endpoint-on-your-server)
2. [Set up webhooks in the RC backend](#set-up-webhooks-in-your-customer-area)
3. [Accept webhook events.](#accept-webhooks)

***

### Step 1: Expose an endpoint on your server <a href="#expose-an-endpoint-on-your-server" id="expose-an-endpoint-on-your-server"></a>

Webhooks are HTTP callbacks sent to an endpoint on your server.

To receive webhook events, you need a server that has the following:

* An endpoint that can receive an HTTP POST request.

### Step 2: Set up webhooks and events <a href="#set-up-webhooks-in-your-customer-area" id="set-up-webhooks-in-your-customer-area"></a>

In the RC backend, the admin can configure the endpoint that maps to the webhook event.

Available Events: **booking.cancelled**, **booking.created**, **booking.updated**.

### Step 3: Accept webhooks <a href="#accept-webhooks" id="accept-webhooks"></a>

When we deliver a webhook event to your server:

1. Verify the HMAC signature included in the request header\
   This confirms that the webhook event was sent by Rentalcover and remained unaltered during transmission. For more details, refer to [Authentication](/rentalcover/webhook/hmac-verification.md). If the HMAC signature is invalid, we do not recommend acknowledging the webhook event.
2. Acknowledge the webhook event with a [successful HTTP response status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#successful_responses), Eg. 200 for successful. In an instance of error, we recommend responding with an appropriate [error HTTP response status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses).

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://partner-docs.covergenius.com/rentalcover/webhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
