Sent messages logs

GET – https://{baseUrl}/sms/1/logs

This method allows you to get logs for sent SMS.

Response format

SMS logs are available for the last 48 hours!

If successful, response header HTTP status code will be 200 OK and the message logs will be returned. If you try to send a message without authorization, you will get a response with HTTP status code 401 Unauthorized.

If you are using this method too many times in a short period, you will get status code 429 Too Many Requests. This prevents misusing logs in cases where reports would be more appropriate.

SMSLogsResponse

Parameter
Type
Description
results
SentSMSLog
Collection of logs.

SentSMSLog

Parameter
Type
Description
bulkId
String
The ID that uniquely identifies the request.
messageId
String
The ID that uniquely identifies the message sent.
to
String
The message destination address.
from
String
Sender ID that can be alphanumeric or numeric.
text
String
Text of the message that was sent.
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
The number of sent message segments.
mccmnc
String
Mobile country and network codes.
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 -g -X GET 'https://example.com/sms/1/logs?bulkId=BULK-ID-123-xyz&sentSince=2015-02-22T17:42:05.390+0100&sentUntil=2015-02-22T19:42:05.390+0100' \
-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,
      "mccMnc": "22801",
      "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
      }
    },
    {
      "bulkId": "BULK-ID-123-xyz",
      "messageId": "MESSAGE-ID-ijkl-45",
      "to": "41793026834",
      "sentAt": "2019-11-09T17:00:00.000+0000",
      "doneAt": "2019-11-09T17:00:00.000+0000",
      "smsCount": 1,
      "mccMnc": "22801",
      "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
      }
    }
  ]
}
        

Response 400-Result Example

            {
  "requestError": {
    "serviceException": {
      "messageId": "string",
      "text": "string"
    }
  }
}
        
            var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
    'method': 'GET',
    'hostname': 'example.com',
    'path': '/sms/1/logs?bulkId=BULK-ID-123-xyz&sentSince=2015-02-22T17:42:05.390+0100&sentUntil=2015-02-22T19:42:05.390+0100',
    '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,
      "mccMnc": "22801",
      "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
      }
    },
    {
      "bulkId": "BULK-ID-123-xyz",
      "messageId": "MESSAGE-ID-ijkl-45",
      "to": "41793026834",
      "sentAt": "2019-11-09T17:00:00.000+0000",
      "doneAt": "2019-11-09T17:00:00.000+0000",
      "smsCount": 1,
      "mccMnc": "22801",
      "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
      }
    }
  ]
}
        

Response 400-Result Example

            {
  "requestError": {
    "serviceException": {
      "messageId": "string",
      "text": "string"
    }
  }
}
        
            require "uri"
require "net/http"

url = URI("https://example.com/sms/1/logs?bulkId=BULK-ID-123-xyz&sentSince=2015-02-22T17:42:05.390+0100&sentUntil=2015-02-22T19:42:05.390+0100")

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,
      "mccMnc": "22801",
      "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
      }
    },
    {
      "bulkId": "BULK-ID-123-xyz",
      "messageId": "MESSAGE-ID-ijkl-45",
      "to": "41793026834",
      "sentAt": "2019-11-09T17:00:00.000+0000",
      "doneAt": "2019-11-09T17:00:00.000+0000",
      "smsCount": 1,
      "mccMnc": "22801",
      "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
      }
    }
  ]
}
        

Response 400-Result Example

            {
  "requestError": {
    "serviceException": {
      "messageId": "string",
      "text": "string"
    }
  }
}
        
            import http.client

conn = http.client.HTTPSConnection("example.com")
payload = ''
headers = {
    'Authorization': '{authorization}',
    'Accept': 'application/json'
}
conn.request("GET", "/sms/1/logs?bulkId=BULK-ID-123-xyz&sentSince=2015-02-22T17:42:05.390+0100&sentUntil=2015-02-22T19:42:05.390+0100", 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,
      "mccMnc": "22801",
      "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
      }
    },
    {
      "bulkId": "BULK-ID-123-xyz",
      "messageId": "MESSAGE-ID-ijkl-45",
      "to": "41793026834",
      "sentAt": "2019-11-09T17:00:00.000+0000",
      "doneAt": "2019-11-09T17:00:00.000+0000",
      "smsCount": 1,
      "mccMnc": "22801",
      "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
      }
    }
  ]
}
        

