Cancel Scheduled SMS
This request is used to cancel a scheduled SMS.
URL
GET
https://api.smspartner.fr/v1/message-cancel
Note: You cannot cancel a scheduled SMS if it is due to be sent within the next 5 minutes.
Required Parameters
Name
Value
apiKey
messageId
ID of the message. It can be found in the response of the send.
Optional Parameters
Name
Value
_format
json
or xml
Requests
<?php
// Prepare data for GET request
$data = 'apiKey=YOUR_API_KEY&messageId=300';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,'https://api.smspartner.fr/v1/message-cancel?'.$data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
$result = curl_exec($curl);
curl_close($curl);
// Process your response here
echo $result;
?>
Response
{
"success": true,
"code": 200,
"message": "The SMS sending has been canceled."
}
Errors
{
"success": false,
"code": 10,
"message": "Invalid API key"
}
Error Codes
Response Code
Message
1
API key is required
3
Message ID is required
4
Message not found
5
The SMS has already been canceled
6
It is not possible to cancel an SMS if it is due to be sent within the next 5 minutes
10
Invalid API key
11
Not enough credits
Last updated