Message analytics
GET
https://api.relay.works
/v1/analytics/messages
Aggregate message counts by direction and status over an optional date range.
query Parameters
fromstring · date-timetostring · date-time
Responses
Message analytics breakdown
inboundobjectMap of status -> count for inbound messages
outboundobjectMap of status -> count for outbound messages
totalintegersummaryobject
Cost analytics
GET
https://api.relay.works
/v1/analytics/costs
Aggregate cost breakdown (SMS, phone numbers, other) over an optional date range.
query Parameters
fromstring · date-timetostring · date-time
Responses
Cost breakdown
periodstringtotal_centsintegerTotal cost in integer minor currency units (cents).
currencystringExample: USDbreakdownobject
totalnumber · deprecated · requiredDeprecated. Float dollars. Use
total_centsgoing forward.