Exports
Receive notifications when data exports are requested, completed, downloaded, or fail.
Overview
Export webhooks notify your application about the lifecycle of data export jobs. Use these events to track export progress, notify users when downloads are ready, or monitor failures.
Use Cases
- Notify users when their requested export is ready to download
- Monitor export failures and trigger retry logic
- Track export download activity for auditing
- Build progress indicators for long-running exports
Events
| Event | Description |
|---|---|
export.requested | An export job was submitted and processing has started |
export.completed | An export job finished successfully and is ready to download |
export.downloaded | An export file was downloaded by the requesting user |
export.failed | An export job failed during processing |
export.requested
Triggered When
- A user or API call initiates a data export (e.g. subscriptions, customers, invoices)
- The export job is accepted and begins background processing
Payload
{
"type": "export.requested",
"id": "evt_LcTuvSbcI9qWia4IWcy5Bmkg",
"created": 1690889576,
"data": {
"object": {
"account_id": 100029,
"created_at": 1690889576,
"filters": {
"date_from": null,
"date_to": null
},
"finished_at": null,
"object": "subscriptions",
"started_at": null,
"updated_at": 1690889576,
"user_email": "[email protected]",
"user_id": 6801446,
"uuid": "1ee305f2-93c1-61be-96fd-0242ac110002"
}
}
}Note: When an export is first requested,
started_atandfinished_atarenullbecause processing has not yet begun.
export.completed
Triggered When
- An export job finishes processing successfully
- The export file is ready for download
Payload
{
"type": "export.completed",
"id": "evt_ZBsyHPPF12dcDDhiBzKLIq4J",
"created": 1690889579,
"data": {
"object": {
"account_id": 100029,
"created_at": 1690889576,
"filters": {
"date_from": null,
"date_to": null
},
"finished_at": 1690889579,
"object": "subscriptions",
"started_at": 1690889577,
"updated_at": 1690889579,
"user_email": "[email protected]",
"user_id": 6801446,
"uuid": "1ee305f2-93c1-61be-96fd-0242ac110002"
}
}
}export.downloaded
Triggered When
- A user downloads the completed export file
Payload
{
"type": "export.downloaded",
"id": "evt_m2wg4PdiErVxIsIRbNt1h9T1",
"created": 1683755038,
"data": {
"object": {
"account_id": 100029,
"created_at": 1683754964,
"filters": {
"date_from": null,
"date_to": null
},
"finished_at": 1683754969,
"object": "subscriptions",
"started_at": 1683754967,
"updated_at": 1683755038,
"user_email": "[email protected]",
"user_id": 6801446,
"uuid": "1edef7b9-8c9c-6334-80ce-0242ac110002"
}
}
}export.failed
Triggered When
- An export job fails during data extraction or file compilation
- Common causes include memory limits, timeouts, or data errors
Payload
{
"type": "export.failed",
"id": "evt_Qr8xKpLmN3vWjYaZcDfE7hUo",
"created": 1690890100,
"data": {
"object": {
"account_id": 100029,
"created_at": 1690889576,
"failed_reason": "Memory limit exceeded during data extraction",
"filters": {
"date_from": null,
"date_to": null
},
"finished_at": null,
"object": "subscriptions",
"started_at": 1690889577,
"updated_at": 1690890100,
"user_email": "[email protected]",
"user_id": 6801446,
"uuid": "1ee305f2-93c1-61be-96fd-0242ac110002"
}
}
}Note: The
failed_reasonfield is only present on failed exports. It is not included in the payload for other export events.
Payload Fields
All export events share the same payload structure under data.object:
| Field | Type | Description |
|---|---|---|
account_id | integer | The account ID that owns the export |
created_at | integer | null | Unix timestamp when the export was created |
failed_reason | string | null | The reason for failure (only present on failed exports) |
filters | object | The filters applied to the export (e.g. date_from, date_to) |
finished_at | integer | null | Unix timestamp when the export finished processing |
object | string | The type of data being exported (see Object Types below) |
started_at | integer | null | Unix timestamp when processing started |
updated_at | integer | null | Unix timestamp when the export was last updated |
user_email | string | null | Email of the user who requested the export |
user_id | integer | The ID of the user who requested the export |
uuid | string | The unique identifier of the export job |
Object Types
The object field indicates what type of data is being exported:
| Value | Description |
|---|---|
subscriptions | Subscription records |
memberships | Membership records |
invoices | Invoice records |
payments | Payment/charge records |
refunds | Refund records |
customers | Customer records |
customers_metadata | Customer records with metadata |
newsletters | Newsletter records |
addresses | Address records |
balance_transactions | Balance transaction records |
credit_note | Credit note records |
orders | Order records |
campaign_reports | Campaign report records |
accounting | Accounting report records |
Export Lifecycle
The typical lifecycle of a successful export follows this event sequence:
export.requested- Export job accepted, processing beginsexport.completed- Processing finished, file readyexport.downloaded- User downloaded the file
If processing fails, the sequence is:
export.requested- Export job accepted, processing beginsexport.failed- Processing encountered an error
Updated about 4 hours ago
