Export csv
export_csvExport as CSV text for analysis: messages, deliveries, events, opt_outs, webhook_deliveries, usage, usage_monthly, audit_log or credit_history. At most 50,000 rows; narrow the date range with from and to.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | messages: body/failure text; events: id/payload text | |
| ok | No | webhook_deliveries | |
| to | No | Inclusive; a bare date means the end of that day (UTC) | |
| from | No | ISO date/time or epoch ms (messages, deliveries, events, webhook_deliveries) | |
| kind | Yes | messages, deliveries, events, opt_outs, webhook_deliveries, usage, usage_monthly, audit_log or credit_history | |
| type | No | events, webhook_deliveries | |
| actor | No | audit_log: actor id or part of the actor email | |
| batch | No | messages, deliveries: batch id (bc_...) | |
| action | No | audit_log: one action, or a group prefix with a trailing dot (team.) | |
| months | No | usage: daily rows for the last N months | |
| number | No | messages, deliveries: digits matched against either side | |
| status | No | messages, deliveries | |
| direction | No | messages | |
| to_number | No | messages, deliveries: exact recipient (E.164). `to`/`from` are the date range here. | |
| customer_id | No | messages, deliveries | |
| endpoint_id | No | webhook_deliveries (default: all endpoints) | |
| from_number | No | messages, deliveries: exact sender (E.164) | |
| target_type | No | audit_log | |
| failure_code | No | messages, deliveries: failed for this reason (the `failure.code` on a message) | |
| created_after | No | audit_log: same as on GET /audit-logs (from is accepted too) | |
| blocked_reason | No | messages, deliveries: blocked messages with this reason | |
| created_before | No | audit_log: same as on GET /audit-logs (to is accepted too) |