Send SMS
GET /v2/sms/send
GET
/v2/sms/send
Sends an SMS message using query string parameters.
Suitable for quick tests via browser, Postman, or cURL. For production, prefer the POST method with a JSON body.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” msg
required
string
GSM-encoded message (max 160 characters)
Example
Hello World! phone
required
string
10-digit destination phone number (Mexico, without country code)
Example
8100001234 sender
string
Sender ID authorized by carrier (optional)
Example
AWESOMEINC id
string
External reference ID for your own tracking (optional)
Example
external-id-relationResponses
Section titled “ Responses ”SMS sent successfully
object
status
boolean
true error
boolean
description
object
added_on
string format: date-time
2023-09-20 16:47:15 charge
number format: float
0.99 country
object
country
string
MEXICO iso_code
string
MX type
string
MOVIL encoding
string
gsm id
integer
199999 job_id
string
199999 length
integer
12 message
string
Hello World! number
string
segments
integer
1 sender
string
AWESOMEINCExample
{ "status": true, "error": false, "description": { "added_on": "2023-09-20 16:47:15", "charge": 0.99, "country": { "country": "MEXICO", "iso_code": "MX", "type": "MOVIL" }, "encoding": "gsm", "id": 199999, "job_id": "199999", "length": 12, "message": "Hello World!", "number": "8100001234", "segments": 1, "sender": "AWESOMEINC" }}Missing required parameters
Example
{ "status": false, "error": true, "description": "Missing params, please verify or contact to support"}Your key auth is not valid
Example
{ "status": false, "error": true, "description": "Your key auth is not valid, please check with your administrator to get the new key"}Your account doesn’t have credits available for sending
Example
{ "status": false, "error": true, "description": "Your account doesn't have credits available for this, please contact your administrator"}Country or carrier not reachable or assigned to your account
Example
{ "status": false, "error": true, "description": "Country or carrier not reachable or assigned to your account, please contact an administrator or support"}Failed to append to the queue, no need to resend
Example
{ "status": false, "error": true, "description": "Failed to append to the queue, no need to resend"}Your account doesn’t have multi-message sending enabled
Example
{ "status": false, "error": true, "description": "Your account doesn't have multi-message sending enabled, please contact your administrator"}Examples
Section titled “Examples ”Useful for guiding users to view code examples in different developer languages.
curl -X GET "https://api.example.com/v2/sms/send?msg=Hello+World%21&phone=8100001234&sender=AWESOMEINC&id=external-id-relation" \ -H "Accept: application/json" \ -H "Connection: keep-alive" \ -H "Authorization: Basic <base64-encoded-credentials>" const fetch = require('node-fetch');
fetch("https://api.example.com/v2/sms/send?msg=Hello+World%21&phone=8100001234&sender=AWESOMEINC&id=external-id-relation", { method: "GET", headers: { "Accept": "application/json", "Connection": "keep-alive", "Authorization": "Basic <base64-encoded-credentials>"} }) .then(res => res.json()) .then(console.log) .catch(console.error); <?php $curl = curl_init();
curl_setopt_array($curl, [ CURLOPT_URL => "https://api.example.com/v2/sms/send?msg=Hello+World%21&phone=8100001234&sender=AWESOMEINC&id=external-id-relation", CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Connection: keep-alive", "Authorization: Basic <base64-encoded-credentials>" ] ]);
$response = curl_exec($curl); curl_close($curl); echo $response; ?> using System.Net.Http; using System.Text; using System.Threading.Tasks;
var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.GET, "https://api.example.com/v2/sms/send?msg=Hello+World%21&phone=8100001234&sender=AWESOMEINC&id=external-id-relation"); request.Headers.Add("Accept", "application/json");request.Headers.Add("Connection", "keep-alive");request.Headers.Add("Authorization", "Basic <base64-encoded-credentials>"); var response = await client.SendAsync(request); var responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseBody); import requests import json
url = "https://api.example.com/v2/sms/send?msg=Hello+World%21&phone=8100001234&sender=AWESOMEINC&id=external-id-relation" headers = { "Accept": "application/json", "Connection": "keep-alive", "Authorization": "Basic <base64-encoded-credentials>" }
response = requests.get(url, headers=headers) print(response.text) import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.nio.charset.StandardCharsets;
public class ApiExample { public static void main(String[] args) throws Exception { URL url = new URL("https://api.example.com/v2/sms/send?msg=Hello+World%21&phone=8100001234&sender=AWESOMEINC&id=external-id-relation"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET");
conn.setRequestProperty("Accept", "application/json"); conn.setRequestProperty("Connection", "keep-alive"); conn.setRequestProperty("Authorization", "Basic <base64-encoded-credentials>");
int code = conn.getResponseCode(); System.out.println("Response code: " + code); } }