Organization

Get usage history

Retrieves the daily history of the usage count associated with a particular service plan limit.

Telerivet stores a snapshot of each organization's usage once per day, shortly after midnight in the organization's time zone. For usage types that are counted per day (external_messages_day, api_requests_day, service_invocations_day, and ai_chat_credits_day), each entry contains the usage counted during that entire day. For all other usage types, each entry contains the usage count at the time the snapshot was recorded.

The maximum supported date range is 500 days between start_date and end_date. If the requested date range includes the current time, the response will also include a final entry with current: true containing the live usage count computed at the time of the API request.

Usage snapshots are only recorded while an organization is active, so an entry may not be available for every date in the requested range.

get/v1/organizations/{organization_id}/usage_history

Request

  • Base URL: https://api.telerivet.com
  • URL: https://api.telerivet.com/v1/organizations/{organization_id}/usage_history
  • 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

usage_type'contacts' | 'phones' | 'active_services' | 'users' | 'stored_messages' | 'service_invocations_day' | 'api_requests_day' | 'projects' | 'data_rows' | 'script_module_mb' | 'stored_file_mb' | 'custom_actions' | 'groups' | 'custom_contact_fields' | 'external_messages_day' | 'external_messages_period' | 'ai_chat_credits_day' required

Usage type, corresponding to the keys in the plan_limits property returned by getBillingDetails.

start_datestring required

Start date of usage history, in YYYY-MM-DD format (in the organization's time zone)

end_datestring required

End date of usage history (inclusive), in YYYY-MM-DD format (in the organization's time zone)

Response

Successful response

timezone_idstring

The organization's time zone ID, used to determine the date associated with each entry

usage_typestring

The usage type from the request

Changes

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