For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Getting started
    • Overview
    • Quickstart
    • Authentication
    • Rate limits
  • Messaging API
    • Send transactional email
    • Send transactional SMS
    • Send transactional WhatsApp
  • Marketing Platform
    • Manage your contacts
    • Track website activity
    • Send WhatsApp campaigns
    • Weekly event exports
  • Webhooks
    • Getting started
    • Conversations webhooks
    • Payment webhooks
    • Marketing webhooks
    • Transactional webhooks
    • Loyalty webhooks
    • Batched webhooks
    • Secure webhook calls
    • Meetings and phone webhooks
    • Push notification webhooks
    • Sales CRM webhooks
  • Conversations
    • Getting started
    • Customize the chat widget
    • JavaScript API reference
    • REST API reference
    • Conversations webhooks
  • eCommerce
    • Activate eCommerce app
    • Manage product categories
    • Manage products
    • Manage orders
    • Coupon collections
    • eCommerce tracker events
  • Loyalty
    • Overview
    • Set up a program
    • Enroll members
    • Credit & debit points
    • Read member data
    • Best practices
  • Custom Objects
    • Custom objects management
  • Brevo tracker and events
    • Getting started
    • JavaScript implementation
    • REST implementation
    • Legacy tracker documentation
    • Events
  • Accounts and settings
    • Senders and domains
    • User activity logs
    • External feeds
    • Invited users
LogoLogo
Help CenterAPI KeysStatusSign In
On this page
  • Define an export notify url
  • Post a new job export
  • Response
  • Receiving the raw data on your application
  • CSV contents
  • Checking the status of an ongoing export job
Marketing Platform

Weekly event exports

Was this page helpful?
Previous

Getting started

Next
Built with
Available in
Free
Starter
Standard
Professional
Enterprise

If you have a high volume of marketing events each week, this service generates raw data exports of all webhook calls over a 7-day period. Pipe the exported raw data into your preferred analytics tools.

To use this service, open a webhook on your infrastructure to receive a link to a CSV file containing the unaggregated raw data once the export is computed. If the raw data volume is too high, you receive a compressed file with multiple CSVs.

Currently the data exports include the following events:

Event nameAPI response fieldDocumentation
Marked as SpamspamMarked as Spam
OpenedopenedOpened
ClickedclickClicked
Hard Bouncedhard_bounceHard Bounced
Soft Bouncedsoft_bounceSoft Bounced
DelivereddeliveredDelivered
UnsubscribeunsubscribeUnsubscribe
Contact Deletedcontact_deletedContact Deleted
Contact Updatedcontact_updatedContact Updated
Contact added to listlist_additionContact added to list
All eventsallEventsFetches all events for the specified time period

Define an export notify url

Create a notify URL on your side to receive the webhook call containing the information and path of the generated CSV file with your transactional raw data. The data persists for 7 days.

Example

1curl --request POST \
2 --url https://mydomain.com/importData \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json'
5
6 ------
7 ==> Returns 'success' to our servers

Post a new job export

To execute the export job, call the following endpoint:

  • Export all webhook events

This example creates a job request for allEvents registered in the past 7 days. You can also define more specific queries with additional filters.

1curl --request POST \
2 --url https://api.brevo.com/v3/webhooks/export \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '
6{
7 "event": "allEvents",
8 "type": "marketing",
9 "days": 7
10}
11'

Response

If your request is accepted, you receive a processId. Use it to track the status of the asynchronous export operation via the following endpoint:

  • Return the informations for a process
1{
2 "processId": 1843555083931176858
3}

Receiving the raw data on your application

Once the asynchronous job completes, your notifyURL receives the following payload, indicating the data is ready and uploaded to the url path below. Each data export URL has an expiry, so download the file before it is removed from our servers.

JSON
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 contents

csv
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,ankit.Balodhi@brevo.com,spam,13997,<202302241202.77117841982@smtp-relay.mailin.fr>,sent,127.0.0.1,Test Subject,,"[""testTag1"",""testTag2"",""testTag3"",""testTag4""]",45678,1676545042,1676534500,1676545042,TEST-X-Mailin-custom,https://brevo.com,false
2023-03-15 11:09:22 +0000 UTC,ankit.Balodhi@brevo.com,spam,13997,<202302241202.77117841982@smtp-relay.mailin.fr>,sent,127.0.0.1,Test Subject,,"[""testTag1"",""testTag2"",""testTag3"",""testTag4""]",45678,1676545042,1676534500,1676545042,TEST-X-Mailin-custom,https://brevo.com,false
2023-03-15 11:09:22 +0000 UTC,ankit.Balodhi@brevo.com,spam,13997,<202302241202.77117841982@smtp-relay.mailin.fr>,sent,127.0.0.1,Test Subject,,"[""testTag1"",""testTag2"",""testTag3"",""testTag4""]",45678,1676545042,1676534500,1676545042,TEST-X-Mailin-custom,https://brevo.com,false
2023-03-15 11:09:22 +0000 UTC,ankit.Balodhi@brevo.com,spam,13997,<202302241202.77117841982@smtp-relay.mailin.fr>,sent,127.0.0.1,Test Subject,,"[""testTag1"",""testTag2"",""testTag3"",""testTag4""]",45678,1676545042,1676534500,1676545042,TEST-X-Mailin-custom,https://brevo.com,false
2023-03-15 11:09:22 +0000 UTC,ankit.Balodhi@brevo.com,spam,13997,<202302241202.77117841982@smtp-relay.mailin.fr>,sent,127.0.0.1,Test Subject,,"[""testTag1"",""testTag2"",""testTag3"",""testTag4""]",45678,1676545042,1676534500,1676545042,TEST-X-Mailin-custom,https://brevo.com,false

Checking the status of an ongoing export job

Query the process_id you received in the response on the Return the informations for a process endpoint.

{
"id": 1843555083931176858,
"status": "completed",
"name": "EXPORT_MARKETING",
"export_url": "https://webhooks-export.brevo.com/webhook-export-2036548-1680071958.zip?Expires=1680075559&KeyName=webhooks-export-cdn&Signature=sop8E-xYkUd8keGKb60CcIaPp0c="
}
Limitations and quotas
  • The maximum number of exports per 7-day period is 20.
  • If the data volume is too high, you receive a compressed file with multiple CSV files. Iterate over them and upload them to your system.