Exports

Export

An export job that produces a CSV of lead events for a given time range and field selection.

id
required
string (ID) ^[0-9a-fA-F]{24}$

ID of this export

created_at
required
string <date-time>

When the export was requested.

status
required
string

Current state of the export job.

Enum: "created" "processing" "complete" "error" "truncated"
start
string <date-time>

Start of the time range covered by this export (inclusive).

end
string <date-time>

End of the time range covered by this export (exclusive).

Array of objects

Rules used to filter the events included in the export.

email_to
Array of strings

Email addresses notified when the export completes.

fields
Array of strings

Lead/event fields included in the resulting CSV.

date_format
string

Date format used in the resulting CSV.

Enum: "standard" "legacy"
object

User who requested the export.

expires_at
string <date-time>

When the export becomes unavailable for download.

object

Optional explanation when the status is truncated or error.

error
string

Error message when the status is error.

exported_docs
integer

Number of lead/event records included in the resulting CSV.

file_name
string

Name of the resulting CSV file.

downloads
Array of objects

Audit log of users who have downloaded this export.

{
  • "id": "5fd4371e940df5a34a3888b2",
  • "created_at": "2019-08-24T14:15:22Z",
  • "status": "created",
  • "start": "2019-08-24T14:15:22Z",
  • "end": "2019-08-24T14:15:22Z",
  • "filter_rules": [
    • {
      • "lhv": "string",
      • "op": "string",
      • "rhv": "string"
      }
    ],
  • "email_to": [
    • "string"
    ],
  • "fields": [
    • "string"
    ],
  • "date_format": "standard",
  • "user": {
    • "id": "string",
    • "first_name": "string",
    • "last_name": "string",
    • "email": "string",
    • "sso_id": "string"
    },
  • "expires_at": "2019-08-24T14:15:22Z",
  • "reason": {
    • "message": "string"
    },
  • "error": "string",
  • "exported_docs": 0,
  • "file_name": "string",
  • "downloads": [
    • { }
    ]
}

List all exports

Returns the export jobs requested by users in the calling account, newest first. The list is filtered to exports whose expires_at is in the future (i.e. still downloadable). Use the before_id cursor and limit to paginate; pass the id of the last item from the previous page as before_id to fetch the next page.

SecurityAPIKey
Request
query Parameters
before_id
string (ID) ^[0-9a-fA-F]{24}$

Return only exports created before the one with this ID (exclusive). Used for cursor pagination.

Example: before_id=5fd4371e940df5a34a3888b2
after_id
string (ID) ^[0-9a-fA-F]{24}$

Return only exports created after the one with this ID (exclusive).

Example: after_id=5fd4371e940df5a34a3888b2
limit
integer [ 1 .. 100 ]

The maximum number of exports to return (maximum limit is 100).

Responses
200

OK

400

Invalid request parameters.

401

Authorization information is missing or invalid.

get/exports
Request samples
Response samples
application/json
[
  • {
    • "id": "5fd4371e940df5a34a3888b2",
    • "created_at": "2019-08-24T14:15:22Z",
    • "status": "created",
    • "start": "2019-08-24T14:15:22Z",
    • "end": "2019-08-24T14:15:22Z",
    • "filter_rules": [
      • {
        • "lhv": "string",
        • "op": "string",
        • "rhv": "string"
        }
      ],
    • "email_to": [
      • "string"
      ],
    • "fields": [
      • "string"
      ],
    • "date_format": "standard",
    • "user": {
      • "id": "string",
      • "first_name": "string",
      • "last_name": "string",
      • "email": "string",
      • "sso_id": "string"
      },
    • "expires_at": "2019-08-24T14:15:22Z",
    • "reason": {
      • "message": "string"
      },
    • "error": "string",
    • "exported_docs": 0,
    • "file_name": "string",
    • "downloads": [
      • { }
      ]
    }
]