Cancel (MT)

Endpoint: https://api.smsdev.com.br/v1/cancel

Method: POST, GET ou JSON

Description: This method is used to cancel messages scheduled for sending (MT).


Description of parameters

Name Type Standard Required Description
key text yes Account authentication key.
id array number yes Unique ID of the sending message (MT).

Was this article helpful to you?

			

{
	"key" : "XXXXXXXXXXXXXXXXXXXX",
	"id" : [ 9999999, 8888888, 7777777]
	
}

				
			
		
			
				https://api.smsdev.com.br/v1/cancel?key=SUA_CHAVE_KEY&id=123456789
				
			
			
    

Copy and paste in the browser

			
curl --request GET \
  --url 'https://api.smsdev.com.br/v1/cancel?key=SUA_CHAVE_KEY&id=123456789'

		
			
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.smsdev.com.br/v1/cancel?key=SUA_CHAVE_KEY&id=123456789",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_SSL_VERIFYHOST => 0,
  CURLOPT_SSL_VERIFYPEER => 0,
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

?>
	
		
			
HttpResponse<String> response = Unirest.get("https://api.smsdev.com.br/v1/cancel?key=SUA_CHAVE_KEY&id=123456789").asString();


		
			

	var http = require("http");

var options = {
			"method": "GET",
			"hostname": "api.smsdev.com.br",
			"port": null,
			"path": "/v1/cancel?key=SUA_CHAVE_KEY&id=123456789",
			"headers": {}
		};

		var req = http.request(options, function (res) {
			var chunks = [];

			res.on("data", function (chunk) {
				chunks.push(chunk);
			});

			res.on("end", function () {
				var body = Buffer.concat(chunks);
				console.log(body.toString());
			});
		});

		req.end();

	
		
The above method returns code in the pattern below
		
[
	{ 
		 "situacao" : "OK",
		 "codigo" : "1",
		 "id" : "9999999",
		 "descricao" : "MENSAGEM CANCELADA COM SUCESSO"
	},
		{ 
		 "situacao" : "OK",
		 "codigo" : "1",
		 "id" : "8888888",
		 "descricao" : "MENSAGEM CANCELADA COM SUCESSO"
	}
]
		
	
Return description
Name Description
situation “OK” - Successful submission
"ERROR" - Submission with error
code See error code table.
id Sending message ID (MT).
description Description of the operation or error.