> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sevalla.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

> Find out how to use Sevalla's webhooks.

Webhooks let you send real-time information from your application, database, or static site in Sevalla to another application whenever a specific event occurs. Unlike APIs, which require periodic requests to fetch data (also known as polling), webhooks automatically push data to the URL you specify.

When you create a webhook in Sevalla, we send requests to the configured endpoint for the events you select. Each request includes an svl-signature header containing the webhook’s secret. Secrets can be rotated within the webhook, and you can keep the old secret active to ensure a smooth, zero-downtime key rotation.

If a delivery fails, Sevalla automatically retries up to 12 times with progressively increasing intervals: 1 minute, 5 minutes, 10 minutes, 30 minutes, 1 hour, 2 hours, 4 hours, 8 hours, 16 hours, 1 day, 2 days, and 3 days.

For monitoring and debugging, you can view event delivery and response time charts for each webhook. Additionally, the Event Deliveries section allows you to inspect individual attempts, including full request and response details.

## Example application

The [Sevalla Discord webhook example](https://github.com/sevalla-templates/webhook-discord-example) listens for events sent by Sevalla (such as `APP_DEPLOY` or `STATIC_SITE_UPDATE`) and forwards them as notifications to a Discord channel using your Discord Webhook URL.

To use this example repository:

1. Fork the repository on GitHub.
2. [Add an application](https://docs.sevalla.com/applications/get-started/add-an-application) with the repository in Sevalla.
3. Create a [Discord webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks).
4. Create a webhook in Sevalla for the `APP_DEPLOY` event, using a dummy webhook URL to obtain the webhook secret.
5. Add the following [environment variables](https://docs.sevalla.com/applications/environment-variables)
   ```text theme={null}
   SEVALLA_WEBHOOK_SECRET=<your webhook secret>
   DISCORD_WEBHOOK_URL=<your Discord webhook URL>
   ```
6. Deploy the application. Once deployed, click **View** and copy the URL.
7. Update the webhook endpoint with the URL from the deployed application in the format: `https://your-app.sevalla.app/webhook`

The webhook will now send notifications to your Discord channel whenever an application is deployed within your Sevalla company.

## Create a webhook

To create a webhook in Sevalla, go to **Integration** > **Webhooks** > **Create webhook**.

<Frame caption="Create a new webhook in Sevalla.">
  <img className="block dark:hidden" alt="Create a new webhook in Sevalla" src="https://mintcdn.com/sevalla/r62AEJ57ir2_H543/images/create-webhook-light.png?fit=max&auto=format&n=r62AEJ57ir2_H543&q=85&s=0f8d9caa5dfdadbd8de6349dcf9e82e6" width="3376" height="1178" data-path="images/create-webhook-light.png" />

  <img className="hidden dark:block" alt="Create a new webhook in Sevalla" src="https://mintcdn.com/sevalla/r62AEJ57ir2_H543/images/create-webhook-dark.png?fit=max&auto=format&n=r62AEJ57ir2_H543&q=85&s=e7a21756e690df27b55e0e383d70a8e5" width="3372" height="1174" data-path="images/create-webhook-dark.png" />
</Frame>

Complete the details as follows:

* **Endpoint:** Enter the URL you want to send the requests to.
* **Description:** Add a description for the webhook.
* **Allowed events:** You can select all events or choose the events you want to send requests for from the following:
  * `APP_CREATE`
  * `APP_UPDATE`
  * `APP_DELETE`
  * `APP_DEPLOY`
  * `DATABASE_CREATE`
  * `DATABASE_UPDATE`
  * `DATABASE_DELETE`
  * `STATIC_SITE_CREATE`
  * `STATIC_SITE_UPDATE`
  * `STATIC_SITE_DELETE`
  * `STATIC_SITE_DEPLOY`

Click **Create webhook**.

<Frame caption="Add the webhook details.">
  <img className="block dark:hidden" alt="Add the webhook details" src="https://mintcdn.com/sevalla/gciJcTvk1NeCRAOn/images/create-webhook-details-light.png?fit=max&auto=format&n=gciJcTvk1NeCRAOn&q=85&s=ca70336ac6dfaf03133531a53f070f88" width="1186" height="1452" data-path="images/create-webhook-details-light.png" />

  <img className="hidden dark:block" alt="Add the webhook details" src="https://mintcdn.com/sevalla/gciJcTvk1NeCRAOn/images/create-webhook-details-dark.png?fit=max&auto=format&n=gciJcTvk1NeCRAOn&q=85&s=c5fa8b69908655f2c8aac8e006ee63fa" width="1192" height="1442" data-path="images/create-webhook-details-dark.png" />
</Frame>

Once the webhook is set up, you can view and update its details, monitor event deliveries and response time charts, and inspect each delivery attempt under the Event Deliveries section, including full request and response details.

<Frame caption="View and update the webhook.">
  <img className="block dark:hidden" alt="View and update the webhook" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-light.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=66a4c3e561bc1e622b8c516fca006bea" width="3052" height="1864" data-path="images/webhook-light.png" />

  <img className="hidden dark:block" alt="View and update the webhook" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-dark.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=40cb616771225533880872e749c7c341" width="3062" height="1866" data-path="images/webhook-dark.png" />
</Frame>

## Roll the webhook secret

To rotate your webhook secret, select the webhook and click **Roll secret**.

<Frame caption="Roll the secret for the webhook.">
  <img className="block dark:hidden" alt="Roll the secret for the webhook" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-roll-secret-light.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=f6aa9bd28ae8947bc541a7a316eca52f" width="3050" height="560" data-path="images/webhook-roll-secret-light.png" />

  <img className="hidden dark:block" alt="Roll the secret for the webhook" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-roll-secret-dark.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=76100b0a0f52bd629ebf426276f3350f" width="3062" height="564" data-path="images/webhook-roll-secret-dark.png" />
</Frame>

Choose when you want the old secret to expire and click **Continue**.

<Frame caption="Select the expiration time for the old secret.">
  <img className="block dark:hidden" alt="Select the expiration time for the old secret" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-roll-secret-expiration-light.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=11df1001ef976a276816012caa041cef" width="1042" height="626" data-path="images/webhook-roll-secret-expiration-light.png" />

  <img className="hidden dark:block" alt="Select the expiration time for the old secret" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-roll-secret-expiration-dark.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=9c4fb2dccb99c2ee524a9d5a633d6833" width="1054" height="634" data-path="images/webhook-roll-secret-expiration-dark.png" />
</Frame>

## Update the webhook

To change the endpoint, description, or allowed events for the webhook, click **Update**.

<Frame caption="Update the webhook details.">
  <img className="block dark:hidden" alt="Update the webhook details" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-update-light.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=fd8ad57b8ff58f227febda289fa6c156" width="3050" height="560" data-path="images/webhook-update-light.png" />

  <img className="hidden dark:block" alt="Update the webhook details" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-update-dark.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=3516c28c87ae509a77fbf0907e90d344" width="3062" height="564" data-path="images/webhook-update-dark.png" />
</Frame>

Change the required information, and then click **Update webhook**.

## Event deliveries

You can inspect each request attempt within **Event deliveries**. This shows you the individual attempt details, the request that was made, and the response details.

<Frame caption="Webhook event deliveries.">
  <img className="block dark:hidden" alt="Webhook event deliveries" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-event-deliveries-light.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=283f6670f513c18f9eae49503880f4dd" width="3052" height="1692" data-path="images/webhook-event-deliveries-light.png" />

  <img className="hidden dark:block" alt="Webhook event deliveries" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-event-deliveries-dark.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=73fc503c665edaa2502ebfd0b5a2ddc6" width="3070" height="1710" data-path="images/webhook-event-deliveries-dark.png" />
</Frame>

## Disable a webhook

To disable a webhook, within the webhook **Danger zone**, click **Disable webhook** and then click **Continue**. This stops the webhook from sending events to the endpoint. You can re-enable the webhook to start sending events again at any time.

<Frame caption="Disable the webhook.">
  <img className="block dark:hidden" alt="Disable the webhook" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-disable-light.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=eeecbc05cb41712c42bc95e6633a000d" width="2554" height="522" data-path="images/webhook-disable-light.png" />

  <img className="hidden dark:block" alt="Disable the webhook" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-disable-dark.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=96e23723e40ff9d948a8a6a50e1d4a6c" width="2564" height="526" data-path="images/webhook-disable-dark.png" />
</Frame>

## Delete a webhook

To delete a webhook, within the webhook **Danger zone**, click **Delete webhook** and then click **Continue**. This completely removes the webhook and its data. This action cannot be undone, and the data cannot be retrieved once it has been deleted.

<Frame caption="Delete the webhook.">
  <img className="block dark:hidden" alt="Delete the webhook" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-delete-light.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=b9fc69973295cb92622779eb5d3c788d" width="2554" height="522" data-path="images/webhook-delete-light.png" />

  <img className="hidden dark:block" alt="Delete the webhook" src="https://mintcdn.com/sevalla/4hHk-h-UKnWuvxvL/images/webhook-delete-dark.png?fit=max&auto=format&n=4hHk-h-UKnWuvxvL&q=85&s=93334bb05ad0c4fcba0da06922b8843d" width="2564" height="526" data-path="images/webhook-delete-dark.png" />
</Frame>
