> For the complete documentation index, see [llms.txt](https://docs.violetlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.violetlabs.com/features/api/outbound-webhooks.md).

# Outbound Webhooks

Have Violet call your HTTPS endpoint when the entities you care about change.

With outbound webhooks, your systems learn about changes as they happen instead of polling the [Violet API](https://docs.violetlabs.com/features/api.md).

Each request is a signed, batched JSON POST request that carries ids only: which entity changed, how, and in which integration. Your receiver then reads the details it needs through the API with an [API key](https://docs.violetlabs.com/features/api/generate-an-api-key.md).

There are two ways to choose what a webhook watches:

* **Linked to an exploration (recommended).** A saved exploration from the [Data Explorer](https://docs.violetlabs.com/features/data-explorer.md) decides which entities count, live: its saved filters and search pick the entities, and its columns are the watched properties unless you customize them.
* **Manual.** Pick the entity types to watch in each integration, and optionally the properties to watch per type.

**Who can use it.** Webhooks are tenant-wide and managed by tenant admins, in the app or through the API with an admin user's API key.

## Quick start

You can go from nothing to a verified test delivery in five steps. You need admin access in Violet and somewhere to run an HTTPS endpoint.

1. **Run a receiver.** It accepts POST requests, checks the signature against the raw body, and answers with a 2xx within 10 seconds. Here is a minimal Node.js version. It uses the verify function from [Verify signatures](https://docs.violetlabs.com/features/api/outbound-webhooks/verify-signatures.md):

   ```javascript
   import express from 'express';
   import { verify } from './verify.js'; // the function under "Verify signatures"

   const app = express();
   const secret = process.env.VIOLET_WEBHOOK_SECRET;

   app.post('/hooks/violet', express.raw({ type: 'application/json' }), (req, res) => {
     const rawBody = req.body.toString('utf8');
     if (!verify(rawBody, req.get('Violet-Signature') ?? '', secret)) {
       return res.sendStatus(401);
     }
     res.sendStatus(204); // acknowledge within 10 seconds, then do the work
     const { events } = JSON.parse(rawBody);
     for (const event of events) {
       console.log(event.type, event.entityId ?? ''); // dedupe by eventId, then read the entity
     }
   });

   app.listen(3000);
   ```
2. **Create the webhook.** In Violet, open **Webhooks › Outbound** from the menu under your name and click **Create outbound webhook**. Enter a name and your endpoint's HTTPS URL, choose **Link an exploration** and pick a saved exploration, keep the default events, and click **Create webhook**. Details are in [Set up a webhook](https://docs.violetlabs.com/features/api/outbound-webhooks/set-up-a-webhook.md).
3. **Save the signing secret.** Copy the secret Violet shows into your receiver's configuration, here `VIOLET_WEBHOOK_SECRET`. It is shown only once.
4. **Send a test.** In the webhook's kebab menu (**⋮**), click **Send test**. Your receiver logs a ping event (`subscription.ping`), and **View deliveries** shows the request as **Delivered**.
5. **Load your starting set.** Linking sends no events for entities that already match. Page through them once with `POST /api/explore/{explorationId}/results`, as in [Resync a linked webhook](https://docs.violetlabs.com/features/api/outbound-webhooks/delivery-and-retries.md#resync-a-linked-webhook). From then on, each event names an entity to read with the [Entities endpoint](https://docs.violetlabs.com/features/api/endpoints/entities.md).

## In this section

* [Set up a webhook](https://docs.violetlabs.com/features/api/outbound-webhooks/set-up-a-webhook.md)
* [Events and payloads](https://docs.violetlabs.com/features/api/outbound-webhooks/events-and-payloads.md)
* [Verify signatures](https://docs.violetlabs.com/features/api/outbound-webhooks/verify-signatures.md)
* [Delivery and retries](https://docs.violetlabs.com/features/api/outbound-webhooks/delivery-and-retries.md)
* [Manage and monitor](https://docs.violetlabs.com/features/api/outbound-webhooks/manage-and-monitor.md)
* [Payload reference](https://docs.violetlabs.com/features/api/outbound-webhooks/payload-reference)
* [OpenAPI spec](https://docs.violetlabs.com/features/api/outbound-webhooks/openapi-spec.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.violetlabs.com/features/api/outbound-webhooks.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
