REST API v3: GET SMS errors

You can use the REST API to retrieve all errors of all SMS mailings with an HTTP GET call to the following URL:

https://api.copernica.com/v3/sms/errors?access_token=xxxx

Parameters

The parameters for this method can be set to retrieve the statistics from a certain period. The following optional parameters are available:

  • begintime: The timestamp after which the errors must have occurred (YYYY-MM-DD HH:MM:SS format).
  • endtime: The timestamp before which the errors must have occurred (YYYY-MM-DD HH:MM:SS format).

Returned fields

The method returns a JSON object representing the following fields:

  • mailing: The ID of the SMS mailing
  • timestamp: The timestamp of the SMS mailing
  • profile: The ID of the profile of the recipient
  • subprofile: The ID of the subprofile of the recipient

JSON Example

The JSON might look something like this:

{
    "mailing": "56",
    "timestamp": "2025-11-29 10:25:52",
    "profile": "666353",
    "subprofile": null
}

PHP example

The script below demonstrates how to use this API method.

// dependencies
require_once('CopernicaRestAPI.php');

// change this into your access token
$api = new CopernicaRestAPI("your-access-token", 3);

// execute the call
print_r($api->get("sms/errors"));

This example requires the REST API class

More information