Email SupportCall Us Go to Close

Exports


This endpoint can be used to export data out of Close.

Export leads, opportunities, or contacts, based on a lead search query.

POST /export/lead/

You will receive a link to the generated file via email once the export is done.

The exported file is GZIP compressed to make your download and our upload faster. The content-encoding HTTP header will be set to gzip and the content-type HTTP header will be set to text/csv for CSV exports or application/json for JSON exports.

Parameters:

  • s_query/results_limit/sort (optional) - The Advanced Filtering API parameters used to narrow the exported results down. By default, all leads are exported.
  • format - Format of the exported file. The choices are: csv, json. JSON is recommended for raw backups or data migrations.
  • type - Type of the export.
    • leads - For CSV exports, it results in one row per lead. For JSON exports, this is the recommended type and is a superset of the other two types.
    • contacts - For CSV exports, it results in one row per contact.
    • lead_opps - For CSV exports, it results in one row per opportunity.
  • fields (optional) - By default we return all the data fields in each export type. If you only need specific fields exported, you can explicitly list them in fields to get smaller exports.
  • include_activities (optional) - Activities aren't included in any exports by default. If you want all your Activities exported as well, pass "include_activities": true. Note: this only works for leads type with json format.
  • include_smart_fields (optional) - Smart Fields aren't included in any exports by default. If you want all of them exported as well, pass "include_smart_fields": true. Note: this only works for leads type with json format or any type formatted as csv. Smart fields are calculated fields, like number of emails on a lead.
  • send_done_email - Set to false if you don't want to get a confirmation email after the bulk action is done.

Export opportunities, based on opportunity filters.

POST /export/opportunity/

Parameters:

  • params (optional) - A dictionary of filters, which would be used for the /opportunity/ endpoint.
  • format - Format of the exported file. The choices are: csv, json.
  • fields (optional) - By default we return all the data fields. If you only need specific fields exported, you can explicitly list them in fields to get smaller exports.
  • send_done_email - Set to false if you don't want to get a confirmation email after the bulk action is done.

Get a single Export

GET /export/{id}/

You can get a single export to do things like check its status or get a download_url

  • status can have one of these values: created, started, in_progress, done, error.

List all the exports.

GET /export/