Metrics API
Metrics and filters

Metrics

The following are the API metrics you can retrieve over Metrics API. You can specify metrics to fetch specific performance indicators such as total traffic count, click rates, delivery success rates, and more. They provide valuable insights to monitor and optimize your strategies effectively.

  • Delivery
Metrics nameAPI syntaxDescription
Total trafficTOTAL_TRAFFIC_COUNTThe total number of messages or message segments (parts) sent to your customers (outbound) and messages received from your customers (inbound).

Channel specifics:
  • Includes emails accepted by Infobip for delivery (not rejected).
Messaging interactionsINTERACTION_COUNTNumber of distinct messaging interactions.

When combined with the TRAFFIC_TYPE dimension, it helps analyze messaging traffic in detail.
This metric allows you to break down messaging interactions into different WhatsApp or RCS channel-specific categories, such as conversations or sessions and single or basic messages.
Total SMS messagesTOTAL_SMS_MESSAGES_COUNTThe 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.

Channel specifics:
  • Retrievable only for SMS.
Total sentTOTAL_SENT_TRAFFIC_COUNTThe total number of messages submitted for delivery (outbound).

Channel specifics:
  • When it comes to our Email service, this refers to the total number of emails sent from our platform to the mailbox provider.
DeliveredDELIVERED_TRAFFIC_COUNTThe total number of messages delivered to a recipient.
Delivery rateTRAFFIC_DELIVERY_RATEThe percentage of messages successfully delivered to recipients.
5 sec delivery rateTRAFFIC_DELIVERED_IN_5_SEC_RATEThe percentage of messages delivered within a 5-second time frame.
  • Inbound
Metrics nameAPI syntaxDescription
Received trafficTOTAL_RECEIVED_TRAFFIC_COUNTThe total number of messages you received from customers (inbound).

Channel specifics:
  • This metric may not provide data for messaging channels that do not support inbound messaging or if receiving inbound messages is not configured on the Infobip platform.
Received to sent ratioRECEIVED_TO_SENT_TRAFFIC_RATIORatio of received (inbound) to sent (outbound) messages that were not rejected.

Channel specifics:
  • This metric may not provide data for messaging channels that do not support inbound messaging or if receiving inbound messages is not configured on the Infobip platform.
  • Delivery failure
Metrics nameAPI syntaxDescription
FailedFAILED_TRAFFIC_COUNTThe total number of sent (outbound) messages not delivered to a recipient.

Channel specifics:
  • Not retrievable for Email. Please use TOTAL_DROPPED_COUNT if interested in counts of messages that failed to deliver.
BouncedTOTAL_BOUNCE_COUNTThe total number of emails not delivered to recipients, including soft bounces (temporary issue) and hard bounces (permanent issue).

Channel specifics:
  • Retrievable only for Email.
Bounce rateTOTAL_BOUNCE_RATEThe percentage of emails that were not delivered to recipients' inboxes. This includes both soft and hard bounces. It is calculated by summing up soft bounced and hard bounced messages, and dividing them by the number of messages sent (Total sent).

Channel specifics:
  • Retrievable only for Email.
DroppedTOTAL_DROPPED_COUNTThe submitted emails that were dropped before delivery due to various reasons, such as the recipient unsubscribed, address bounced, the message was marked as spam, or sender errors such as blocked or unverified domain, or content-related issues like expired templates or too many URLs.

Channel specifics:
  • Retrievable only for Email.
Dropped rateTOTAL_DROPPED_RATEThe percentage calculated by dividing the number of dropped emails by the number of accepted emails.

Channel specifics:
  • Retrievable only for Email.
SuppressedTOTAL_SUPPRESSED_COUNTThe number of emails that were not sent due to a bounce or a negative recipient reaction (marking the email as spam).

Channel specifics:
  • Retrievable only for Email.
Soft bouncedSOFT_BOUNCE_COUNTThe number of emails temporarily undeliverable to recipients. This can happen due to the recipient's inbox being full, the domain temporarily unavailable, or the mailbox provider suspecting legitimacy or lack of recipient opt-in.

Channel specifics:
  • Retrievable only for Email.
Soft bounced rateSOFT_BOUNCE_RATEThe percentage of emails temporarily undeliverable to recipients. It is calculated by dividing the number of soft bounced messages by the number of messages sent (Total sent).

Channel specifics:
  • Retrievable only for Email.
Hard bouncedHARD_BOUNCE_COUNTThe number of emails that received a permanent error from mailbox providers when attempting to deliver the email to a specific recipient.

Channel specifics:
  • Retrievable only for Email.
