Data Exports
Create Data Export
Create a new data export request. This will calculate the required credits and prepare the export for starting.
post/api/data-exports
Request body
Example request
{
"type": "transactions",
"account_ids": [
"acc_abc123",
"acc_def456"
],
"start_date": "2024-01-01T00:00:00Z",
"end_date": "2024-12-31T23:59:59Z",
"export_columns": [
"transaction_id",
"amount",
"created_at"
],
"file_type": "csv",
"options": {
"maxChats": 100,
"maxMessages": 50000,
"skipMassMessages": false
},
"auto_start": true
}Response
Success
Example response
{
"data": {
"id": "data_export_abc123xyz789",
"type": "chat_messages",
"status": "calculating_credits",
"start_date": "2024-01-01T00:00:00+00:00",
"end_date": "2024-12-31T23:59:59+00:00",
"file_type": "csv",
"created_at": "2024-12-02T12:00:00+00:00",
"requires_scraping": true,
"credit_calculation_note": "This export type requires data scraping. Credits will be calculated and charged after scraping completes."
},
"_meta": {
"_credits": {
"used": 0,
"balance": 9500,
"note": "Always"
},
"_cache": {
"is_cached": false,
"note": "Cache disabled for this endpoint"
},
"_rate_limits": {
"limit_minute": 60,
"limit_day": null,
"remaining_minute": 56,
"remaining_day": null,
"notice": ""
}
}
}