Export contacts
POST/api/partner-gateway/exports/contacts
Queues an export of the contacts of your account, as a CSV file (the default) or an Excel file.
- What to export:
listIdsfor the contacts of one or more contact lists,contactIdsfor specific contacts, or neither for every contact of your account (send an empty object,{}). - Exclusions: with
listIds, or with neither,excludeContactIdsleaves those contacts out. - Format:
exportFormatisCSVorEXCEL. - The answer is
202with an empty body, so without an export ID: the job is queued, not completed. - Get the file: poll
GET /exportsevery 5-10 seconds. The export is listed only once its file is ready, already withisAvailableForDownloadtrue. Then callGET /exports/{exportId}with itsidfor the download URL. An export whose generation fails is never listed.
A regenerated export is not always the same export.
POST /exports/{exportId}does not applyexcludeContactIdsagain, and an export of specificcontactIdscomes back as an export of all your contacts. To repeat such an export exactly, call this endpoint again.
Request
Responses
- 202
- 400
- 401
- 500
Export queued. No response body.
The body is missing or invalid: listIds together with contactIds, contactIds together with excludeContactIds, or an unknown exportFormat.
The API key is missing, invalid, or lacks the EXPORTS operation.
Unexpected server error.