Export data
Exports records of your organization (contacts, companies, deals, activities, products, campaign results) to a spreadsheet file. The export runs while the request is open and the response contains a fileUrl to download the file. Nothing is stored as an "export" record: this resource only has a create action.
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /export-data | Export data |
Only organization owners and admins can export: the API key's user must have one of those roles in organization_id.
Export types
type | What is exported | Extra body fields |
|---|---|---|
contacts | Contacts with their main fields, tags, owner, company and one cf_<key> column per contact custom field. Files with more than 10,000 rows are CSV; smaller ones are Excel (.xlsx). | view_id, filter, contact_ids |
companies | Companies with owner, creator, tags, contact count and custom fields (.xlsx). | view_id, filter, company_ids, searchQuery |
deals | Deals with pipeline, stage, contact, company and custom fields (.xlsx). | view_id, deal_ids |
activities | Activities (.xlsx). | done, assigned_to_user_id |
products | Products of the catalog (.xlsx). | product_ids, status, category_filter, searchQuery, include_variants |
campaign-segment-contacts | Contacts that match a campaign segment. | campaign_segment_id (required) |
whatsapp-campaign-messages | Messages of a WhatsApp campaign and their delivery status. | campaign_id (required) |
analytics-ai-conversations-job-result | Results of an AI conversation analysis job. | analytics_ai_conversations_job_id (required) |
Exports are limited to 1,000,000 records. Deleted records are never exported.
The export result
json
Fields
| Field | Type | Description |
|---|---|---|
success | boolean | true when the file was generated and uploaded. |
total | integer | Records that matched the export. |
exported | integer | Records written to the file. |
format | string | contacts only: xlsx or csv. |
fileUrl | string | Download URL of the generated file. |
segment_name | string | campaign-segment-contacts only: name of the segment. |
segment_channel | string | campaign-segment-contacts only: channel of the segment. |
campaign_name | string | whatsapp-campaign-messages only: name of the campaign. |
campaign_status | string | whatsapp-campaign-messages only: status of the campaign. |
Related
Report an issue with this documentation
Please log in to report issues with our documentation.