> For the complete documentation index, see [llms.txt](https://docs.emaillabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emaillabs.io/en/account/settings/webhooks/webhook-configuration.md).

# Webhook Configuration

Choose the channel and event type you want to configure, then fill in the required fields.

<figure><img src="/files/DKXgl3d1L2Nu9GjXXqKm" alt=""><figcaption></figcaption></figure>

* **URL** - Enter the endpoint (URL) where EmailLabs servers will send the data.
* **Secondary URL (optional)** - This is a backup URL. If the main URL is unavailable or returns an error, the webhook will be sent to this backup addresses.
* **Retry rule** - Choose your preferred notification frequency:
  * **Option 1**: every 1 hour, every 6 hours, every 24 hours.
  * **Option 2:** every 30 minutes, every 2 hours, every 24 hours.
* **Authentication mode:**
  * **None** - No additional authentication.
  * **Basic auth** - If this option is activated, provide the username and password that will be used to authorize the webhook. You should also configure these credentials in the authorization settings of your endpoint.

{% hint style="info" %}
Regardless of the chosen mode, it is always recommended to verify the integrity of the incoming webhook’s hash.
{% endhint %}

#### Important Note for Transactional Emails&#x20;

If you want to receive events split by subaccounts for delivery reports, check the ‘Broken-down by sub-accounts’ checkbox.

<figure><img src="/files/HPNt2VwQOq7ratp95Wup" alt=""><figcaption></figcaption></figure>

Always use a unique `message_id` when sending emails. This allows for the aggregation of all webhooks with subsequent statuses.

* After preparing your script to receive the data, use the ‘Test’ option to check if your script is correctly receiving the data. Webhook settings will only be saved after a successful test.&#x20;
* Ensure that your endpoint returns `HTTP/1.1 200 OK`, which confirms the correct receipt of data.
* 'Generate a SecretKey', which is a unique string used to protect the transmitted data and enhance security.
* Once everything is configured and the test passes successfully, click 'Save' to apply the settings.
