# Webhook

## Introduction

Webhooks provide a mechanism for receiving real-time notifications about specific events, such as chat creations, messages received, and analytics generated. by adding your desired URL and other required fields via the "+ Add Webhook" button, you can start receiving event notifications. the provided URL will be called every time the specified event occurs.

### *Required values to create a webhook:*

1. **URL**: The destination URL where you want to receive the event notifications.
2. **Webhook name**: A unique identifier for the webhook.
3. **Secret**: A robust secret key will be sent with the event call to verify the authenticity of the webhook call, ensuring it is always from `Caleida`.
4. **Events**: The specific events for which you want to receive notifications, such as chat creations, messages received, and analytics generated.

### *Supported events:*

1. **`chat`**: Triggered when a new chat is created.
2. **`message`**: Triggered when a new message is created.
3. **`insight.summary`**: Triggered when a summary insight is generated.
4. **`insight.topic`**: Triggered when a topic insight is generated.
5. **`insight.key`**: Triggered when a key insight is generated.
6. **`insight.conversation`**: Triggered when a conversation insight is generated.
7. **`insight.sentiment`**: Triggered when a sentiment insight is generated.

## Steps to add a webhook:

1. **Navigate to the webhooks section**: Go to the webhooks section (`integrations/webhook`) in the `Caleida` dashboard.
2. **Add webhook**: Click on the "+ Add Webhook" button.
3. **Enter the required information**: Fill in the required fields including the URL, webhook name, secret, and select the events you want to subscribe to.
4. **Save**: Click the add button to activate the webhook.

<figure><img src="https://2644172801-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2NBwdwy5L4sWk0DohX6%2Fuploads%2FJCY5sIfsmliBEWINTXP6%2FUntitled.png?alt=media&#x26;token=27aca91d-355f-4669-b531-d6288165a676" alt=""><figcaption></figcaption></figure>

#### Edit or delete a webhook:

By clicking on any list item in the webhook list, the edit modal will open. from there, you can edit or delete the webhook.

#### Steps to edit a webhook:

1. **Open the edit modal**: Click on the desired webhook from the webhook list to open the edit modal.
2. **Modify webhook details**: Update the necessary fields such as the URL, webhook name, secret, or events.
3. **Save changes**: Click the save button to apply the changes.

<figure><img src="https://2644172801-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2NBwdwy5L4sWk0DohX6%2Fuploads%2FewqVNtJSzu6HdlkiMXiI%2FUntitled.png?alt=media&#x26;token=9f4a6651-32f1-4f8c-910c-2704db5e8b1f" alt=""><figcaption></figcaption></figure>

#### Steps to delete a webhook:

1. **Open the edit modal**: Click on the desired webhook from the webhook list to open the edit modal.
2. **Delete the webhook**: Click the delete button to remove the webhook.
3. **Confirm deletion**: Confirm the deletion to ensure that the webhook is permanently removed. once deleted, no calls will be made to that URL.

<figure><img src="https://2644172801-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2NBwdwy5L4sWk0DohX6%2Fuploads%2FKQ9csI6vQru1wNtAMACT%2FUntitled.png?alt=media&#x26;token=ec0521ed-7b7a-4326-bcdb-5bcc551b9d37" alt=""><figcaption></figcaption></figure>

#### Security considerations:

* **Secret key**: Ensure the secret key is strong and securely stored. this key is crucial for verifying the authenticity of the event calls.
* **HTTPS**: Use HTTPS for your webhook URL to ensure that data is transmitted securely.

By following this guide, you can efficiently set up webhooks to receive real-time notifications for critical events, ensuring seamless integration and timely data processing.
