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

EventDescription
export.requestedAn export job was submitted and processing has started
export.completedAn export job finished successfully and is ready to download
export.downloadedAn export file was downloaded by the requesting user
export.failedAn 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_at and finished_at are null because 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_reason field 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:

FieldTypeDescription
account_idintegerThe account ID that owns the export
created_atinteger | nullUnix timestamp when the export was created
failed_reasonstring | nullThe reason for failure (only present on failed exports)
filtersobjectThe filters applied to the export (e.g. date_from, date_to)
finished_atinteger | nullUnix timestamp when the export finished processing
objectstringThe type of data being exported (see Object Types below)
started_atinteger | nullUnix timestamp when processing started
updated_atinteger | nullUnix timestamp when the export was last updated
user_emailstring | nullEmail of the user who requested the export
user_idintegerThe ID of the user who requested the export
uuidstringThe unique identifier of the export job

Object Types

The object field indicates what type of data is being exported:

ValueDescription
subscriptionsSubscription records
membershipsMembership records
invoicesInvoice records
paymentsPayment/charge records
refundsRefund records
customersCustomer records
customers_metadataCustomer records with metadata
newslettersNewsletter records
addressesAddress records
balance_transactionsBalance transaction records
credit_noteCredit note records
ordersOrder records
campaign_reportsCampaign report records
accountingAccounting report records

Export Lifecycle

The typical lifecycle of a successful export follows this event sequence:

  1. export.requested - Export job accepted, processing begins
  2. export.completed - Processing finished, file ready
  3. export.downloaded - User downloaded the file

If processing fails, the sequence is:

  1. export.requested - Export job accepted, processing begins
  2. export.failed - Processing encountered an error