> 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/simulating-webhook-events.md).

# Simulating Webhook Events

## Overview

Webhooks events can be simulated to validate Webhooks are functioning correctly. To simulate a webhook event simply provide the webhook ID in the request path and identifier in the POST body. This action will lookup the object, modify the relative fields, and POST it to the remote endpoint associated with your webhook.

{% hint style="info" %}
In order to receive a webhook, You must already be subscribed to said webhook before simulating it.
{% endhint %}

## Performing Simulations

Webhook event simulations can be initiated through the REST API by performing the following request.

See our [API Reference](/api-reference/events/webhook-events/simulate-webhook-event.md) for a full description of the below call.

{% hint style="info" %}
Update the body with related property, order related webhooks require `order_id`, offer related webhooks require `offer_id`, collection related webhooks require `collection_id` and merchant related webhooks require `merchant_id`.
{% endhint %}

```bash
curl -X POST https://sandbox-api.violet.io/v1/apps/{app_id}/webhooks/{webhook_id}/simulate \
-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 '{"order_id": 9999}'
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.violet.io/prism/webhooks/simulating-webhook-events.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
