Skip to main content
GET
/
usage
/
export
cURL
# Export as CSV for billing
curl "https://api.arkhq.io/v1/usage/export?period=2024-01" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o usage-2024-01.csv

# Export as JSON Lines for streaming
curl "https://api.arkhq.io/v1/usage/export?format=jsonl&period=last_month" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o usage.jsonl

# Filter to active tenants with activity
curl "https://api.arkhq.io/v1/usage/export?status=active&minSent=1" \
  -H "Authorization: Bearer YOUR_API_KEY"
"tenant_id,tenant_name,external_id,status,sent,delivered,soft_failed,hard_failed,bounced,held,delivery_rate,bounce_rate\ncm6abc123def456,Acme Corp,acme_123,active,10000,9700,100,50,100,50,0.97,0.015\ncm6def789ghi012,Beta Inc,,active,5000,4850,50,30,50,20,0.97,0.016\n"

Authorizations

Authorization
string
header
required

Use your API key from arkhq.io/org/credentials

Authorization: Bearer YOUR_API_KEY

Query Parameters

period
string
default:this_month

Time period for export.

Shortcuts: this_month, last_month, last_30_days, etc.

Month format: 2024-01 (YYYY-MM)

Custom range: 2024-01-01..2024-01-15

format
enum<string>
default:csv

Export format

Available options:
csv,
jsonl
status
enum<string>

Filter by tenant status

Available options:
active,
suspended,
archived
minSent
integer

Only include tenants with at least this many emails sent

Required range: x >= 0
timezone
string
default:UTC

Timezone for period calculations (IANA format)

Response

Usage export data

The response is of type string.