Relay SMS Platform
Relay SMS API

Analytics

Endpoint

Message and cost analytics


Message analytics

GET
https://api.relay.works
/v1/analytics/messages

Aggregate message counts by direction and status over an optional date range.

Message analyticsquery Parameters

  • fromstring · date-time
  • tostring · date-time

Message analytics Responses

Message analytics breakdown

  • inboundobject

    Map of status -> count for inbound messages

  • outboundobject

    Map of status -> count for outbound messages

  • totalinteger
  • summaryobject

Cost analytics

GET
https://api.relay.works
/v1/analytics/costs

Aggregate cost breakdown (SMS, phone numbers, other) over an optional date range.

Cost analyticsquery Parameters

  • fromstring · date-time
  • tostring · date-time

Cost analytics Responses

Cost breakdown

  • periodstring
  • total_centsinteger

    Total cost in integer minor currency units (cents).

  • currencystring
    Example: USD
  • breakdownobject
  • totalnumber · deprecated · required

    Deprecated. Float dollars. Use total_cents going forward.