Hard bounced rateHARD_BOUNCE_RATEThe percentage of emails permanently undeliverable to recipients. It is calculated by dividing the number of hard bounced messages by the number of messages sent (Total sent).

Channel specifics:
  • Retrievable only for Email.
  • Seen/Opened
Metrics nameAPI syntaxDescription
Seen/Unique opensSEEN_OPENED_TRAFFIC_COUNTThe number of messages that were seen or opened by unique recipients, counting each recipient only once regardless of how many times they opened the same message. Consider that recipients can turn off their read receipts, which can result in a lower seen count.

Channel specifics:
  • This metric may not provide data for messaging channels that do not support the seen callback feature. It is designed to capture engagement metrics only for supported platforms such as WhatsApp, Viber, and RCS.
  • For Email, we are returning the count of unique open messages.
Seen rate/Unique opens rateSEEN_OPENED_TRAFFIC_RATEThe percentage of messages that were seen or opened by unique recipients. Consider that recipients can turn off their read receipts, which can result in a lower seen rate.

Channel specifics:
  • This metric may not provide data for messaging channels that do not support the seen callback feature. It is designed to capture engagement metrics only for supported platforms such as WhatsApp, Viber, and RCS.
  • For Email, we are returning the rate of unique open messages.
OpensVIEWED_TOTAL_COUNTThe number of open messages per single email address. The emails opened multiple times by the same recipient are also counted.

Channel specifics:
  • Retrievable only for Email.
Open rateVIEWED_TOTAL_RATEThe percentage of recipients who opened an email campaign.

Channel specifics:
  • Retrievable only for Email.
  • Clicks/Engagement
Metrics nameAPI syntaxDescription
Unique clicksUNIQUE_CLICKS_COUNTThe number of unique recipients who clicked on any link within a message, counting each recipient only once regardless of the number of links clicked in that message.

Channel specifics:
  • This metric may not return values under the following circumstances:
    • Data is only captured if the shortening and tracking functionality is enabled when sending messages through Infobip's SaaS products/tools or API.
    • Tracking may not be available for all channels, for example Apple Messages for Business or Messenger. Please check the full list.
  • For Email, we are taking into consideration only unique clicks.
Unique click-through rateUNIQUE_CLICK_THROUGH_RATEThe percentage of unique recipients who clicked on a link compared to the total number of messages delivered, counting each recipient only once regardless of the number of links clicked in that message.

Channel specifics:
  • This metric may not return values under the following circumstances:
    • Data is only captured if the shortening and tracking functionality is enabled when sending messages through Infobip's SaaS products/tools or API.
    • Tracking may not be available for all channels, for example Apple Messages for Business or Messenger. Please check the full list.
  • For Email, we return the percentage of recipients who clicked on a link within an email campaign.
Unique clicked URLsUNIQUE_URL_CLICK_COUNTThe number of unique URLs clicked in a single message.

Channel specifics:
  • This metric may not return values under the following circumstances:
    • Data is only captured if the shortening and tracking functionality is enabled when sending messages through Infobip's SaaS products/tools or API.
    • Tracking may not be available for all channels, for example Apple Messages for Business or Messenger. Please check the full list.
Click-to-open rate (CTOR)CLICK_TO_OPEN_RATEThe percentage of recipients counted as unique clicks divided by unique opens or seens (each recipient is counted only once regardless of the number of links clicked in that message).
Total clicksTOTAL_CLICKS_COUNTThe total number of clicks on all URLs within a single message, including multiple clicks on the same link. For example, if a message contains 3 links and each link is clicked twice, the total clicks count is 6.

Channel specifics:
  • This metric may not return values under the following circumstances:
    • Data is only captured if the shortening and tracking functionality is enabled when sending messages through Infobip's SaaS products/tools or API.
    • Tracking may not be available for all channels, for example Apple Messages for Business or Messenger. Please check the full list.
  • For Email, we count the number of clicks per email. We count every URL click except the unsubscribe link.
Click rateTOTAL_CLICK_RATEThe percentage of recipients who clicked on any link, calculated as the total number of clicks across all URLs within a message divided by the total number of delivered messages. For instance, if 200 SMS messages are sent and there are 400 total clicks, the TOTAL_CLICK_RATE is 200%.
  • Feedback
Metrics nameAPI syntaxDescription
UnsubscribesUNSUBSCRIBED_USER_COUNTThe number of recipients who unsubscribed (opted out) from future communications sent from the sending address.

Channel specifics:
  • Retrievable only for Email.
Unsubscribe rateUNSUBSCRIBED_USER_RATEThe percentage of recipients who unsubscribed (opted out) from future communications sent from the sending address.

Channel specifics:
  • Retrievable only for Email.