Response 400-Result Example

            {
  "requestError": {
    "serviceException": {
      "messageId": "string",
      "text": "string"
    }
  }
}
        
            <?php

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://example.com/sms/1/logs?bulkId=BULK-ID-123-xyz&sentSince=2015-02-22T17:42:05.390+0100&sentUntil=2015-02-22T19:42:05.390+0100',
    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,
      "mccMnc": "22801",
      "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
      }
    },
    {
      "bulkId": "BULK-ID-123-xyz",
      "messageId": "MESSAGE-ID-ijkl-45",
      "to": "41793026834",
      "sentAt": "2019-11-09T17:00:00.000+0000",
      "doneAt": "2019-11-09T17:00:00.000+0000",
      "smsCount": 1,
      "mccMnc": "22801",
      "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
      }
    }
  ]
}
        

Response 400-Result Example

            {
  "requestError": {
    "serviceException": {
      "messageId": "string",
      "text": "string"
    }
  }
}
        
            var client = new RestClient("https://example.com/sms/1/logs?bulkId=BULK-ID-123-xyz&sentSince=2015-02-22T17:42:05.390+0100&sentUntil=2015-02-22T19:42:05.390+0100");
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,
      "mccMnc": "22801",
      "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
      }
    },
    {
      "bulkId": "BULK-ID-123-xyz",
      "messageId": "MESSAGE-ID-ijkl-45",
      "to": "41793026834",
      "sentAt": "2019-11-09T17:00:00.000+0000",
      "doneAt": "2019-11-09T17:00:00.000+0000",
      "smsCount": 1,
      "mccMnc": "22801",
      "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
      }
    }
  ]
}
        

Response 400-Result Example

            {
  "requestError": {
    "serviceException": {
      "messageId": "string",
      "text": "string"
    }
  }
}
        
            OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
Request request = new Request.Builder()
    .url("https://example.com/sms/1/logs?bulkId=BULK-ID-123-xyz&sentSince=2015-02-22T17:42:05.390+0100&sentUntil=2015-02-22T19:42:05.390+0100")
    .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,
      "mccMnc": "22801",
      "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
      }
    },
    {
      "bulkId": "BULK-ID-123-xyz",
      "messageId": "MESSAGE-ID-ijkl-45",
      "to": "41793026834",
      "sentAt": "2019-11-09T17:00:00.000+0000",
      "doneAt": "2019-11-09T17:00:00.000+0000",
      "smsCount": 1,
      "mccMnc": "22801",
      "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
      }
    }
  ]
}
        

Response 400-Result Example

            {
  "requestError": {
    "serviceException": {
      "messageId": "string",
      "text": "string"
    }
  }
}
        
            var settings = {
    "url": "https://example.com/sms/1/logs?bulkId=BULK-ID-123-xyz&sentSince=2015-02-22T17:42:05.390+0100&sentUntil=2015-02-22T19:42:05.390+0100",
    "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,
      "mccMnc": "22801",
      "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
      }
    },
    {
      "bulkId": "BULK-ID-123-xyz",
      "messageId": "MESSAGE-ID-ijkl-45",
      "to": "41793026834",
      "sentAt": "2019-11-09T17:00:00.000+0000",
      "doneAt": "2019-11-09T17:00:00.000+0000",
      "smsCount": 1,
      "mccMnc": "22801",
      "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
      }
    }
  ]
}
        

Response 400-Result Example

            {
  "requestError": {
    "serviceException": {
      "messageId": "string",
      "text": "string"
    }
  }
}
        
            package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://example.com/sms/1/logs?bulkId=BULK-ID-123-xyz&sentSince=2015-02-22T17:42:05.390+0100&sentUntil=2015-02-22T19:42:05.390+0100"
    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,
      "mccMnc": "22801",
      "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
      }
    },
    {
      "bulkId": "BULK-ID-123-xyz",
      "messageId": "MESSAGE-ID-ijkl-45",
      "to": "41793026834",
      "sentAt": "2019-11-09T17:00:00.000+0000",
      "doneAt": "2019-11-09T17:00:00.000+0000",
      "smsCount": 1,
      "mccMnc": "22801",
      "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
      }
    }
  ]
}
        

Response 400-Result Example

            {
  "requestError": {
    "serviceException": {
      "messageId": "string",
      "text": "string"
    }
  }
}
        
This is a staging enviroment