Export data
Generates a spreadsheet with the records of one type and returns its download URL. Large exports can take a while; keep the request open until it answers.
Endpoint
POST/export-data
Body
| Name | Type | Required | Description |
|---|---|---|---|
organization_id | integer | Yes | Organization to export from. The API key's user must be an owner or admin of it. |
type | string | Yes | One of the export types. |
view_id | integer | No | contacts, companies, deals: export only the records of this saved view. Takes precedence over the other filters. |
contact_ids | integer[] | No | contacts: export only these contacts. |
company_ids | integer[] | No | companies: export only these companies. |
deal_ids | integer[] | No | deals: export only these deals. |
product_ids | integer[] | No | products: export only these products. |
filter | object | No | contacts: any of searchTerm (name or email), company_id, system_type, owned_by_user_id, tag_ids. companies: searchTerm (name). |
searchQuery | string | No | companies, products: name search. |
done | boolean | No | activities: only done or pending activities. |
assigned_to_user_id | integer | No | activities: only activities assigned to this user. |
status | string | No | products: only products with this status (all for every status). |
category_filter | integer | string | No | products: category ID, 0 for products without category, all for every category. |
include_variants | boolean | No | products: include product variants. Default false. |
campaign_segment_id | integer | For campaign-segment-contacts | Segment to export. |
campaign_id | integer | For whatsapp-campaign-messages | WhatsApp campaign to export. |
analytics_ai_conversations_job_id | integer | For analytics-ai-conversations-job-result | Analysis job to export. |
Without filters, every record of the type in the organization is exported.
Request
Response
json
Errors
Validation errors of this endpoint are returned as 500 with a descriptive message:
| Message | When |
|---|---|
Organization ID is required | organization_id is missing. |
Only organization owners and admins can export data | The key's user is a member. |
You do not have permission to export data from this organization | The key's user does not belong to the organization. |
Campaign segment ID is required for this export type (and similar) | A required ID for the chosen type is missing. |
Cannot export more than 1000000 ... | Too many records. |
Report an issue with this documentation
Please log in to report issues with our documentation.