# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
