---
title: "Query aggregated traffic data"
method: POST
path: "/metrics/1/query-aggregate-data"
tags: ["platform", "metrics-api"]
---

# Query aggregated traffic data

`POST /metrics/1/query-aggregate-data`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/metrics/1/query-aggregate-data`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.infobip.com/auth/1/oauth2/token`
  - API key in header `Authorization`
  - API key in header `Authorization`
  - HTTP basic

Start process for traffic data aggregation. The result will be posted to `callbackURL` provided in the request. The response format is described in [Receive aggregated data result](#platform/metrics-api/receive-aggregate-data-result) operation.

## Request body

- 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2QueryAggregateDataRequest
  - `callbackUrl` string, required: The target URL that will receive the query processing results. The schema for this endpoint is documented at [Receive Aggregated Data Result](#platform/metrics-api/receive-aggregate-data-result).
  - `request` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2AggregateDataRequest, required
    - `filterBy` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2AggregateDataFilter, required: A JSON object specifying the criteria to filter the results. Each field in the object represents a different filter criterion, enabling detailed and complex filtering.
      - `accountKeys` string[]: Specifies a list of unique account keys (identifiers). If not provided, the metrics data for the requester's account will be used by default. Example: ``` "accountKeys": ["account_key_1", "account_key_2"] ``` To retrieve all available account keys, refer to the [Account list endpoint](https://www.infobip.com/docs/api/platform/account-management/get-all-accounts).
      - `includeSubaccounts` boolean: Determines whether to include traffic data from sub-accounts (children accounts) along with the specified accounts in `accountKeys`. If set to true, the traffic data for the specified accounts and their sub-accounts is aggregated. If set to false, only the traffic data for the specified accounts in `accountKeys` is considered. This parameter is optional. If not provided, it defaults to false. Example: ``` "includeSubaccounts": true ```
      - `sentSince` string, date-time, required: The start date-time for filtering sent traffic (inclusive). Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
      - `sentUntil` string, date-time, required: The end date-time for filtering sent traffic (exclusive). Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
      - `timeToDeliver` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2TimeSpan[]: Represents the time within which a message is delivered using time buckets. For example, you can filter only for messages delivered within a second. The `from` bucket is inclusive, while the `to` bucket is exclusive.
        - `from` 'SECONDS_0' | 'SECONDS_1' | 'SECONDS_2' | 'SECONDS_3' | 'SECONDS_4' | 'SECONDS_5' | 'SECONDS_10' | 'SECONDS_15' | 'SECONDS_20' | 'SECONDS_25' | 'SECONDS_30' | 'SECONDS_40' | 'SECONDS_50' | 'MINUTES_1' | 'MINUTES_2' | 'MINUTES_3' | 'MINUTES_4' | 'MINUTES_5' | 'MINUTES_10' | 'MINUTES_15' | 'MINUTES_20' | 'MINUTES_25' | 'MINUTES_30' | 'MINUTES_45' | 'HOURS_1' | 'HOURS_6' | 'HOURS_12' | 'HOURS_18' | 'DAYS_1' | 'DAYS_2' | 'DAYS_3'
        - `to` 'SECONDS_0' | 'SECONDS_1' | 'SECONDS_2' | 'SECONDS_3' | 'SECONDS_4' | 'SECONDS_5' | 'SECONDS_10' | 'SECONDS_15' | 'SECONDS_20' | 'SECONDS_25' | 'SECONDS_30' | 'SECONDS_40' | 'SECONDS_50' | 'MINUTES_1' | 'MINUTES_2' | 'MINUTES_3' | 'MINUTES_4' | 'MINUTES_5' | 'MINUTES_10' | 'MINUTES_15' | 'MINUTES_20' | 'MINUTES_25' | 'MINUTES_30' | 'MINUTES_45' | 'HOURS_1' | 'HOURS_6' | 'HOURS_12' | 'HOURS_18' | 'DAYS_1' | 'DAYS_2' | 'DAYS_3'
      - `timeToAnswer` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2TimeSpan[]: Represents the time it took for the call to be answered using time buckets. For example, you can filter only for calls answered within a second. The `from` bucket is inclusive, while the `to` bucket is exclusive.
        - `from` 'SECONDS_0' | 'SECONDS_1' | 'SECONDS_2' | 'SECONDS_3' | 'SECONDS_4' | 'SECONDS_5' | 'SECONDS_10' | 'SECONDS_15' | 'SECONDS_20' | 'SECONDS_25' | 'SECONDS_30' | 'SECONDS_40' | 'SECONDS_50' | 'MINUTES_1' | 'MINUTES_2' | 'MINUTES_3' | 'MINUTES_4' | 'MINUTES_5' | 'MINUTES_10' | 'MINUTES_15' | 'MINUTES_20' | 'MINUTES_25' | 'MINUTES_30' | 'MINUTES_45' | 'HOURS_1' | 'HOURS_6' | 'HOURS_12' | 'HOURS_18' | 'DAYS_1' | 'DAYS_2' | 'DAYS_3'
        - `to` 'SECONDS_0' | 'SECONDS_1' | 'SECONDS_2' | 'SECONDS_3' | 'SECONDS_4' | 'SECONDS_5' | 'SECONDS_10' | 'SECONDS_15' | 'SECONDS_20' | 'SECONDS_25' | 'SECONDS_30' | 'SECONDS_40' | 'SECONDS_50' | 'MINUTES_1' | 'MINUTES_2' | 'MINUTES_3' | 'MINUTES_4' | 'MINUTES_5' | 'MINUTES_10' | 'MINUTES_15' | 'MINUTES_20' | 'MINUTES_25' | 'MINUTES_30' | 'MINUTES_45' | 'HOURS_1' | 'HOURS_6' | 'HOURS_12' | 'HOURS_18' | 'DAYS_1' | 'DAYS_2' | 'DAYS_3'
      - `timeToClickFromSeen` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2TimeSpan[]: Represents the time within which a URL is clicked after the message is seen using time buckets. For example, you can filter only messages whose URLs were clicked within 1 second after they were seen. The `from` bucket is inclusive, while the `to` bucket is exclusive.
        - `from` 'SECONDS_0' | 'SECONDS_1' | 'SECONDS_2' | 'SECONDS_3' | 'SECONDS_4' | 'SECONDS_5' | 'SECONDS_10' | 'SECONDS_15' | 'SECONDS_20' | 'SECONDS_25' | 'SECONDS_30' | 'SECONDS_40' | 'SECONDS_50' | 'MINUTES_1' | 'MINUTES_2' | 'MINUTES_3' | 'MINUTES_4' | 'MINUTES_5' | 'MINUTES_10' | 'MINUTES_15' | 'MINUTES_20' | 'MINUTES_25' | 'MINUTES_30' | 'MINUTES_45' | 'HOURS_1' | 'HOURS_6' | 'HOURS_12' | 'HOURS_18' | 'DAYS_1' | 'DAYS_2' | 'DAYS_3'
        - `to` 'SECONDS_0' | 'SECONDS_1' | 'SECONDS_2' | 'SECONDS_3' | 'SECONDS_4' | 'SECONDS_5' | 'SECONDS_10' | 'SECONDS_15' | 'SECONDS_20' | 'SECONDS_25' | 'SECONDS_30' | 'SECONDS_40' | 'SECONDS_50' | 'MINUTES_1' | 'MINUTES_2' | 'MINUTES_3' | 'MINUTES_4' | 'MINUTES_5' | 'MINUTES_10' | 'MINUTES_15' | 'MINUTES_20' | 'MINUTES_25' | 'MINUTES_30' | 'MINUTES_45' | 'HOURS_1' | 'HOURS_6' | 'HOURS_12' | 'HOURS_18' | 'DAYS_1' | 'DAYS_2' | 'DAYS_3'
      - `timeToClickFromDelivered` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2TimeSpan[]: Represents the time within which a URL is clicked after the message is delivered using time buckets. For example, you can filter only for messages whose URLs were clicked within 1 second after delivery. The `from` bucket is inclusive, while the `to` bucket is exclusive.
        - `from` 'SECONDS_0' | 'SECONDS_1' | 'SECONDS_2' | 'SECONDS_3' | 'SECONDS_4' | 'SECONDS_5' | 'SECONDS_10' | 'SECONDS_15' | 'SECONDS_20' | 'SECONDS_25' | 'SECONDS_30' | 'SECONDS_40' | 'SECONDS_50' | 'MINUTES_1' | 'MINUTES_2' | 'MINUTES_3' | 'MINUTES_4' | 'MINUTES_5' | 'MINUTES_10' | 'MINUTES_15' | 'MINUTES_20' | 'MINUTES_25' | 'MINUTES_30' | 'MINUTES_45' | 'HOURS_1' | 'HOURS_6' | 'HOURS_12' | 'HOURS_18' | 'DAYS_1' | 'DAYS_2' | 'DAYS_3'
        - `to` 'SECONDS_0' | 'SECONDS_1' | 'SECONDS_2' | 'SECONDS_3' | 'SECONDS_4' | 'SECONDS_5' | 'SECONDS_10' | 'SECONDS_15' | 'SECONDS_20' | 'SECONDS_25' | 'SECONDS_30' | 'SECONDS_40' | 'SECONDS_50' | 'MINUTES_1' | 'MINUTES_2' | 'MINUTES_3' | 'MINUTES_4' | 'MINUTES_5' | 'MINUTES_10' | 'MINUTES_15' | 'MINUTES_20' | 'MINUTES_25' | 'MINUTES_30' | 'MINUTES_45' | 'HOURS_1' | 'HOURS_6' | 'HOURS_12' | 'HOURS_18' | 'DAYS_1' | 'DAYS_2' | 'DAYS_3'
      - `timeToSeenFromDelivered` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2TimeSpan[]: Represents the time within which a message is seen after the message is delivered using time buckets. For example, you can filter only for messages seen within 1 second after they were delivered. The `from` bucket is inclusive, while the `to` bucket is exclusive.
        - `from` 'SECONDS_0' | 'SECONDS_1' | 'SECONDS_2' | 'SECONDS_3' | 'SECONDS_4' | 'SECONDS_5' | 'SECONDS_10' | 'SECONDS_15' | 'SECONDS_20' | 'SECONDS_25' | 'SECONDS_30' | 'SECONDS_40' | 'SECONDS_50' | 'MINUTES_1' | 'MINUTES_2' | 'MINUTES_3' | 'MINUTES_4' | 'MINUTES_5' | 'MINUTES_10' | 'MINUTES_15' | 'MINUTES_20' | 'MINUTES_25' | 'MINUTES_30' | 'MINUTES_45' | 'HOURS_1' | 'HOURS_6' | 'HOURS_12' | 'HOURS_18' | 'DAYS_1' | 'DAYS_2' | 'DAYS_3'
        - `to` 'SECONDS_0' | 'SECONDS_1' | 'SECONDS_2' | 'SECONDS_3' | 'SECONDS_4' | 'SECONDS_5' | 'SECONDS_10' | 'SECONDS_15' | 'SECONDS_20' | 'SECONDS_25' | 'SECONDS_30' | 'SECONDS_40' | 'SECONDS_50' | 'MINUTES_1' | 'MINUTES_2' | 'MINUTES_3' | 'MINUTES_4' | 'MINUTES_5' | 'MINUTES_10' | 'MINUTES_15' | 'MINUTES_20' | 'MINUTES_25' | 'MINUTES_30' | 'MINUTES_45' | 'HOURS_1' | 'HOURS_6' | 'HOURS_12' | 'HOURS_18' | 'DAYS_1' | 'DAYS_2' | 'DAYS_3'
      - `timeToOpenFromDelivered` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2TimeSpan[]: Represents the time within which a message is opened after the message is delivered using time buckets. For example, you can filter only for messages opened within 1 second after they were delivered. The `from` bucket is inclusive, while the `to` bucket is exclusive.
        - `from` 'SECONDS_0' | 'SECONDS_1' | 'SECONDS_2' | 'SECONDS_3' | 'SECONDS_4' | 'SECONDS_5' | 'SECONDS_10' | 'SECONDS_15' | 'SECONDS_20' | 'SECONDS_25' | 'SECONDS_30' | 'SECONDS_40' | 'SECONDS_50' | 'MINUTES_1' | 'MINUTES_2' | 'MINUTES_3' | 'MINUTES_4' | 'MINUTES_5' | 'MINUTES_10' | 'MINUTES_15' | 'MINUTES_20' | 'MINUTES_25' | 'MINUTES_30' | 'MINUTES_45' | 'HOURS_1' | 'HOURS_6' | 'HOURS_12' | 'HOURS_18' | 'DAYS_1' | 'DAYS_2' | 'DAYS_3'
        - `to` 'SECONDS_0' | 'SECONDS_1' | 'SECONDS_2' | 'SECONDS_3' | 'SECONDS_4' | 'SECONDS_5' | 'SECONDS_10' | 'SECONDS_15' | 'SECONDS_20' | 'SECONDS_25' | 'SECONDS_30' | 'SECONDS_40' | 'SECONDS_50' | 'MINUTES_1' | 'MINUTES_2' | 'MINUTES_3' | 'MINUTES_4' | 'MINUTES_5' | 'MINUTES_10' | 'MINUTES_15' | 'MINUTES_20' | 'MINUTES_25' | 'MINUTES_30' | 'MINUTES_45' | 'HOURS_1' | 'HOURS_6' | 'HOURS_12' | 'HOURS_18' | 'DAYS_1' | 'DAYS_2' | 'DAYS_3'
      - `channelCodes` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2ChannelCode[], required: Specifies communication channels and/or services. This is a list of available channels/services and their codes: * `SMS` - SMS * `EMAIL` - Email * `FACEBOOK` - Facebook Messenger * `INSTAGRAM` - Instagram Messaging * `KAKAO` - Kakao * `LINE` - Line * `MMS` - MMS * `RCS` - RCS * `TELEGRAM` - Telegram * `VIBER` - Viber * `VOICE_VIDEO` - Voice and Video * `WHATSAPP` - WhatsApp * `ZALO` - Zalo * `APPLE_MB` - Apple Messages for Business
      - `capabilities` string[]: Specifies the function, technology, or flavor within the selected channelCodes, making it easier to identify similar services across channels or services. Available capabilities and their codes: * `PHONE` – Phone * `WEBRTC` – WebRTC * `SIPTRUNK` – SIP Trunks * `VIBER_BC` – Viber Business Calls * `WHATSAPP_BC` – WhatsApp Business Calls * `LINE_OA` – LINE Official Account * `LINE_ON` – LINE Official Notifications * `KAKAO_A` – Kakao Alim * `KAKAO_B` – Kakao Brand Message * `KAKAO_S` – Kakao Sangdam * `ZALO_NS` – Zalo Notification Services * `ZALO_F` – Zalo Follower * `VIBER_BM` – Viber Business Messages * `VIBER_BOTS` – Viber Bots * `MESSENGER` – Messenger * `INSTAGRAM_DM` – Instagram Direct Messaging
      - `directions` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2Direction[]: Specifies the direction of traffic, indicating whether the message was sent to the user (OUTBOUND) or received from the user (INBOUND).
      - `trafficTypes` string[]: Specifies the types of traffic. For a full list of values, refer to [traffic types](https://www.infobip.com/docs/reporting/metrics-reference/billing-data-reference#traffic-types-by-channel).
      - `interactionTypes` string[]: Specifies the interaction types of traffic. For a full list of values, refer to [interaction types](https://www.infobip.com/docs/reporting/metrics-reference/messaging-metrics-reference#interaction-types).
      - `senders` string[]: Specifies the sender IDs, which can be alphanumeric or numeric. Example: ``` "senders": ["mySender", "12345", "15551234567", "jane.smith@somecompany.com"] ```
      - `senderTypes` string[]: Specifies the types of senders. For a full list of values, refer to [sender types](https://www.infobip.com/docs/reporting/metrics-reference/messaging-metrics-reference#sender-types). Example: ``` "senderTypes": ["ALPHANUMERIC", "SHORT_CODE", "VIRTUAL_LONG_NUMBER", "DOMAIN"] ```
      - `communicationIds` integer[]: Specifies the list of communication IDs associated with either a Broadcast or a Moments/Flow campaign. Use communication IDs to filter data related to specific campaigns. For detailed information on the differences between Broadcast and Flow campaigns, refer to the [Broadcast](https://www.infobip.com/docs/broadcast) and [Flow overview](https://www.infobip.com/docs/moments). Example: ``` "communicationIds": [12354646546, 45534466546, 754564654689] ```
      - `campaignReferenceIds` string[]: Specifies the list of campaign reference IDs used for traffic sent over Infobip APIs. Use `campaignReferenceIDs` to filter data related to specific campaigns.
      - `networkIds` integer[]: List of network IDs.
      - `countryIds` integer[]: List of country IDs.
      - `platforms` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2Platform[]: Specifies the platform object, which is a combination of an applicationId and entityId. These IDs uniquely identify each application and entity configured on the Infobip platform. Use this object and its related parameters to filter data for a specific application and entity combination. Note that these parameters should only be used if you leverage CPaaS X applications and entities to manage your traffic. For detailed information on applications and entities in the CPaaS X ecosystem, refer to the [CPaaSX overview](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
        - `applicationId` string: A unique identifier assigned to an application, use case, or environment within the Infobip CPaaS X ecosystem. Use this parameter to filter data for a specific application. To retrieve all available application IDs, refer to the [Application list endpoint](https://www.infobip.com/docs/api/platform/application-entity/get-applications).
        - `entityId` string: A unique identifier assigned to an entity, such as a brand, customer, or other defined component, within the Infobip CPaaS X ecosystem. Use this parameter to filter data for a specific entity. To retrieve all available entity IDs, refer to the [Entity list endpoint](https://www.infobip.com/docs/api/platform/application-entity/get-entities).
      - `applicationId` string: A unique identifier assigned to an application, use case, or environment within the Infobip CPaaS X ecosystem. Use this parameter to filter data for a specific application. To retrieve all available application IDs, refer to the [Application list endpoint](https://www.infobip.com/docs/api/platform/application-entity/get-applications). Example: ``` "applicationId": "your_application_id" ```
      - `entityId` string: A unique identifier assigned to an entity, such as a brand, customer, or other defined component, within the Infobip CPaaS X ecosystem. Use this parameter to filter data for a specific entity. To retrieve all available entity IDs, refer to the [Entity list endpoint](https://www.infobip.com/docs/api/platform/application-entity/get-entities). Example: ``` "entityId": "your_entity_id" ```
      - `statusGroups` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2GeneralStatus[]: Specifies the general status code groups. For the list of possible values, refer to [general status codes](https://www.infobip.com/docs/essentials/response-status-and-error-codes#general-error-codes).
      - `statuses` string[]: Specifies the message status reason. For the list of possible values, refer to [message status reasons](https://www.infobip.com/docs/essentials/response-status-and-error-codes).
      - `errorGroups` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2ErrorCodeGroup[]: Specifies the general error code groups. For the list of possible values, refer to [error codes groups](https://www.infobip.com/docs/essentials/response-status-and-error-codes#general-error-codes).
      - `errorCodes` string[]: Specifies the error codes. For the list of possible values, refer to [error codes](https://www.infobip.com/docs/essentials/response-status-and-error-codes#general-error-codes).
    - `aggregateBy` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2TrafficAggregate[], required: An array of strings that defines the properties used for data aggregation. Each item in the array represents an aggregation parameter, with a corresponding column in the response showing values for the chosen aggregate. `CHANNEL_CODE` is always included in results for metric accuracy, even if not specified in aggregateBy. For further details, refer to our [documentation](https://www.infobip.com/docs/reporting/metrics-api#aggregate-by). Available aggregates: * `ACCOUNT_KEY` - groups the results by account key, displaying account-specific values. * `HOUR` - groups the results by hour, showing corresponding hourly timestamp values. * `DAY` - groups the results by day, showing corresponding day values. * `WEEK_SATURDAY_START` - groups the results by week, starting on Saturday, with corresponding timestamp values. * `WEEK_SUNDAY_START` - groups the results by week, starting on Sunday, with corresponding timestamp values. * `WEEK_MONDAY_START` - groups the results by week, starting on Monday, with corresponding timestamp values. * `MONTH` - groups the results by month, showing monthly values. * `QUARTER` - groups the results by quarter, showing quarterly values. * `YEAR` - groups the results by year, displaying annual values. * `TIME_TO_DELIVER` - groups the results by message delivery time, showing time-to-deliver period descriptions. * `TIME_TO_ANSWER` - groups the results by call answer time, showing time-to-answer period descriptions. * `TIME_TO_CLICK_FROM_SEEN` - groups the results by the time (in seconds) between a message being seen and a URL being clicked, showing calculated values. * `TIME_TO_CLICK_FROM_DELIVERED` - groups the results by the time (in seconds) between message delivery and a URL being clicked, showing calculated values. * `TIME_TO_SEEN_FROM_DELIVERED` - groups the results by the time (in seconds) between message delivery and the message being seen, showing calculated values. * `TIME_TO_OPEN_FROM_DELIVERED` - groups the results by the time (in seconds) between message delivery and the message being opened, showing calculated values. * `CHANNEL_CODE` - groups the results by channel, showing corresponding channel code values. * `CHANNEL_NAME` - groups the results by channel name, showing corresponding channel name values. * `CAPABILITY` - groups the results by capability, showing corresponding capability code values. * `DIRECTION` - groups the results by traffic direction, showing whether it was OUTBOUND (sent to a client) or INBOUND (received from a client). * `TRAFFIC_TYPE` - groups the results by traffic type, showing specific traffic type values. * `INTERACTION_TYPE` - groups the results by interaction type, showing corresponding interaction type values. * `SENDER` - groups the results by sender, showing sender-specific values. * `SENDER_TYPE` - groups the results by type of sender, showing sender type values. * `SENDER_DOMAIN` - groups the results by sender domain, showing domain-specific values. * `RECIPIENT_DOMAIN` - groups the results by recipient domain, showing domain-specific values. * `URL` - groups the results by initial URL in a message, showing URL-specific values. * `COMMUNICATION` - groups the results by communication ID, showing the unique ID associated with each message. * `CAMPAIGN_REFERENCE` - groups the results by campaign reference ID, showing associated campaign reference values. * `NETWORK_ID` - groups the results by network, showing network ID values. * `NETWORK_NAME` - groups the results by network name, showing the name associated with each network ID. * `COUNTRY_ID` - groups the results by country, showing country ID values. * `COUNTRY_NAME` - groups the results by country name, showing the name associated with each country. * `APPLICATION_ID` - groups the results by application, showing corresponding application ID values. * `ENTITY_ID` - groups the results by entity, showing corresponding entity ID values. * `STATUS_GROUP` - groups response results by status group, showing corresponding status group values. * `STATUS` - groups response results by status name, showing corresponding status values. * `ERROR_GROUP` - groups response results by error group, showing corresponding error group values. * `ERROR_CODE` - groups response results by error code, showing corresponding error code values.
    - `metrics` 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2MetricType[], required: The metrics parameter accepts an array of non-empty strings that specify the metrics to retrieve. Each column in the response will contain values corresponding to the selected metric type. For detailed information on the metrics available through the API, including specific details, limitations, and channel applicability, please refer to our comprehensive [documentation](https://www.infobip.com/docs/reporting/metrics-api#metrics) on available metrics. Available metrics: * `TOTAL_TRAFFIC_COUNT` - Total number of messages or message segments sent to and received from customers (inbound and outbound). * `TOTAL_ACCEPTED_TRAFFIC_COUNT` - The total number of accepted Email messages sent to your customers (outbound). * `TOTAL_SMS_MESSAGES_COUNT` - Total number of SMS messages sent to and received from customers (inbound and outbound). Messages split into multiple segments due to length are counted as a single distinct message. * `INTERACTION_COUNT` - Number of distinct messaging interactions. Combined with the `TRAFFIC_TYPE` dimension, it helps analyze specific messaging traffic by breaking down interactions into different WhatsApp or RCS categories, such as conversations or sessions. * `TOTAL_SENT_TRAFFIC_COUNT` - Total number of messages submitted for delivery (outbound). * `DELIVERED_TRAFFIC_COUNT` - Total number of messages delivered to a recipient. * `TRAFFIC_DELIVERY_RATE` - Percentage of messages successfully delivered to recipients. Calculated using the formula: Total delivered / (Total sent - Total rejected) for all channels except Email, where it is calculated as Total delivered / Total sent. * `TRAFFIC_DELIVERED_IN_5_SEC_RATE` - Percentage of messages delivered within a 5-second timeframe. * `TOTAL_RECEIVED_TRAFFIC_COUNT` - Total number of messages received from customers (inbound). * `RECEIVED_TO_SENT_TRAFFIC_RATIO` - Ratio of received (inbound) to sent (outbound) messages that were not rejected. * `FAILED_TRAFFIC_COUNT` - Total number of sent (outbound) messages that were not delivered to recipients. * `TOTAL_BOUNCE_COUNT` - Total number of emails not delivered, including soft (temporary) and hard (permanent) bounces. * `TOTAL_BOUNCE_RATE` - Percentage of emails that were not delivered, calculated by summing soft and hard bounces and dividing by the total sent. * `TOTAL_DROPPED_COUNT` - Submitted emails that were dropped before delivery due to factors such as unsubscribes, bounced addresses, spam marking, or sender errors. * `TOTAL_DROPPED_RATE` - Percentage of dropped emails, calculated by dividing the number of dropped emails by the accepted emails. * `TOTAL_SUPPRESSED_COUNT` - Number of emails not sent due to a bounce or recipient actions like spam marking. * `SOFT_BOUNCE_COUNT` - Number of emails temporarily undeliverable due to reasons like full inboxes, temporary domain unavailability, or lack of recipient opt-in. * `SOFT_BOUNCE_RATE` - Percentage of temporarily undeliverable emails, calculated by dividing soft bounces by total sent. * `HARD_BOUNCE_COUNT` - Number of emails permanently undeliverable to specific recipients. * `HARD_BOUNCE_RATE` - Percentage of permanently undeliverable emails, calculated by dividing hard bounces by total sent. * `SEEN_OPENED_TRAFFIC_COUNT` - Total number of messages seen or opened. Recipients can turn off their read receipts, resulting in a lower seen count. * `SEEN_OPENED_TRAFFIC_RATE` - Percentage of messages seen or opened by unique recipients. Recipients can turn off their read receipts, resulting in a lower seen rate. * `VIEWED_TOTAL_COUNT` - Number of email opens per recipient, including multiple opens by the same user. * `VIEWED_TOTAL_RATE` - Percentage of recipients who opened an email campaign. * `UNIQUE_CLICKS_COUNT` - Number of unique recipients who clicked any link in a message, counted only once per recipient regardless of multiple clicks. * `UNIQUE_CLICK_THROUGH_RATE` - Percentage of unique recipients who clicked a link compared to total messages delivered, counting each recipient only once. * `UNIQUE_URL_CLICK_COUNT` - Number of unique URLs clicked in a single message. * `CLICK_TO_OPEN_RATE` - Percentage of unique clicks divided by unique opens or views, counting each recipient only once. * `TOTAL_CLICKS_COUNT` - Total clicks on all URLs in a message, including multiple clicks on the same link. For example, if a message contains 3 links and each is clicked twice, the total clicks count is 6. * `TOTAL_CLICK_RATE` - Percentage of recipients who clicked any link, calculated as the total clicks across all URLs divided by the total delivered messages. For example, if 200 SMS messages are sent and there are 400 total clicks, the `TOTAL_CLICK_RATE` is 200%. * `UNSUBSCRIBED_USER_COUNT` - Number of recipients who unsubscribed (opted out) from further communications from the sender. * `UNSUBSCRIBED_USER_RATE` - Percentage of recipients who unsubscribed (opted out) from further communications from the sender. * `EMAIL_COMPLAINTS_COUNT` - Number of emails reported as spam by recipients. * `EMAIL_COMPLAINTS_RATE` - Percentage of emails reported as spam by recipients. * `TOTAL_CALL_COUNT` - Total number of calls sent to your customers (outbound) and calls received from your customers (inbound). * `TOTAL_ATTEMPTED_CALL_COUNT` - Total number of calls initiated for delivery (outbound). * `TOTAL_SEIZED_CALL_COUNT` - Total number of calls that have successfully reached the recipient's device and started ringing, regardless of whether they were ultimately answered or not. * `TOTAL_ANSWERED_CALL_COUNT` - Total number of calls that were successfully answered, including both inbound calls (initiated by the customer) and outbound calls (initiated by the business). * `TOTAL_RECEIVED_CALL_COUNT` - Total number of calls you received from customers (inbound). * `AMD_PROCESSED_CALL_COUNT` - The number of calls that used Automated machine detection. * `ANSWERED_BY_PERSON_CALL_COUNT` - Number of calls initiated by the business that were successfully answered by a person (human). * `ANSWERED_BY_VOICE_DETECTION_CALL_COUNT` - Number of calls initiated by the business that were successfully answered by a voice detection system (e.g., voicemail, automated system). * `NOT_ANSWERED_CALL_COUNT` - Total number of outbound calls that were not answered by the recipient. * `BUSY_CALL_COUNT` - Total number of outbound calls that received a busy signal or were rejected due to the recipient's line being busy. * `CANCELED_CALL_COUNT` - Total number of outbound calls that were canceled at the origination end before they could have been successfully routed to the end user. * `FAILED_CALL_COUNT` - Total number of calls that were not successfully delivered for various reasons, including being declined or rejected by the user, rejected by the operator, or due to the end user's unavailability to receive the call at the time of the attempt. * `ANSWER_SEIZURE_RATIO` - The percentage of successfully answered calls out of the total number of call attempts that resulted in a seizure (i.e., a call attempt that resulted in a ring-back tone). * `ANSWER_RATE` - The percentage of calls that are successfully answered by the called party out of the total number of calls that were attempted. * `BUSY_RATE` - The percentage of calls that receive a busy signal out of the total number of attempted calls. * `HUNG_UP_COUNT` - The total number of call or session terminations, including those initiated by users after successful interactions and those caused by system errors. * `NORMAL_HUNG_UP_COUNT` - The number of regular call or session terminations initiated by users after successful interactions. * `ERROR_HUNG_UP_COUNT` - The number of call or session terminations caused by encountered errors within the system. * `TOTAL_CALL_DURATION` - The cumulative duration of all calls made to and received from customers (inbound and outbound). For more detailed information and examples, please visit: - [Metrics and Filters](https://www.infobip.com/docs/reporting/metrics-api#metrics) - [Constraints](https://www.infobip.com/docs/reporting/metrics-api#time-granulation-constraints)

## Response `201`

Data querying process is started.

- 99c561addf74bb07fd67942658f68818323ce564cc5eef645d487517ca1425f2QueryAggregateDataResponse
  - `requestId` string, required: The identifier of the submitted request.

## Other responses

- `400`: Request is malformed or invalid.
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
