Message Metrics
Query Metrics Related to Messages
Fetch message attributes using various query parameters
Path parameters
workspaceIdstring · uuidRequired
The ID of the workspace
Query parameters
periodStartstring · date-timeRequired
The date and time in the format 'YYYY-MM-DDTHH:MM:SSZ' or 'YYYY-MM-DDTHH:MM:SS-HH:MM'.
periodEndstring · date-timeOptional
The date and time in the format 'YYYY-MM-DDTHH:MM:SSZ' or 'YYYY-MM-DDTHH:MM:SS-HH:MM'.
filterstringOptional
Filter conditions for which to fetch messages. Each condition is a string in the format of 'equals(field
,value
)'.
Available field-value pairs are
channelID
- UUID, can supply multiple equals conditions for multiple channelIdscampaignID
- UUID, can supply multiple equals conditions for multiple campaignIdsplatformID
- string, can supply multiple equals conditions for multiple platforms- Common values are 'sms-messagebird', 'email-sparkpost', 'whatsapp', and 'rcs-google'. More are possible and are returned in the response.
channelName
- string, exact match only.status
- string, can supply multiple equals conditions for multiple statuses- Allowed values are 'invalid', 'accepted', 'processing', 'sent', 'sending_failed', 'delivered', 'delivery_failed', 'deleted', or 'scheduled'.
direction
- string, message direction- Allowed values are 'in', 'out', 'invalid'
receiverCountry
- string, can supply multiple equals conditions for multiple receiver countries- Allowed values are ISO 3166-1 two character country codes
channelSenderType
- string, can supply multiple equals conditions for multiple channel sender types- Allowed values are 'long-code-number', 'short-code-number', 'alpha-number'
sender
- string, can supply multiple equals conditions for multiple senders- Examples include sender phone numbers or email addresses. Exact match only. If '+' is used, it must be URL encoded as '%2B'.
failureCodes
- string, can supply multiple equals conditions for multiple failure codes- Examples include
15001
,14001
,12006
etc
- Examples include
Responses
200
An array of messages
application/json
422
The request did not pass validation
application/json
get
GET /workspaces/{workspaceId}/reporting/messages?periodStart=2025-07-12T04%3A27%3A01.995Z HTTP/1.1
Host:
Accept: */*
[
{
"ChannelID": "text",
"ChannelName": "text",
"ChannelSenderType": "text",
"CampaignID": "text",
"ChargeableUnits": 1,
"PartCount": 1,
"PlatformID": "text",
"Status": "text",
"FailureCode": "text",
"CreatedAt": "2025-07-12T04:27:01.995Z",
"SentAt": "2025-07-12T04:27:01.995Z",
"DeliveredAt": "2025-07-12T04:27:01.995Z",
"Direction": "text",
"From": {
"Key": "text",
"Value": "text",
"CountryCode": "text"
},
"To": {
"Value": [
"text"
],
"CountryCodes": [
"text"
]
},
"MessageType": "text",
"ExtraInformation": {
"Operator": "text",
"MailboxProvider": "text",
"MailboxProviderRegion": "text"
},
"UseCase": "text",
"Activity": {
"OpenedAt": "2025-07-12T04:27:01.995Z",
"ClickedAt": "2025-07-12T04:27:01.995Z"
}
}
]
Last updated
Was this helpful?