curl --request POST \
--url https://api.simpu.co/sms/send \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"recipients": "2348023456789, 2348098765432",
"sender_id": "Simpu",
"channel": "sms",
"content": "Hello! World. This is a test message.",
"template_id": "674535b2b39158b9aae90188fcec23eb",
"personalisation": [
{
"to": "2348023456789",
"substitutions": {
"name": "John Doe"
}
}
],
"external_ref": "674535b2b39158b9aae90188fcec23eb",
"is_trackable": false,
"callback": "https://example.com/sms/delivery_report"
}
'import requests
url = "https://api.simpu.co/sms/send"
payload = {
"recipients": "2348023456789, 2348098765432",
"sender_id": "Simpu",
"channel": "sms",
"content": "Hello! World. This is a test message.",
"template_id": "674535b2b39158b9aae90188fcec23eb",
"personalisation": [
{
"to": "2348023456789",
"substitutions": { "name": "John Doe" }
}
],
"external_ref": "674535b2b39158b9aae90188fcec23eb",
"is_trackable": False,
"callback": "https://example.com/sms/delivery_report"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipients: '2348023456789, 2348098765432',
sender_id: 'Simpu',
channel: 'sms',
content: 'Hello! World. This is a test message.',
template_id: '674535b2b39158b9aae90188fcec23eb',
personalisation: [{to: '2348023456789', substitutions: {name: 'John Doe'}}],
external_ref: '674535b2b39158b9aae90188fcec23eb',
is_trackable: false,
callback: 'https://example.com/sms/delivery_report'
})
};
fetch('https://api.simpu.co/sms/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.simpu.co/sms/send",
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([
'recipients' => '2348023456789, 2348098765432',
'sender_id' => 'Simpu',
'channel' => 'sms',
'content' => 'Hello! World. This is a test message.',
'template_id' => '674535b2b39158b9aae90188fcec23eb',
'personalisation' => [
[
'to' => '2348023456789',
'substitutions' => [
'name' => 'John Doe'
]
]
],
'external_ref' => '674535b2b39158b9aae90188fcec23eb',
'is_trackable' => false,
'callback' => 'https://example.com/sms/delivery_report'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.simpu.co/sms/send"
payload := strings.NewReader("{\n \"recipients\": \"2348023456789, 2348098765432\",\n \"sender_id\": \"Simpu\",\n \"channel\": \"sms\",\n \"content\": \"Hello! World. This is a test message.\",\n \"template_id\": \"674535b2b39158b9aae90188fcec23eb\",\n \"personalisation\": [\n {\n \"to\": \"2348023456789\",\n \"substitutions\": {\n \"name\": \"John Doe\"\n }\n }\n ],\n \"external_ref\": \"674535b2b39158b9aae90188fcec23eb\",\n \"is_trackable\": false,\n \"callback\": \"https://example.com/sms/delivery_report\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.simpu.co/sms/send")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recipients\": \"2348023456789, 2348098765432\",\n \"sender_id\": \"Simpu\",\n \"channel\": \"sms\",\n \"content\": \"Hello! World. This is a test message.\",\n \"template_id\": \"674535b2b39158b9aae90188fcec23eb\",\n \"personalisation\": [\n {\n \"to\": \"2348023456789\",\n \"substitutions\": {\n \"name\": \"John Doe\"\n }\n }\n ],\n \"external_ref\": \"674535b2b39158b9aae90188fcec23eb\",\n \"is_trackable\": false,\n \"callback\": \"https://example.com/sms/delivery_report\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.simpu.co/sms/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipients\": \"2348023456789, 2348098765432\",\n \"sender_id\": \"Simpu\",\n \"channel\": \"sms\",\n \"content\": \"Hello! World. This is a test message.\",\n \"template_id\": \"674535b2b39158b9aae90188fcec23eb\",\n \"personalisation\": [\n {\n \"to\": \"2348023456789\",\n \"substitutions\": {\n \"name\": \"John Doe\"\n }\n }\n ],\n \"external_ref\": \"674535b2b39158b9aae90188fcec23eb\",\n \"is_trackable\": false,\n \"callback\": \"https://example.com/sms/delivery_report\"\n}"
response = http.request(request)
puts response.read_body{
"id": "674535b2b39158b9aae90188fcec23eb",
"recipients": [
"2348023456789"
],
"sender_id": "Simpu",
"is_trackable": false,
"content": "Hello! World. This is a test message.",
"external_ref": "674535b2b39158b9aae90188fcec23eb",
"callback": "https://example.com/sms/delivery_report",
"template_id": "674535b2b39158b9aae90188fcec23eb",
"personalisation": [
{
"to": "2348023456789",
"substitutions": {
"name": "John Doe"
}
}
],
"created_datetime": "2024-06-28T23:56:38.128604+00:00",
"updated_datetime": "2024-06-28T23:56:38.128604+00:00",
"meta": {
"method": "POST",
"resource": "/send/sms",
"estimate": {
"available_balance": 1000.5,
"charge": 3,
"encoding": "UTF-8",
"message_length": 160,
"pages": 1
}
}
}{
"status": 200,
"message": "Invalid request",
"errors": [
{
"field": "name",
"message": "Error in field: 'name' Field required.",
"type": "missing"
}
]
}Send SMS
Send an SMS message
curl --request POST \
--url https://api.simpu.co/sms/send \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"recipients": "2348023456789, 2348098765432",
"sender_id": "Simpu",
"channel": "sms",
"content": "Hello! World. This is a test message.",
"template_id": "674535b2b39158b9aae90188fcec23eb",
"personalisation": [
{
"to": "2348023456789",
"substitutions": {
"name": "John Doe"
}
}
],
"external_ref": "674535b2b39158b9aae90188fcec23eb",
"is_trackable": false,
"callback": "https://example.com/sms/delivery_report"
}
'import requests
url = "https://api.simpu.co/sms/send"
payload = {
"recipients": "2348023456789, 2348098765432",
"sender_id": "Simpu",
"channel": "sms",
"content": "Hello! World. This is a test message.",
"template_id": "674535b2b39158b9aae90188fcec23eb",
"personalisation": [
{
"to": "2348023456789",
"substitutions": { "name": "John Doe" }
}
],
"external_ref": "674535b2b39158b9aae90188fcec23eb",
"is_trackable": False,
"callback": "https://example.com/sms/delivery_report"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipients: '2348023456789, 2348098765432',
sender_id: 'Simpu',
channel: 'sms',
content: 'Hello! World. This is a test message.',
template_id: '674535b2b39158b9aae90188fcec23eb',
personalisation: [{to: '2348023456789', substitutions: {name: 'John Doe'}}],
external_ref: '674535b2b39158b9aae90188fcec23eb',
is_trackable: false,
callback: 'https://example.com/sms/delivery_report'
})
};
fetch('https://api.simpu.co/sms/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.simpu.co/sms/send",
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([
'recipients' => '2348023456789, 2348098765432',
'sender_id' => 'Simpu',
'channel' => 'sms',
'content' => 'Hello! World. This is a test message.',
'template_id' => '674535b2b39158b9aae90188fcec23eb',
'personalisation' => [
[
'to' => '2348023456789',
'substitutions' => [
'name' => 'John Doe'
]
]
],
'external_ref' => '674535b2b39158b9aae90188fcec23eb',
'is_trackable' => false,
'callback' => 'https://example.com/sms/delivery_report'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.simpu.co/sms/send"
payload := strings.NewReader("{\n \"recipients\": \"2348023456789, 2348098765432\",\n \"sender_id\": \"Simpu\",\n \"channel\": \"sms\",\n \"content\": \"Hello! World. This is a test message.\",\n \"template_id\": \"674535b2b39158b9aae90188fcec23eb\",\n \"personalisation\": [\n {\n \"to\": \"2348023456789\",\n \"substitutions\": {\n \"name\": \"John Doe\"\n }\n }\n ],\n \"external_ref\": \"674535b2b39158b9aae90188fcec23eb\",\n \"is_trackable\": false,\n \"callback\": \"https://example.com/sms/delivery_report\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.simpu.co/sms/send")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recipients\": \"2348023456789, 2348098765432\",\n \"sender_id\": \"Simpu\",\n \"channel\": \"sms\",\n \"content\": \"Hello! World. This is a test message.\",\n \"template_id\": \"674535b2b39158b9aae90188fcec23eb\",\n \"personalisation\": [\n {\n \"to\": \"2348023456789\",\n \"substitutions\": {\n \"name\": \"John Doe\"\n }\n }\n ],\n \"external_ref\": \"674535b2b39158b9aae90188fcec23eb\",\n \"is_trackable\": false,\n \"callback\": \"https://example.com/sms/delivery_report\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.simpu.co/sms/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipients\": \"2348023456789, 2348098765432\",\n \"sender_id\": \"Simpu\",\n \"channel\": \"sms\",\n \"content\": \"Hello! World. This is a test message.\",\n \"template_id\": \"674535b2b39158b9aae90188fcec23eb\",\n \"personalisation\": [\n {\n \"to\": \"2348023456789\",\n \"substitutions\": {\n \"name\": \"John Doe\"\n }\n }\n ],\n \"external_ref\": \"674535b2b39158b9aae90188fcec23eb\",\n \"is_trackable\": false,\n \"callback\": \"https://example.com/sms/delivery_report\"\n}"
response = http.request(request)
puts response.read_body{
"id": "674535b2b39158b9aae90188fcec23eb",
"recipients": [
"2348023456789"
],
"sender_id": "Simpu",
"is_trackable": false,
"content": "Hello! World. This is a test message.",
"external_ref": "674535b2b39158b9aae90188fcec23eb",
"callback": "https://example.com/sms/delivery_report",
"template_id": "674535b2b39158b9aae90188fcec23eb",
"personalisation": [
{
"to": "2348023456789",
"substitutions": {
"name": "John Doe"
}
}
],
"created_datetime": "2024-06-28T23:56:38.128604+00:00",
"updated_datetime": "2024-06-28T23:56:38.128604+00:00",
"meta": {
"method": "POST",
"resource": "/send/sms",
"estimate": {
"available_balance": 1000.5,
"charge": 3,
"encoding": "UTF-8",
"message_length": 160,
"pages": 1
}
}
}{
"status": 200,
"message": "Invalid request",
"errors": [
{
"field": "name",
"message": "Error in field: 'name' Field required.",
"type": "missing"
}
]
}Authorizations
An API key to authenticate requests
Body
SMS message object
Recipients of the SMS message, comma separated list of phone numbers
"2348023456789, 2348098765432"
Sender ID of the SMS message
11"Simpu"
Channel to send the SMS message
sms, whatsapp "sms"
Content of the SMS message, this is required if a template ID is not specified
"Hello! World. This is a test message."
Template ID of the SMS message, this is required if content is not specified
"674535b2b39158b9aae90188fcec23eb"
Personalisation of the SMS message, this is applicable if a template ID is specified
Show child attributes
Show child attributes
This is a reference to the message in your system
"674535b2b39158b9aae90188fcec23eb"
This determines if links in the message should be tracked, links in the message will be replaced with trackable links
false
This is the URL to receive delivery reports for the message test
"https://example.com/sms/delivery_report"
Response
SMS response
Unique ID of the SMS message
"674535b2b39158b9aae90188fcec23eb"
Recipients of the SMS message
["2348023456789"]
Sender ID of the SMS message
11"Simpu"
This determines if links in the message should be tracked
false
Content of the SMS message
"Hello! World. This is a test message."
This is a reference to the message in your system
"674535b2b39158b9aae90188fcec23eb"
This is the URL to receive delivery reports for the message
"https://example.com/sms/delivery_report"
Template ID of the SMS message
"674535b2b39158b9aae90188fcec23eb"
Personalisation of the SMS message
Show child attributes
Show child attributes
Date and time the SMS was created
"2024-06-28T23:56:38.128604+00:00"
Date and time the SMS token was last updated, if any
"2024-06-28T23:56:38.128604+00:00"
Show child attributes
Show child attributes