latestSwagger 2.02026-08-101561322.2 MB

3e4029d19684

Statistic

Get messaging statistics

<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Statistics/getMessagingStat" target="_blank">Try in sandbox</a><br>

get/api/v2/stats/messaging

Query parameters

by'off' | 'day' | 'month' | 'year'
  • off - to get total values per specified time interval;
  • day - to show values grouped by day;
  • month - to show values grouped by month;
  • year - to show values grouped by year.
startinteger

Time period start in UNIX timestamp format. The default is 7 days prior.

endinteger

Time period start in UNIX timestamp format. The default is today.

Response

Returned when successful.

replyRatenumber float nullable required

The number of incoming messages divided by the number of total messages.

datestring date-time nullable required

Time interval start: empty if the by parameter was set to off.

deliveryRatenumber float nullable required

Message delivery rate:the number of delivered messages divided by the number of total messages.

costsnumber float nullable required

Cost for sent messages during this period. The costs are in the Account currency.

messagesReceivedinteger nullable required

Total received messages count.

messagesSentDeliveredinteger nullable required

Delivered messages count. As messages are retried for up to 48 hours, this value could change.

messagesSentAcceptedinteger nullable required

Messages accepted for delivery (in queue) but not yet delivered.

messagesSentBufferedinteger nullable required

Messages buffered by endpoint cell phone operators.

messagesSentFailedinteger nullable required

Messages that have failed for whatever reason, e.g. the destination phone was switched off for 48 hours or the recipient's phone account is out of service.

messagesSentRejectedinteger nullable required

Messages that were rejected: invalid Sender ID used (e.g. you cannot use the Sender ID or your own mobile number when sending to the United States and Canada.)

messagesSentPartsinteger nullable required

Total sent messages parts count. Note that this is not equal to the sent messages count, because one message could consist of 1 to 6 parts and users are charged per part, not per message.

Example response

[
  {
    "replyRate": 0.32,
    "date": "2014-09-19T00:00:00+0000",
    "deliveryRate": 0.95,
    "costs": 30.15,
    "messagesReceived": 1085,
    "messagesSentDelivered": 11893,
    "messagesSentAccepted": 2,
    "messagesSentFailed": 3,
    "messagesSentRejected": 50,
    "messagesSentParts": 15080
  }
]