Spam complaintsEMAIL_COMPLAINTS_COUNTThe number of emails that recipients reported as spam.

Channel specifics:
  • Retrievable only for Email.
Spam complaints rateEMAIL_COMPLAINTS_RATEThe percentage of emails that recipients reported as spam.

Channel specifics:
  • Retrievable only for Email.

Aggregation/Dimensions

You can view metrics in meaningful groupings. For example, total traffic counts become much more impactful when you view them for each sender, network, or country.

Our API provides extensive options (aggregateBy) for data aggregation, including grouping by time intervals, message status, and error types. This grouping functionality simplifies data analysis and aids in extracting meaningful insights from large datasets.

Dimension nameDescription
ACCOUNT_KEYGroups results by account key in the response, showing corresponding account key values.
HOURGroups results by hour, showing corresponding timestamp values.
DAYGroups results by day, showing corresponding day values.
WEEK_SATURDAY_STARTGroups results by week starting from Saturday, showing corresponding timestamp values.
WEEK_SUNDAY_STARTGroups results by week starting from Sunday, showing corresponding timestamp values.
WEEK_MONDAY_STARTGroups results by week starting from Monday, showing corresponding timestamp values.
MONTHGroups results by month, showing corresponding month values.
QUARTERGroups results by quarter, showing corresponding quarter values.
YEARGroups results by year, showing corresponding year values.
TIME_TO_DELIVERGroups results by 'time to deliver' period, showing corresponding 'time to deliver' period description value.
TIME_TO_CLICK_FROM_SEENGroups results by the difference in time (sec) between a message click and seen events, showing the calculated values.
TIME_TO_CLICK_FROM_DELIVEREDGroups results by the difference in time (sec) between a message click and delivered events, showing the calculated values.
TIME_TO_SEEN_FROM_DELIVEREDGroups results by the difference in time (sec) between a message seen and delivered events, showing the calculated values.
CHANNEL_CODEGroups results by channel, showing corresponding channel code values.
CHANNEL_NAMEGroups results by channel name, showing corresponding channel name values.
DIRECTIONGroups results by the traffic direction, showing corresponding direction values: OUTBOUND for traffic sent to a client and INBOUND for traffic received from a client.
TRAFFIC_TYPEGroups results by traffic type, showing corresponding traffic type values.
SENDERGroups results by sender, showing corresponding sender values.
SENDER_TYPEGroups results by sender type, showing corresponding sender type values.
SENDER_DOMAINGroups the results by sender domain showing corresponding sender domain values.
RECIPIENT_DOMAINGroups the results by recipient domain showing corresponding recipient domain values.
URLGroups results by the initial URL from a message, showing corresponding URL values.

Please note that you cannot use aggregateBy URL with the non-URL measures. UNIQUE_URL_CLICK_COUNT would be valid, while TOTAL_TRAFFIC_COUNT would NOT be valid.
COMMUNICATIONGroups results by communication, showing corresponding communication ID value.
CAMPAIGN_REFERENCEGroups results by campaign reference, showing corresponding campaign reference ID value.
NETWORK_IDGroups results by network, showing corresponding network ID values.
NETWORK_NAMEGroups results by network, showing corresponding network name values.
COUNTRY_IDGroups results by country, showing corresponding country ID values.
COUNTRY_NAMEGroups results by country, showing corresponding country name values.
APPLICATION_IDGroups results by application, showing corresponding application ID values.
ENTITY_IDGroups results by entity, showing corresponding entity ID values.
STATUS_GROUPGroups results by status group, showing corresponding status group values of a response.
STATUSGroups results by status name, showing corresponding status values of a response.
ERROR_GROUPGroups results by error group, showing corresponding error group values of a response.
ERROR_CODEGroups results by error code, showing their corresponding error code values of a response.

Forced Aggregation by CHANNEL_CODE:

  • The CHANNEL_CODE dimension is always included in the results, regardless of whether it is specified in the aggregateBy parameter. This ensures the integrity and accuracy of the calculated metrics. For example, even if you request aggregation only by HOUR, the results will still include the CHANNEL_CODE dimension.
  • If neither CHANNEL_CODE nor CHANNEL_NAME is specified in the initial request, the CHANNEL_CODE dimension will be implicitly added to the results.
  • If you choose to aggregate by CHANNEL_NAME, the CHANNEL_CODE will not be added automatically. This allows clients the flexibility to have both values if needed.

Filters

Customize your queries with an array of filtering options to limit results by specific characteristics. With this flexibility, you can retrieve your data according to your specific requirements.

