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

# Managing Webhooks

## Overview

You can use Webhooks to subscribe to near real-time updates from Violet.

{% hint style="info" %}
We use the phrase near real time to describe the fact that under normal conditions, a violet webhook will be generated within seconds of an update within an ecom platform. However, this is not guaranteed; Shopify for example says they can take up to 10 minutes to send us the update webhook. Then on top of that, depending on our own system load, we can take a number of minutes to process it on our side before ending with sending out our own webhook to you. So while normally you will see updates coming through fairly quickly there are definitely known scenarios where it can take 10-15 minutes before the webhook ends up going out. Please note that is not a hard upper bound, just and example of how long it could take when our systems are under load.

Therefore, Violet webhooks are not strictly real time, and instead have a small but variable time delay between an update in an e-commerce platform and the webhook delivery to your servers.
{% endhint %}

See our [API Reference](/api-reference/events/webhooks/get-webhooks.md) for a full description of each of the below calls.

## Creating Webhooks

Webhooks can be created through the REST API by performing the following request.

```bash
curl -X POST https://sandbox-api.violet.io/v1/events/webhooks \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json" \
-d '{"event": "ORDER_SHIPPED", "remote_endpoint": "https://example.com/events/order_shipped"}'
```

## Retrieving a List of Webhooks

A list of your apps existing webhooks can be obtained through the REST API by performing the following request.

```bash
curl GET https://sandbox-api.violet.io/v1/events/webhooks \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json"
```

## Retrieve a Single Webhook

A single webhook that belongs to your app can be obtained through the REST API by performing the following request.

```bash
curl GET https://sandbox-api.violet.io/v1/events/webhooks/{webhook_id} \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json"
```

## Modifying Webhooks

Webhooks can be modified through the REST API by performing the following request.

```bash
curl -X PUT https://sandbox-api.violet.io/v1/events/webhooks/{webhook_id} \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json" \
-d '{"event": "ORDER_SHIPPED", "remote_endpoint": "https://example.com/events/order_shipped", "status": "ACTIVE"}'
```

## Updating All Webhooks Status

Webhooks Status can be modified through the REST API by performing the following request.

```bash
curl -X PUT https://sandbox-api.violet.io/v1/events/webhooks/status/{status} \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json"
```

## Removing Webhooks

Webhooks can be removed through the REST API by performing the following request.

```bash
curl -X DELETE https://sandbox-api.violet.io/v1/events/webhooks/{webhook_id} \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json"
```


---

# 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.violet.io/prism/webhooks/managing-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.
