SMS API Gateway features and advantages

Automation of the sending and receiving of your SMS messages is possible thanks to SMS APIs. Workflows can be accelerated and made more effective by using APIs, which eliminates the need for manual staff management.

The SMS API can take the place of a manual operation carried out between two programs. Similar to this, if your company consistently delivers the same message, an SMS API can distribute it without any manual intervention. Time-sensitive communications can be set to transmit at a specific time, ensuring that customers get their appointment reminders, confirmations, or status updates at the appropriate intervals

By automating operations with an SMS API, you may better allocate resources, free up staff time for more important work, and guarantee that communications are sent out as needed.

With delivery receipts that show your application the precise time each message was delivered to the user's handset, an API makes it possible to trace messages. In the event of non-delivery, this permits escalation and gives your application an audit trail.

You are not limited to merely sending and receiving text messages while using our SMS API. You can manage contacts, add or remove contact groups, create short URLs, get SMS balances, get message reports and more. The SMS API from SMS Connexion is one of the world's most flexible and adaptable API gateways. Register for an API key and use our SMS gateway right away.

SMS API for developers

Use our reliable SMS Marketing API to send your marketing text messages directly to your customers phones, or simply send reminders, loyalty messages, newsletters and whatever message your business needs to convey SMS API to send SMS to every network.

import requests

url = "https://api.sms.cx/sms"

payload = {
    "to": ["+31612469333"],
    "from": "InfoText",
    "text": "Your confirmation code is 5443"
}
headers = {
    "content-type": "application/json",
    "Authorization": "Bearer <ACCESS_TOKEN>"
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.sms.cx/sms")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["Authorization"] = 'Bearer <ACCESS_TOKEN>'
request.body = "{\"to\":[\"+31612469333\"],\"from\":\"InfoText\",\"text\":\"Your confirmation code is 5443\"}"

response = http.request(request)
puts response.read_body

const data = JSON.stringify({
  "to": [
    "+31612469333"
  ],
  "from": "InfoText",
  "text": "Your confirmation code is 5443"
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.sms.cx/sms");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("Authorization", "Bearer <ACCESS_TOKEN>");

xhr.send(data);
const http = require("https");

const options = {
  "method": "POST",
  "hostname": "api.sms.cx",
  "port": null,
  "path": "/sms",
  "headers": {
    "content-type": "application/json",
    "Authorization": "Bearer <ACCESS_TOKEN>"
  }
};

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

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

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

req.write(JSON.stringify({to: ['+31612469333'], from: 'InfoText', text: 'Your confirmation code is 5443'}));
req.end();
<?php

$curl = curl_init();

$postFields = [
	'to' => '+31612469333',
	'from' => 'InfoText',
	'text' => 'Your confirmation code is 5443',
];

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.sms.cx/sms",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode($postFields),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <ACCESS_TOKEN>",
    "content-type: application/json"
  ],
]);

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

curl_close($curl);

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

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"to\":[\"+31612469333\"],\"from\":\"InfoText\",\"text\":\"Your confirmation code is 5443\"}");
Request request = new Request.Builder()
  .url("https://api.sms.cx/sms")
  .post(body)
  .addHeader("content-type", "application/json")
  .addHeader("Authorization", "Bearer <ACCESS_TOKEN>")
  .build();

Response response = client.newCall(request).execute();

var client = new RestClient("https://api.sms.cx/sms");
var request = new RestRequest(Method.POST);

request.AddHeader("content-type", "application/json");
request.AddHeader("Authorization", "Bearer <ACCESS_TOKEN>");
request.AddParameter("application/json", "{\"to\":[\"+31612469333\"],\"from\":\"InfoText\",\"text\":\"Your confirmation code is 5443\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.sms.cx/sms"

	payload := strings.NewReader("{\"to\":[\"+31612469333\"],\"from\":\"InfoText\",\"text\":\"Your confirmation code is 5443\"}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("Authorization", "Bearer <ACCESS_TOKEN>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
curl --request POST \
  --url https://api.sms.cx/sms \
  --header 'Authorization: Bearer <ACCESS_TOKEN>' \
  --header 'content-type: application/json' \
  --data '{"to":["+31612469333"],"from":"InfoText","text":"Your confirmation code is 5443"}'