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

# Retrieving Webhook Events

## Overview

Webhook events contain details and bodies of webhooks sent in the past 30 days.

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

## Retrieving List of Event Types

You can fetch a list of all event types available at Violet by performing the following request.

```bash
curl GET https://sandbox-api.violet.io/v1/events/webhooks/event/types \
-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"
```

## Retrieving Events for All Webhooks

You can fetch all events for all webhook that belong to your app.

```bash
curl GET https://sandbox-api.violet.io/v1/events/webhooks/all/events?page=1&size=25 \
-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"
```

## Retrieving Events for a Webhook

You can fetch all events for a specific webhook.

```bash
curl GET https://sandbox-api.violet.io/v1/events/webhooks/{webhook_id}/events?page=1&size=25 \
-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"
```

## Retrieving a Single Event for a Webhook

You can fetch an event from a specific webhook given its id.

```bash
curl GET https://sandbox-api.violet.io/v1/events/webhooks/{webhook_id}/events/{event_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"
```

## Retrieving a Single Event Body for a Webhook

You can fetch an event body from a specific webhook given its id.

```bash
curl GET https://sandbox-api.violet.io/v1/events/webhooks/{webhook_id}/events/{event_id}/body \
-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"
```

## Retrieving a Single Event Headers for a Webhook

You can fetch the headers that were sent for a specific webhook event by using the combination of webhook and event IDs.

```bash
curl GET https://sandbox-api.violet.io/v1/events/webhooks/{webhook_id}/events/{event_id}/headers \
-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 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/retrieving-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.
