Agent Email
Export agent email usage
POST /v1/agent-email/usage/export · SDK exportAgentEmailUsage · CLI deployments email-usage export
POST
Requires agent-email:read. A suspended organization can still call it.
platformBearerheader
AuthorizationBearer <token>Platform bearer credential accepted as an opaque API key or JWT.
x-deployments-environment*stringMatch
^[0-7][0-9A-HJKMNP-TV-Z]{25}$application/json- body
bucket?stringValue in
"day""hour""month"format?stringValue in
"csv""json"from?stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timeinboxId?stringMatch
^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$to?stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timeAgentEmailUsageExportResponse
application/json- response
bucket*stringValue in
"day""hour""month"csv?stringformat*stringValue in
"csv""json"from*stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timerows*array<>to*stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timecurl -X POST "https://example.com/v1/agent-email/usage/export" \ -H "x-deployments-environment: string" \ -H "Content-Type: application/json" \ -d '{}'{ "bucket": "day", "csv": "string", "format": "csv", "from": "2019-08-24T14:15:22Z", "rows": [ { "bucketStart": "2019-08-24T14:15:22Z", "clientId": "string", "inboxId": "string", "kind": "attachment_bytes", "organizationId": "string", "quantity": 0 } ], "to": "2019-08-24T14:15:22Z"}