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. |
| 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. |
| standard_dates | boolean Request only. |
| date_format | string Date format used in the resulting CSV. Set from |
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 | |
| error | string Error message when the status is |
| 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": [
- { }
]
}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.
OK
Invalid request parameters.
Authorization information is missing or invalid.
[- {
- "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": [
- { }
]
}
]Requests a CSV export of lead events for a time range. The export runs in the
background: poll GET /exports/{id} until status is complete, then call
GET /exports/{id}/file to get a download link. The addresses in email_to are
notified when the file is ready.
Only start, end, fields, filter_rules, email_to, and standard_dates are read
from the request; the other properties of an export are set by LeadConduit. Send
standard_dates: true for the standard date format in the CSV; the export's
date_format reflects the choice and defaults to legacy.
The export to create
Created
Authorization information is missing or invalid.
The export is not valid.
{- "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"
], - "standard_dates": true,
- "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": [
- { }
]
}{- "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": [
- { }
]
}Fetch a single export, including its status and, once complete, the file_name and exported_docs count.
OK
The ID is not valid.
Authorization information is missing or invalid.
No export exists with this ID in the calling account. The response has no body.
{- "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": [
- { }
]
}Returns a pre-signed URL for the export's CSV file. The URL is valid for 10 seconds,
so request it right before downloading and do not store it. Each call is recorded in
the export's downloads list.
OK
Authorization information is missing or invalid.
No export exists with this ID, or its file is not ready yet (the export is still running or ended in error).
The ID is not valid.