---
title: "Export all webhook events"
method: POST
path: "/webhooks/export"
tags: ["Webhooks"]
---

# Export all webhook events

`POST /webhooks/export`

This endpoint will submit a request to get the history of webhooks in the CSV file. The link to download the CSV file will be sent to the webhook that was provided in the notifyURL.

## Request body

- ExportWebhooksHistory
  - `days` integer — Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_
  - `startDate` string — Mandatory if endDate is used. Starting date of the history (YYYY-MM-DD). Must be lower than equal to endDate
  - `endDate` string — Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
  - `sort` string — Sorting order of records (asc or desc)
  - `type` 'transactional' | 'marketing', required — Filter the history based on webhook type
  - `event` 'invalid_parameter' | 'missing_parameter' | 'hardBounce' | 'softBounce' | 'delivered' | 'spam' | 'request' | 'opened' | 'click' | 'invalid' | 'deferred' | 'blocked' | 'unsubscribed' | 'error' | 'uniqueOpened' | 'loadedByProxy' | 'allEvents', required — Filter the history for a specific event type
  - `notifyURL` string, required — Webhook URL to receive CSV file link
  - `webhookId` integer — Filter the history for a specific webhook id
  - `email` string — Filter the history for a specific email
  - `messageId` integer — Filter the history for a specific message id. Applicable only for transactional webhooks.

## Response `202`

Request accepted

- CreatedProcessId
  - `processId` integer, required — Id of the process created

## Other responses

- `400` — bad request

---

[API](https://skmtc.net/getbrevo/apis/brevo-api.md) · [All operations](https://skmtc.net/getbrevo/apis/brevo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbrevo/brevo-api/revisions/2aec3cf66501/schema)
