PlatformXeDocs
Get API Key

Data Export

Export platform data in CSV or JSON format.

The data export API lets you create export jobs for platform data. Exports run asynchronously — you create a job, then poll for completion and download the result.

Scope: exports:create

Rate limit: 1,000/hr

Create an export job

POST /api/v1/exports

FieldTypeRequiredDescription
typestringYesData type to export (see below)
formatstringYescsv or json
filtersobjectNoOptional filters (date range, status, etc.)

Exportable data types

TypeDescription
email_logsEmail delivery history
permission_auditPermission decision audit logs
permission_changesPermission mutation logs
usage_metricsUsage data by service
invoicesBilling invoices
curl -X POST https://api.platformxe.com/api/v1/exports \
  -H "Content-Type: application/json" \
  -H "x-api-key: pxk_live_your_api_key_here" \
  -d '{
    "type": "email_logs",
    "format": "csv",
    "filters": {
      "from": "2026-03-01T00:00:00Z",
      "to": "2026-04-01T00:00:00Z"
    }
  }'
const job = await px.createExport({
  type: 'email_logs',
  format: 'csv',
  filters: {
    from: '2026-03-01T00:00:00Z',
    to: '2026-04-01T00:00:00Z',
  },
});

console.log(job.data.id); // "exp_abc123"
console.log(job.data.status); // "processing"

Check export status

GET /api/v1/exports/:id

curl https://api.platformxe.com/api/v1/exports/exp_abc123 \
  -H "x-api-key: pxk_live_your_api_key_here"

Response

{
  "success": true,
  "data": {
    "id": "exp_abc123",
    "type": "email_logs",
    "format": "csv",
    "status": "completed",
    "downloadUrl": "https://storage.platformxe.com/exports/exp_abc123.csv",
    "expiresAt": "2026-04-06T14:30:00.000Z",
    "rowCount": 4250
  }
}
StatusDescription
processingExport job is running
completedReady to download
failedExport encountered an error

Download URLs expire after 24 hours. Retrieve the export file before the expiry time or create a new export job.

Error responses

CodeDescription
BAD_REQUESTInvalid export type or format
FORBIDDENAPI key missing exports:create scope
NOT_FOUNDExport job does not exist