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

MethodPathDescription
POST/export-dataExport data

Only organization owners and admins can export: the API key's user must have one of those roles in organization_id.

Export types

typeWhat is exportedExtra body fields
contactsContacts 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
companiesCompanies with owner, creator, tags, contact count and custom fields (.xlsx).view_id, filter, company_ids, searchQuery
dealsDeals with pipeline, stage, contact, company and custom fields (.xlsx).view_id, deal_ids
activitiesActivities (.xlsx).done, assigned_to_user_id
productsProducts of the catalog (.xlsx).product_ids, status, category_filter, searchQuery, include_variants
campaign-segment-contactsContacts that match a campaign segment.campaign_segment_id (required)
whatsapp-campaign-messagesMessages of a WhatsApp campaign and their delivery status.campaign_id (required)
analytics-ai-conversations-job-resultResults 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

FieldTypeDescription
successbooleantrue when the file was generated and uploaded.
totalintegerRecords that matched the export.
exportedintegerRecords written to the file.
formatstringcontacts only: xlsx or csv.
fileUrlstringDownload URL of the generated file.
segment_namestringcampaign-segment-contacts only: name of the segment.
segment_channelstringcampaign-segment-contacts only: channel of the segment.
campaign_namestringwhatsapp-campaign-messages only: name of the campaign.
campaign_statusstringwhatsapp-campaign-messages only: status of the campaign.

Related

Report an issue with this documentation

Please log in to report issues with our documentation.