Get historical message statistics
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. If the date range includes the current day, it will include statistics for the current day so far.
Request
- Base URL: https://api.telerivet.com
- URL: https://api.telerivet.com/v1/projects/{project_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
ID of the Project
Query parameters
Start date of message statistics, in YYYY-MM-DD format
End date of message statistics (inclusive), in YYYY-MM-DD format
Date interval to group by
Comma separated list of properties to group by
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.
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.