SMS sending (MT)

end point: https://api.smsdev.com.br/v1/send

Method: POST, GET ou JSON

Description: Sending SMS can be sent 1 (one) or N message (s) per request.

In return, the id of the message in the SMS Dev. It can be used later for consultation.


Description of parameters

Name Type Standard Required Overview
key text true Account authentication key.
type number true Type of service: 9-Sms.
number number yes Ex recipient number: 5511988887777 or 11988887777.
msg text yes Message text.
refer text (100) not User reference for message identification.
flash number not Determines whether the message is of the Flash (Pop-up) type.
Ex: & flash = 1
jobdate text current date not Scheduling date for shipment Ex: 01/01/2016.
jobtime text current time not Scheduling time for shipping Ex: 10:30.

Each message is made up of 160 characters. If the message is longer, 1 credit is charged for every 160 characters.

Was this article helpful to you?

			
				https://api.smsdev.com.br/v1/send?key=SUA_CHAVE_KEY&type=9&number=11988887777&msg=Teste de envio
			
			
    

Copy and paste in the browser

			
[
    {
		"key" : "XXXXXXXXXXXXXXXXXXXX",
		"type" : 9,
		"number" : 11988887777,
		"msg" : "Teste de envio 1"
    },
    {
        "key" : "XXXXXXXXXXXXXXXXXXXX",
        "type" : 9,
        "number" : 62988886666,
        "msg" : "Linha 1\nLinha 2"
    }
]
				
			
		
			
curl -G --data-urlencode 'msg=Teste de envio' --request GET \
  --url 'https://api.smsdev.com.br/v1/send?key=SUA_CHAVE_KEY&type=9&number=11988887777' 

		
			
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.smsdev.com.br/v1/send?key=SUA_CHAVE_KEY&type=9&number=11988887777&msg=".urlencode("Teste de envio"),
  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/send?key=SUA_CHAVE_KEY&type=9&number=11988887777&msg=Teste").asString();


		
			

	var http = require("http");

var options = {
			"method": "GET",
			"hostname": "api.smsdev.com.br",
			"port": null,
			"path": "/v1/send?key=SUA_CHAVE_KEY&type=9&number=11988887777&msg="+encodeURIComponent("Teste de envio"),
			"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" : "637849052",
		"descricao" : "MENSAGEM NA FILA"
	},
	{
		"situacao" : "OK",
		"codigo" : "1",
		"id" : "637849053",
		"descricao" : "MENSAGEM NA FILA"
	}
]
		
	
Return description
Name Overview
situation “OK” - Successful submission
"ERROR" - Submission with error
code See error code table.
id Unique ID of the sent message.
description Description of the operation or error.