---
title: "Webhooks"
description: "Set up webhooks to send alerts to your app, a third-party service, or wherever you want to send your data."
url: "https://www.metabase.com/docs/latest/configuring-metabase/webhooks"
version: "65"
---

> For the complete documentation index, see [llms.txt](https://www.metabase.com/docs/llms.txt).

# Webhooks

Only admins and people with [settings access](https://www.metabase.com/docs/latest/permissions/application.md#settings-access) can set up webhooks and send [alerts](https://www.metabase.com/docs/latest/questions/alerts.md) to them.

For now, webhooks are only available for [alerts](https://www.metabase.com/docs/latest/questions/alerts.md); you can't select a webhook as the recipient of a [dashboard subscription](https://www.metabase.com/docs/latest/dashboards/subscriptions.md).

## Create a webhook

_Admin > Settings > Webhooks_

Before people can send alerts to a webhook, an admin or someone with [settings access](https://www.metabase.com/docs/latest/permissions/application.md#settings-access) will need to create a webhook to target.

To create a webhook:

1. Click the **grid** icon in the top right corner and select **Admin**.
2. In the Admin console, go to **Settings > Webhooks**.
3. In **Webhooks for alerts**, click **Add a webhook**.
4. Metabase will show you a short form to fill out:

   - **Webhook URL**. Where you want Metabase to send the results of an alert. Must be a valid URL.
   - **Give it a name**. Name the webhook so that people can pick the right hook when setting up an alert on a question.
   - **Description**. Tell people what the hook is for.
   - **Authentication method**:
     - **None**: Anything goes.
     - **Basic**: Set a username and password.
     - **Bearer**: Include a [secret token](https://datatracker.ietf.org/doc/html/rfc6750).
     - **API key**: You can add the API key to the Header or as a Query param. Both approaches require a key and value (the API key itself).

## Webhook payload

Metabase will send the results of an alert in JSON. The JSON will include some metadata about the question, like the alert's creator and its ID (`null` in the case of test alerts).

Metabase will send the "attached" visualization as a base64-encoded PNG in the `data` key, under `visualization`.

![The encoded PNG chart](https://www.metabase.com/docs/latest/configuring-metabase/images/payload-chart.png)

And the data as seen in the table view, which Metabase will send as `raw_data`.

![Results as table view](https://www.metabase.com/docs/latest/configuring-metabase/images/table-view.png)

Here's an example payload for an alert (we truncated the PNG encoding because it's boring):

```JSON
{
  "type": "alert",
  "alert_id": null,
  "alert_creator_id": 2666,
  "alert_creator_name": "Roberto Bolaño",
  "data": {
    "type": "question",
    "question_id": 108,
    "question_name": "Sales",
    "question_url": "https://example.com/question/108",
    "visualization": "data:image/png;base64,=...LONG_ENCODED_PNG_HERE...",
    "raw_data": {
      "cols": [
        "CREATED_AT",
        "count"
      ],
      "rows": [
        [
          "2023-09-01T00:00:00Z",
          346
        ],
        [
          "2023-10-01T00:00:00Z",
          354
        ],
        [
          "2023-11-01T00:00:00Z",
          394
        ],
        [
          "2023-12-01T00:00:00Z",
          418
        ],
        [
          "2024-01-01T00:00:00Z",
          457
        ],
        [
          "2024-02-01T00:00:00Z",
          404
        ],
        [
          "2024-03-01T00:00:00Z",
          445
        ],
        [
          "2024-04-01T00:00:00Z",
          439
        ],
        [
          "2024-05-01T00:00:00Z",
          520
        ],
        [
          "2024-06-01T00:00:00Z",
          455
        ],
        [
          "2024-07-01T00:00:00Z",
          523
        ],
        [
          "2024-08-01T00:00:00Z",
          501
        ]
      ]
    }
  },
  "sent_at": "2024-09-30T20:16:15.76582Z"
}
```

## Further reading

- [Alerts](https://www.metabase.com/docs/latest/questions/alerts.md)
