Scope requirements
Scope requirements
Start an export
To start an export, make aPOST request to /crm/v3/exports/export/async. Your request body should specify information such as the file format, the object and properties you want to export, and the type of export you’re completing (e.g., exporting an object view or a list). You can also filter the property data to be exported based on specific operators.
For both view and list exports, you can include the following fields in your request:
Export a view
If you’re exporting an index page view, yourexportType value should be VIEW, and you can include the following field to filter and sort the records you’re exporting:
For example, to export a filtered view of contacts and their associated company records, with the internal values of property names and values, your request would look like the following:
Export a list
If you’re exporting a list, yourexportType value should be LIST, but you also need to specify the list you’re exporting with the following field:
For example, to export a list with the contacts’ emails, your request may look like the following:
Retrieve exports
When you successfully complete an export, the export’s name, the export’sid, and the number of records exported will be returned in the response. To retrieve an export from your HubSpot account, make a GET request to /crm/v3/exports/export/async/tasks/{exportId}/status.
When retrieving exports, the status of the export will also be returned. Possible statuses include COMPLETE, PENDING, PROCESSING, or CANCELED. For exports with a COMPLETE status, a URL is returned that you can use to download the exported file. The download URL will expire five minutes after the completed request. Once expired, you can perform another GET request to generate a new unique URL.
For example, the output for your request may be:
Limits
The following limits apply:- You can complete up to thirty exports within a rolling 24 hour window, and one export at a time. Additional exports will be queued until the previous export is completed.
- If you’re completing a large export, you may receive multiple files delivered in a zip file. This will occur for CSV or XLSX files with more than 1,000,000 rows and XLS files with more than 65,535 rows. CSV files are also automatically zipped if the file is greater than 2MB, even if the file has less than 1,000,000 rows.
- By default, the number of associations per row is limited to 1,000 associations. If you want to override this limit, include the
overrideAssociatedObjectsPerDefinitionPerRowLimitfield with the valuetrue.