Message

Get historical message statistics for all projects in organization

Retrieves statistics about messages sent or received via Telerivet. This endpoint returns historical data that is computed shortly after midnight each day in the project's time zone, and does not contain message statistics for the current day.

get/v1/organizations/{organization_id}/message_stats

Request

  • Base URL: https://api.telerivet.com
  • URL: https://api.telerivet.com/v1/organizations/{organization_id}/message_stats
  • Auth: one of:
    • HTTP basic
    • OAuth 2 (authorization code, authorization URL https://telerivet.com/oauth/authorize, token URL https://api.telerivet.com/oauth/token)

Path parameters

organization_idstring required

ID of the Organization

Query parameters

start_datestring required

Start date of message statistics, in YYYY-MM-DD format

end_datestring required

End date of message statistics (inclusive), in YYYY-MM-DD format

rollup'day' | 'week' | 'month' | 'year' | 'all'

Date interval to group by

propertiesstring[]

Comma separated list of properties to group by

metricsstring required

Comma separated list of metrics to return (summed for each distinct value of the requested properties). Supported metrics are count (the number of messages), num_parts (the number of SMS parts), duration (the total duration of calls, in seconds), and price.<currency> (the total price of messages priced in the specified ISO 4217 currency, e.g. price.USD). Amounts are not converted between currencies: each price.<currency> metric only includes messages priced in the specified currency.

filtersobject

Key-value pairs of properties and corresponding values; the returned statistics will only include messages where the property matches the provided value. Only the following properties are supported for filters: user_id, phone_id, direction, source, status, service_id, simulated, message_type, network_code

Response

Successful response

Changes

No recorded changes to this operation across all 1 revision of this API.