Weekly event exports

Export raw transactional event data for analytics

Export raw transactional event data from the past 7 days as CSV files. Use this service for high-volume accounts that need unaggregated data for analytics pipelines.

The service sends a webhook to your notify URL with a link to the generated CSV file. For large data volumes, the export is delivered as a compressed file containing multiple CSV files.

Supported events

Exports include the following transactional events:

Event nameAPI response fieldDocumentation
SentrequestsSent
ClickedclicksClicked
DeferreddeferredDeferred
DelivereddeliveredDelivered
Soft BouncedsoftBouncesSoft Bounced
ComplaintspamComplaint
First Openingunique_openedFirst Opening
Hard BouncedhardBouncesHard Bounced
OpenedopenedOpened
Invalid EmailinvalidInvalid Email
BlockedblockedBlocked
ErrorerrorError
UnsubscribedunsubscribedUnsubscribed
Proxy OpenloadedByProxyProxy Open
All eventsallEventsFetches all events for the specified time period

Event name mappings between guides and API responses. See Get personalized content of a sent Transactional email for reference.

Define a notify URL

Create a notify URL endpoint that receives the webhook with the CSV file link. The endpoint must return success to confirm receipt. Export data persists for 7 days.

Example notify URL response

1"success"

Create an export job

Call the Export all transactional events endpoint to create an export job. This example exports all events from the past 7 days. You can filter by specific event types.

$curl --request POST \
> --url https://api.brevo.com/v3/webhooks/export \
> --header 'accept: application/json' \
> --header 'content-type: application/json' \
> --header 'api-key: YOUR_API_KEY' \
> --data '{
> "event": "allEvents",
> "type": "transactional",
> "days": 7,
> "notifyURL": "https://your-domain.com/webhook-export"
>}'

Response

The API returns a processId to track the export job status. Use the Get process details endpoint to check progress.

1{
2 "processId": 1843555083931176858
3}

Receive export data

When the export job completes, your notify URL receives a webhook with the file location. Download the file promptly—export URLs expire after a set period.

1{
2 "url": "https://webhooks-export.brevo.com/webhook-export-2036548-1680071958.zip?Expires=1680075559&KeyName=webhooks-export-cdn&Signature=sop8E-xYkUd8keGKb60CcIaPp0c=",
3 "process_id": 1843555083931176858
4}

CSV format

The exported CSV file contains the following columns:

1date,email,event,id,message-id,reason,sending_ip,subject,tag,tags,template_id,ts,ts_epoch,ts_event,X-Mailin-custom,link,s_returnpath
22023-03-15 11:09:22 +0000 UTC,user@example.com,spam,13997,<202302241202.77117841982@smtp-relay.mailin.fr>,sent,127.0.0.1,Test Subject,,"[""testTag1"",""testTag2""]",45678,1676545042,1676534500,1676545042,TEST-X-Mailin-custom,https://brevo.com,false

Check export status

Query the export job status using the processId from the response. Call the Get process details endpoint.

1{
2 "id": 1843555083931176858,
3 "status": "completed",
4 "name": "EXPORT_TRANSACTIONAL",
5 "export_url": "https://webhooks-export.brevo.com/webhook-export-2036548-1680071958.zip?Expires=1680075559&KeyName=webhooks-export-cdn&Signature=sop8E-xYkUd8keGKb60CcIaPp0c="
6}

Maximum 20 export jobs per 7-day period. Large data volumes are delivered as compressed files containing multiple CSV files.