Message counts, grouped by status and time period.
Response format | JSON |
---|---|
Requires authentication? | Yes |
start_date optional | Beginning time range for this query. |
---|---|
end_date optional | Ending time range for this query. |
carrier optional | Filter by the Subscriber's Carrier. |
status optional | Array of message statuses by which to filter. |
channel optional | Filter by Channel. Aliased as channel_sid and channel_name. |
# Get all status
curl -X GET \
-u '[SID]:[TOKEN]' \
'https://api.essential.to/v2/account/messages/analytics/status'
# Sample response
[
{
"month": 2,
"status": "delivered",
"count": 9957
},
{
"month": 2,
"status": "undelivered",
"count": 3931
},
{
"month": 2,
"status": "sent",
"count": 822
},
{
"month": 2,
"status": "unreachable",
"count": 11203
},
{
"month": 2,
"status": "invalid_phone_number",
"count": 27
},
...
]
# Get all status since February 14th 2017
curl -X GET \
-u '[SID]:[TOKEN]' \
'https://api.essential.to/v2/account/messages/analytics/status' \
-G -d 'start_date=2017-02-14'
# Status in January
curl -X GET \
-u '[SID]:[TOKEN]' \
'https://api.essential.to/v2/account/messages/analytics/status' \
-G -d 'start_date=2017-01-01' -d 'end_date=2017-02-01'
# Status for a specified carrier
curl -X GET \
-u '[SID]:[TOKEN]' \
'https://api.essential.to/v2/account/messages/analytics/status' \
-G -d 'carrier=T-Mobile USA, Inc.'
# Meesages for a specified status such as 'sent', 'unreachable' etc.
curl -X GET \
-u '[SID]:[TOKEN]' \
'https://api.essential.to/v2/account/messages/analytics/status' \
-G -d 'status=unreachable'
# Messages for a specified channel
curl -X GET \
-u '[SID]:[TOKEN]' \
'https://api.essential.to/v2/account/messages/analytics/status' \
-G -d 'channel=p03Gjl8Uzn0RkZSpHXHnrw'
Python coming soon.
Node coming soon.