REST API v3: GET SMS mailing errors
You can use the REST API to retrieve all errors of an SMS mailing with an HTTP GET call to the following URL:
https://api.copernica.com/v3/smsmailing/$id/errors
Where $id should be replaced with the ID of the SMS mailing you want
summarized.
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. Don't forget to replace the ID in the URL before executing the call.
// 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("smsmailing/{$ID}/errors"));
This example requires the REST API class