Loader

Stop message


Overview

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 the future or may be queued within our router. It cannot stop messages that have already been delivered to an SMSC.


Command
delmsg

Parameters
  • You need to supply the authentication parameters that are outlined in Getting started with our APIs.
  • You need to pass either apimsgid or climsgid.

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

All examples below are for the document/literal based server.

1
2
3
4
5
6
7
8
9
10
11

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.clickatell.com/soap/document_literal/webservice">
    <SOAP-ENV:Body>
        <ns1:delmsg>
            <api_id>123456</api_id>
            <user>MyUsername</user>
            <password>MyPassword</password>
            <apimsgid>57809dfd9296c9df57c84c16d69ceeef</apimsgid>
        </ns1:delmsg>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Code samples

PHP

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

<?php
$oClient new SoapClient(
    'http://api.clickatell.com/soap/document_literal/webservice?wsdl',
    array(
        'trace' => true,
        'keep_alive' => true
    )
);
 
// Query message
$aResult $oClient->delmsg(
    array(
        'api_id' => '123456',
        'user' => 'MyUsername',
        'password' => 'MyPassword',
        'apimsgid' => '57809dfd9296c9df57c84c16d69ceeef'
    )
);
 
echo '<pre>' . print_r($aResult,true) . '</pre>';
?>


API responses

Example response


Successful API response:

1
2
3
4
5
6
7
8

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.clickatell.com/soap/document_literal/webservice">
    <SOAP-ENV:Body>
        <ns1:delmsgResponse>
            <return>ID: 57809dfd9296c9df57c84c16d69ceeef Status: 006</return>
        </ns1:delmsgResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Error response:

1
2
3
4
5
6
7
8

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.clickatell.com/soap/document_literal/webservice">
    <SOAP-ENV:Body>
        <ns1:delmsgResponse>
            <return>ERR: 001, Authentication failed</return>
        </ns1:delmsgResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Return format


Successful API response:

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


Error response:

ERR: <error code>, <error description>

 

Did you find this information informative?

Other Resources

Ask the Community

Visit Stack Overflow to join our community of developers and find the answer you need

Contact Support

Contact our support team and one of our agents will be in touch with you to answer any questions you have