Weekly event exports

Export raw transactional event data for analytics
View as Markdown

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 nameevent parameter valueDocumentation
SentrequestSent
ClickedclickClicked
DeferreddeferredDeferred
DelivereddeliveredDelivered
Soft BouncedsoftBounceSoft Bounced
SpamspamSpam
First OpeninguniqueOpenedFirst Opening
Hard BouncedhardBounceHard Bounced
OpenedopenedOpened
Invalid EmailinvalidInvalid Email
BlockedblockedBlocked
ErrorerrorError
UnsubscribedunsubscribedUnsubscribed
Proxy OpenloadedByProxyProxy Open
All eventsallEventsFetches all events for the specified time period

The second column is the exact value to pass in the event request parameter below — it does not always match the field name shown in the webhook payload documentation linked in the third column.

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

"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.

{
"processId": 1843555083931176858
}

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.

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

CSV format

The exported CSV file contains the following columns:

date,email,event,id,message-id,reason,sending_ip,subject,tag,tags,template_id,ts,ts_epoch,ts_event,X-Mailin-custom,link,s_returnpath
2023-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.

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

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