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
  • Introduction
    • Getting started
  • Email API
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
      • GETGet all the contacts
      • POSTCreate a contact
      • POSTCreate Contact via DOI (Double-Opt-In) Flow
      • GETGet a contact's details
      • DELDelete a contact
      • PUTUpdate a contact
      • GETGet email campaigns' statistics for a contact
      • GETGet all the segments
      • POSTExport contacts
      • POSTImport contacts
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
  • Sales CRM
  • Conversations
  • Ecommerce
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
Contact ManagementContacts

Export contacts

POST
https://api.brevo.com/v3/contacts/export
POST
/v3/contacts/export
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.contacts.requestContactExport({});
8}
9main();
1{
2 "processId": 78
3}
It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.
Was this page helpful?
Previous

Import contacts

Next
Built with

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Request

Values to request a contact export
customContactFilterobjectRequired
Set the filter for the contacts to be exported.
disableNotificationbooleanOptionalDefaults to false

To avoid generating the email notification upon contact export, pass true

exportAttributeslist of stringsOptional

List of all the attributes that you want to export. **These attributes must be present in your contact database. It is required if exportMandatoryAttributes is set false. ** For example: [‘fname’, ‘lname’, ‘email’]

exportMandatoryAttributesbooleanOptionalDefaults to true

To export mandatory attributes like EMAIL, ADDED_TIME, MODIFIED_TIME

exportMetadatalist of stringsOptional

Export metadata of contacts such as _listIds, ADDED_TIME, MODIFIED_TIME.

exportDateInUTCbooleanOptionalDefaults to false
Specifies whether the date fields createdAt, modifiedAt in the exported data should be returned in UTC format.
exportSubscriptionStatuslist of stringsOptional

Export subscription status of contacts for email & sms marketting. Pass email_marketing to obtain the marketing email subscription status & sms_marketing to retrieve the marketing SMS status of the contact.

notifyUrlstringOptionalformat: "url"
Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479

Response

process id created
processIdlong
Id of the process created

Errors

400
Bad Request Error
429
Too Many Requests Error

Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479