Skip to main content
POST/api/public/exports/

Export data

You can export data from specific section (People/Deals/etc.) or campaign logs (Email deliveries/clicks or SMS deliveries) based on segment (for sections) as well as based on date of campaign sending or user's click/opening/unsubscription.

AttributesTypeRequiredDescription
segmentintegeryes / no

A unique identifier for the segment of People/Deals/etc.
(required and possible to use for the sections, deals' stage changes and people timelines)

date_fromdate (Y-m-d)no

A date from which the data will be returned (format: Y-m-d, e.g., 2024-01-15).
(possible to use only for logs and people timelines)

date_todate (Y-m-d)no

A date to which the data will be returned (format: Y-m-d, e.g.,2024-01-31).
(possible to use only for logs)

filter_byarrayno

Array of email action types to filter by, based on the date_from and date_to.

Must always be an array format (even for single values):

  • sent_at (default)
  • opened_at
  • clicked_at
  • unsubscribed_at

    Examples:
    Single filter: ["sent_at"]
    Multiple filters: ["sent_at", "opened_at", "clicked_at"]
event_idintegeryes / no

ID of the specific event.
(required and possible to use only for the event occurrences export)

deal_idintegerno

ID of the specific deal.
(possible to use only for the deals stage changes export)

typestringyes

Type of the exported data.
Those can be:
Section

  • people
  • products
  • deals
  • companies
  • activities
    Logs
  • email_delivery_logs
  • sms_delivery_logs
  • email_clicks
  • events
  • deals_stage_changes
  • people_timelines

Request​

curl -X POST
"https://<your_app_subdomain>.user.com/api/public/exports/"
-H 'authorization: Token <your_64_char_api_key>'
-H 'content-type: application/json'
-H "Accept: */*; version=2"
-d '{
"type": "people",
"segment": 1
}'

Response​

{
"filename": "d1d69214-d07f-418f-bd85-27c49fd3398f.csv"
}

Email logs export example​

curl -X POST
"https://<your_app_subdomain>.user.com/api/public/exports/"
-H 'authorization: Token <your_64_char_api_key>'
-H 'content-type: application/json'
-H "Accept: */*; version=2"
-d '{
"type": "email_delivery_logs",
"date_from": "2024-01-01",
"date_to": "2024-01-31",
"filter_by": ["sent_at", "opened_at"]
}'