Get message statistics
SmsMmsMessageStatistics collection allows retrieving performance statistics for a specified message. A specific period of time can be chosen. Statistics include counters of sent, delivered, bounced messages as well as number of generated clicks, unsubscribes etc.
Request data format
Request URL parameters:
Element/attribute | Type | Notes |
---|---|---|
apiKey | string | Your API key, required for authentication. Required. |
ID | int | SMS/MMS message ID. Required as a part of address (not GET parameter). See example below. |
startDate | date | Start date. Optional. If not specified, message creation date will be taken. YYYY-MM-DD format. |
endDate | date | End date. Optional. If not specified, current date will be taken. YYYY-MM-DD format. |
Examples:
https://api.esv2.com/v2/Api/SmsMmsMessageStatistics/123?apiKey=YOUR_API_KEY_HERE
https://api.esv2.com/v2/Api/SmsMmsMessageStatistics/123?apiKey=YOUR_API_KEY_HERE&startDate=2017-05-20&endDate=2017-05-22
Response
Response Data element:
Element/attribute | Type | Notes |
---|---|---|
Sent | int | Number of sent messages. |
PartsSent | int | Number of sent parts. |
Bounced | int | Number of bounced messages. |
Delivered | int | Number of delivered (sent – bounced) messages. |
Clicks | int | Number of link clicks. |
Clickers | int | Number of unique subscribers that clicked any link. |
Unsubscribes | int | Number of unsubscriptions |
Examples
Request:
GET https://api.esv2.com/v2/Api/SmsMmsMessageStatistics/764?apiKey=test_api_key1 HTTP/1.1
Accept-Encoding: gzip,deflate
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.com
OK response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=conq5cmaq3mmpy455bkihvyd; path=/; HttpOnly
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 24 May 2010 13:03:04 GMT
Content-Length: 351
<ApiResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Data>
<Sent>9</Sent>
<PartsSent>13</PartsSent>
<Bounced>2</Bounced>
<Delivered>7</Delivered>
<Clicks>12</Clicks>
<Clickers>3</Clickers>
<Unsubscribes>0</Unsubscribes>
</Data>
</ApiResponse>