Delivery reports
GET – https://{baseUrl}/sms/1/reports
This method allows you to get one time delivery reports for sent SMS.
Response format
On success, response header HTTP status code will be 200 OK and the message will be sent.
If you try to send message without authorization, you will receive an error 401 Unauthorized.
SMSReportResponse
Parameter
|
Type
|
Description
|
---|---|---|
results
|
SentSMSReport
|
Collection of reports, one per every message.
|
SentSMSReport
Parameter
|
Type
|
Description
|
---|---|---|
bulkId
|
String
|
Bulk ID.
|
messageId
|
String
|
Message ID.
|
to
|
String
|
Destination address.
|
from
|
String
|
Sender ID that can be alphanumeric or numeric.
|
sentAt
|
Date
|
Tells when the SMS was sent. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
|
doneAt
|
Date
|
Tells when the SMS was finished processing by our system (ie. delivered to destination, delivered to destination network, etc.)
|
smsCount
|
int
|
Number of parts the sent SMS was split into.
|
mccMnc
|
String
|
Mobile country and network codes.
|
callbackData
|
String
|
Callback data sent through 'callbackData' field in fully featured SMS message
|
price
|
Price
|
Sent SMS price.
|
status
|
Status
|
Indicates whether the message is successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.
|
error
|
Error
|
Indicates whether the error occurred during the query execution.
|
Price
Parameter
|
Type
|
Description
|
---|---|---|
pricePerMessage
|
BigDecimal
|
Price per one SMS.
|
currency
|
String
|
The currency in which the price is expressed.
|
Status
Parameter
|
Type
|
Description
|
---|---|---|
groupId
|
int
|
Status group ID.
|
groupName
|
String
|
Status group name.
|
id
|
int
|
Status ID.
|
name
|
String
|
Status name.
|
description
|
String
|
Human readable description of the status.
|
action
|
String
|
Action that should be taken to eliminate the error.
|
Error
Parameter
|
Type
|
Description
|
---|---|---|
groupId
|
int
|
Error group ID.
|
groupName
|
String
|
Error group name.
|
id
|
int
|
Error ID.
|
name
|
String
|
Error name.
|
description
|
String
|
Human readable description of the error.
|
permanent
|
boolean
|
Tells if the error is permanent.
|
curl -L -X GET 'https://example.com/sms/1/reports?messageId=MESSAGE-ID-123-xyz&limit' \
-H 'Authorization: {authorization}' \
-H 'Accept: application/json'
Response 200-Result Example
{
"results": [
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "MESSAGE-ID-123-xyz",
"to": "41793026727",
"sentAt": "2019-11-09T16:00:00.000+0000",
"doneAt": "2019-11-09T16:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
},
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "12db39c3-7822-4e72-a3ec-c87442c0ffc5",
"to": "41793026834",
"sentAt": "2019-11-09T17:00:00.000+0000",
"doneAt": "2019-11-09T17:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
}
]
}
Response 400-Result Example
{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Bad request"
}
}
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'GET',
'hostname': 'example.com',
'path': '/sms/1/reports?messageId=MESSAGE-ID-123-xyz&limit=null',
'headers': {
'Authorization': '{authorization}',
'Accept': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
Response 200-Result Example
{
"results": [
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "MESSAGE-ID-123-xyz",
"to": "41793026727",
"sentAt": "2019-11-09T16:00:00.000+0000",
"doneAt": "2019-11-09T16:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
},
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "12db39c3-7822-4e72-a3ec-c87442c0ffc5",
"to": "41793026834",
"sentAt": "2019-11-09T17:00:00.000+0000",
"doneAt": "2019-11-09T17:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
}
]
}
Response 400-Result Example
{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Bad request"
}
}
}
require "uri"
require "net/http"
url = URI("example.com/sms/1/reports?messageId=MESSAGE-ID-123-xyz&limit")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "{authorization}"
request["Accept"] = "application/json"
response = https.request(request)
puts response.read_body
Response 200-Result Example
{
"results": [
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "MESSAGE-ID-123-xyz",
"to": "41793026727",
"sentAt": "2019-11-09T16:00:00.000+0000",
"doneAt": "2019-11-09T16:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
},
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "12db39c3-7822-4e72-a3ec-c87442c0ffc5",
"to": "41793026834",
"sentAt": "2019-11-09T17:00:00.000+0000",
"doneAt": "2019-11-09T17:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
}
]
}
Response 400-Result Example
{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Bad request"
}
}
}
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = ''
headers = {
'Authorization': '{authorization}',
'Accept': 'application/json'
}
conn.request("GET", "/sms/1/reports?messageId=MESSAGE-ID-123-xyz&limit=null", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response 200-Result Example
{
"results": [
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "MESSAGE-ID-123-xyz",
"to": "41793026727",
"sentAt": "2019-11-09T16:00:00.000+0000",
"doneAt": "2019-11-09T16:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
},
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "12db39c3-7822-4e72-a3ec-c87442c0ffc5",
"to": "41793026834",
"sentAt": "2019-11-09T17:00:00.000+0000",
"doneAt": "2019-11-09T17:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
}
]
}
Response 400-Result Example
{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Bad request"
}
}
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'example.com/sms/1/reports?messageId=MESSAGE-ID-123-xyz&limit',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: {authorization}',
'Accept: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response 200-Result Example
{
"results": [
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "MESSAGE-ID-123-xyz",
"to": "41793026727",
"sentAt": "2019-11-09T16:00:00.000+0000",
"doneAt": "2019-11-09T16:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
},
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "12db39c3-7822-4e72-a3ec-c87442c0ffc5",
"to": "41793026834",
"sentAt": "2019-11-09T17:00:00.000+0000",
"doneAt": "2019-11-09T17:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
}
]
}
Response 400-Result Example
{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Bad request"
}
}
}
var client = new RestClient("https:example.com/sms/1/reports?messageId=MESSAGE-ID-123-xyz&limit");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "{authorization}");
request.AddHeader("Accept", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Response 200-Result Example
{
"results": [
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "MESSAGE-ID-123-xyz",
"to": "41793026727",
"sentAt": "2019-11-09T16:00:00.000+0000",
"doneAt": "2019-11-09T16:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
},
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "12db39c3-7822-4e72-a3ec-c87442c0ffc5",
"to": "41793026834",
"sentAt": "2019-11-09T17:00:00.000+0000",
"doneAt": "2019-11-09T17:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
}
]
}
Response 400-Result Example
{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Bad request"
}
}
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://example.com/sms/1/reports?messageId=MESSAGE-ID-123-xyz&limit")
.method("GET", null)
.addHeader("Authorization", "{authorization}")
.addHeader("Accept", "application/json")
.build();
Response response = client.newCall(request).execute();
Response 200-Result Example
{
"results": [
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "MESSAGE-ID-123-xyz",
"to": "41793026727",
"sentAt": "2019-11-09T16:00:00.000+0000",
"doneAt": "2019-11-09T16:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
},
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "12db39c3-7822-4e72-a3ec-c87442c0ffc5",
"to": "41793026834",
"sentAt": "2019-11-09T17:00:00.000+0000",
"doneAt": "2019-11-09T17:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
}
]
}
Response 400-Result Example
{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Bad request"
}
}
}
var settings = {
"url": "https://example.com/sms/1/reports?messageId=MESSAGE-ID-123-xyz&limit",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "{authorization}",
"Accept": "application/json"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response 200-Result Example
{
"results": [
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "MESSAGE-ID-123-xyz",
"to": "41793026727",
"sentAt": "2019-11-09T16:00:00.000+0000",
"doneAt": "2019-11-09T16:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
},
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "12db39c3-7822-4e72-a3ec-c87442c0ffc5",
"to": "41793026834",
"sentAt": "2019-11-09T17:00:00.000+0000",
"doneAt": "2019-11-09T17:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
}
]
}
Response 400-Result Example
{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Bad request"
}
}
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/sms/1/reports?messageId=MESSAGE-ID-123-xyz&limit"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "{authorization}")
req.Header.Add("Accept", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response 200-Result Example
{
"results": [
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "MESSAGE-ID-123-xyz",
"to": "41793026727",
"sentAt": "2019-11-09T16:00:00.000+0000",
"doneAt": "2019-11-09T16:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
},
{
"bulkId": "BULK-ID-123-xyz",
"messageId": "12db39c3-7822-4e72-a3ec-c87442c0ffc5",
"to": "41793026834",
"sentAt": "2019-11-09T17:00:00.000+0000",
"doneAt": "2019-11-09T17:00:00.000+0000",
"smsCount": 1,
"price": {
"pricePerMessage": 0.01,
"currency": "EUR"
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
},
"entityId": "my-entity-id",
"applicationId": "my-application-id"
}
]
}
Response 400-Result Example
{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Bad request"
}
}
}