FilterAPI syntaxDescriptionRequired
AccountsaccountKeysTargets specific accounts based on accountKeys (opens in a new tab).
Restrictions apply for legacy accounts.
No
Sub-accountsincludeSubaccountsIncludes subaccount traffic data for comprehensive analysis.No
Sent time rangesentSincesIncludes a specific message time frame.Yes
sentUntil
Engagement timeframetimeToDeliverRepresents the time within which a message is delivered using time buckets. For instance, you can filter only messages delivered within 1 second. The from bucket is inclusive, while the to bucket is exclusive.No
timeToClickFromSeenRepresents 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.
timeToClickFromDeliveredRepresents the time within which a URL is clicked after the message is delivered using time buckets. For example, you can filter only messages whose URLs were clicked within 1 second after they were delivered. The from bucket is inclusive, while the to bucket is exclusive.
timeToSeenFromDeliveredRepresents the time within which a message is seen after the message is delivered using time buckets. For example, you can filter only messages that were seen within 1 second after they were delivered. The from bucket is inclusive, while the to bucket is exclusive.
Statuses and error codesstatusGroupsFilter by specific status or error codes.No
statuses
errorGroups
errorCodes
DirectiondirectionCategorizes traffic based on direction, distinguishing between outbound and inbound messages.No
ChannelchannelCodeCategorizes traffic based on communication channels.Yes
Traffic typetrafficTypesList of possible values for traffic typesNo
SendersendersFilters traffic based on specific senders or sender types.
List of possible values for sender types.
No
Sender typesenderTypesNo
Communication IDcommunicationIdsCategorizes traffic based on specific identifiers such as communication IDs. It is only applicable for traffic sent over Infobip SaaS solutions, such as Broadcast or Moments (Flow).No
Campaign reference IDcampaignReferenceIdsCategorizes traffic based on specific identifiers such as campaign reference IDs. It is only applicable for traffic sent over Infobip APIs.No
NetworknetworkIdsCategorizes traffic based on specific identifiers, such as network IDs, or country IDs.No
CountrycountryIdsNo
ApplicationapplicationIdBy including additional CPaaSX parameters like applicationId and entityId, you can get valuable insights into the source and purpose of your communication activities, aiding in more accurate analysis and decision-making.

Use these parameters if you are using CPaaSX concepts and features.

Learn more about CPaaSX here.
No
EntityentityIdNo

Channels

The following is a list of available channels and services and their codes:

Dimension nameDescription
SMSSMS
EMAILEmail
EMAILVALIDEmail validation
FBFacebook Messenger
IMInstagram Messaging
KAKAOAKakao Alim
KAKAOCKakao Chingu
KAKAOSKakao Sangdam
LINELNSLINE Official Notification
LINEOALINE Official Account
MMSMMS
NLNumber lookup
RCSRCS
TELEGRAMTelegram
VIBERViber Business Messages
VIBERBOTSViber Bots
WHATSAPPWhatsApp
ZALONSZalo Notification Service
APPLECBApple Messages for Business

trafficTypes

In messaging platforms like WhatsApp and RCS, traffic types categorize messaging interactions based on their nature and purpose, influencing how they are billed. For WhatsApp, traffic types include Marketing, Utility, Authentication, and Service Conversations, each with its distinct billing criteria. Meanwhile, RCS categorizes messages as Basic Transactions, Single Transactions, A2P Conversation or P2A Conversation. Understanding these traffic types is essential for businesses to efficiently handle their messaging operations. It helps interpret the INTERACTION_COUNT metric, specifically designed to analyze messaging traffic in detail.

IDNameDescription
1UTILITY_CONVERSATIONWA Utility conversation
2AUTHENTICATION_CONVERSATIONWA Authentication conversation
3MARKETING_CONVERSATIONWA Marketing conversation
4SERVICE_CONVERSATIONWA Service conversation
5BASIC_TRANSACTION_BASED_MESSAGERCS basic transaction based message
6SINGLE_TRANSACTION_BASED_MESSAGERCS single transaction based message
7A2P_CONVERSATIONRCS A2P (Application-to-Person) conversation
8P2A_CONVERSATIONRCS P2A (Person-to-Application) conversation

senderTypes

The table below outlines various sender types available for messaging operations, each serving specific purposes and catering to different regions.

IDNameDescription
1ALPHANUMERICAlphanumeric sender
2SHORT_CODEShort numbers
3TOLL_FREE_NUMBERN Toll free number (Limited to North America)
4VIRTUAL_LONG_NUMBERVirtual long number
510DLC10DLC (Limited to North America)
6DOMAINUsed for Email

Sender types for some channels like Viber BM or RCS are mapped to their channel value, as specific sender types are not relevant to them.

Need assistance

Explore Infobip Tutorials

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Service Terms & ConditionsPrivacy policyTerms of use