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

NameTypeRequiredDescription
organization_idintegerYesOrganization to export from. The API key's user must be an owner or admin of it.
typestringYesOne of the export types.
view_idintegerNocontacts, companies, deals: export only the records of this saved view. Takes precedence over the other filters.
contact_idsinteger[]Nocontacts: export only these contacts.
company_idsinteger[]Nocompanies: export only these companies.
deal_idsinteger[]Nodeals: export only these deals.
product_idsinteger[]Noproducts: export only these products.
filterobjectNocontacts: any of searchTerm (name or email), company_id, system_type, owned_by_user_id, tag_ids. companies: searchTerm (name).
searchQuerystringNocompanies, products: name search.
donebooleanNoactivities: only done or pending activities.
assigned_to_user_idintegerNoactivities: only activities assigned to this user.
statusstringNoproducts: only products with this status (all for every status).
category_filterinteger | stringNoproducts: category ID, 0 for products without category, all for every category.
include_variantsbooleanNoproducts: include product variants. Default false.
campaign_segment_idintegerFor campaign-segment-contactsSegment to export.
campaign_idintegerFor whatsapp-campaign-messagesWhatsApp campaign to export.
analytics_ai_conversations_job_idintegerFor analytics-ai-conversations-job-resultAnalysis 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:

MessageWhen
Organization ID is requiredorganization_id is missing.
Only organization owners and admins can export dataThe key's user is a member.
You do not have permission to export data from this organizationThe 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.