HTTP API - Stop messages

This command will attempt to stop the delivery of a particular message. This command can only stop messages that have been scheduled for delivery in future or may be queued within our router. It cannot stop messages that have already been delivered to a SMSC.


Command

https://api.clickatell.com/http/delmsg?user=xxxx&password=xxxx&api_id=xxxx&apimsgid=xxxx

Parameters

You also need to supply your authentication parameters.

Parameter

Description

apimsgid

This is the API message ID you get back when you send a message.

climsgid

This is the message ID that you specified when you generated a message.



Examples

Bash:

username="place username here"
password="place password here"
api_id="place password here"
apiMsgId="place message ID here"

curl --data "user=$username&password=$password&api_id=$api_id&apimsgid=$apiMsgId" \
    'https://api.clickatell.com/http/delmsg'

PHP:

<?php
$username = urlencode("place username here");
$password = urlencode("place password here");
$api_id   = urlencode("place api_id here");

$apiMsgId = "place message ID here";

echo file_get_contents("https://api.clickatell.com/http/delmsg"
    . "?user=$username&password=$password&api_id=$api_id&apimsgid=$apiMsgId");
?>

Python:

import urllib2, urllib

params = {
    "user": "place username here",
    "password": "place password here",
    "api_id": "place password here",
    "apimsgid": "place message ID here"
}

params = urllib.urlencode(params)
f = urllib2.urlopen("https://api.clickatell.com/http/delmsg", params)
print f.read()>


API responses

Example response

Successful API response:

ID: f6b9af2a2c9e5b18ee2d257e3def5d66 Status: 006

Error response:

ERR: 001, Authentication failed


Format

Successful API response:

ID: <message ID> Status: <status ID>

Error response:

ERR: <error code>, <error description>