Send an SMS
curl --request POST \
--url https://api.robase.dev/v1/sms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "+2348012345678",
"from": "SHUTTLERS",
"body": "<string>",
"template": "<string>",
"variables": {},
"country": "NG",
"send_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.robase.dev/v1/sms"
payload = {
"to": "+2348012345678",
"from": "SHUTTLERS",
"body": "<string>",
"template": "<string>",
"variables": {},
"country": "NG",
"send_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '+2348012345678',
from: 'SHUTTLERS',
body: JSON.stringify('<string>'),
template: '<string>',
variables: {},
country: 'NG',
send_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.robase.dev/v1/sms', 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.robase.dev/v1/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([
'to' => '+2348012345678',
'from' => 'SHUTTLERS',
'body' => '<string>',
'template' => '<string>',
'variables' => [
],
'country' => 'NG',
'send_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.robase.dev/v1/sms"
payload := strings.NewReader("{\n \"to\": \"+2348012345678\",\n \"from\": \"SHUTTLERS\",\n \"body\": \"<string>\",\n \"template\": \"<string>\",\n \"variables\": {},\n \"country\": \"NG\",\n \"send_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.robase.dev/v1/sms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"+2348012345678\",\n \"from\": \"SHUTTLERS\",\n \"body\": \"<string>\",\n \"template\": \"<string>\",\n \"variables\": {},\n \"country\": \"NG\",\n \"send_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.robase.dev/v1/sms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"+2348012345678\",\n \"from\": \"SHUTTLERS\",\n \"body\": \"<string>\",\n \"template\": \"<string>\",\n \"variables\": {},\n \"country\": \"NG\",\n \"send_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to": "+2348012345678",
"from": "SHUTTLERS",
"body": "<string>",
"segments": 123,
"country": "NG",
"carrier": "mtn_ng",
"provider": "beem",
"provider_message_id": "<string>",
"provider_attempts": [
{
"provider": "<string>",
"attempted_at": "2023-11-07T05:31:56Z",
"ok": true,
"provider_message_id": "<string>",
"error_code": "<string>",
"error_message": "<string>"
}
],
"cost": {
"amount_kobo": 123,
"currency": "NGN"
},
"test_mode": true,
"created_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"field": "<string>"
}
}SMS
Send an SMS
POST
/
sms
Send an SMS
curl --request POST \
--url https://api.robase.dev/v1/sms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "+2348012345678",
"from": "SHUTTLERS",
"body": "<string>",
"template": "<string>",
"variables": {},
"country": "NG",
"send_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.robase.dev/v1/sms"
payload = {
"to": "+2348012345678",
"from": "SHUTTLERS",
"body": "<string>",
"template": "<string>",
"variables": {},
"country": "NG",
"send_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '+2348012345678',
from: 'SHUTTLERS',
body: JSON.stringify('<string>'),
template: '<string>',
variables: {},
country: 'NG',
send_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.robase.dev/v1/sms', 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.robase.dev/v1/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([
'to' => '+2348012345678',
'from' => 'SHUTTLERS',
'body' => '<string>',
'template' => '<string>',
'variables' => [
],
'country' => 'NG',
'send_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.robase.dev/v1/sms"
payload := strings.NewReader("{\n \"to\": \"+2348012345678\",\n \"from\": \"SHUTTLERS\",\n \"body\": \"<string>\",\n \"template\": \"<string>\",\n \"variables\": {},\n \"country\": \"NG\",\n \"send_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.robase.dev/v1/sms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"+2348012345678\",\n \"from\": \"SHUTTLERS\",\n \"body\": \"<string>\",\n \"template\": \"<string>\",\n \"variables\": {},\n \"country\": \"NG\",\n \"send_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.robase.dev/v1/sms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"+2348012345678\",\n \"from\": \"SHUTTLERS\",\n \"body\": \"<string>\",\n \"template\": \"<string>\",\n \"variables\": {},\n \"country\": \"NG\",\n \"send_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to": "+2348012345678",
"from": "SHUTTLERS",
"body": "<string>",
"segments": 123,
"country": "NG",
"carrier": "mtn_ng",
"provider": "beem",
"provider_message_id": "<string>",
"provider_attempts": [
{
"provider": "<string>",
"attempted_at": "2023-11-07T05:31:56Z",
"ok": true,
"provider_message_id": "<string>",
"error_code": "<string>",
"error_message": "<string>"
}
],
"cost": {
"amount_kobo": 123,
"currency": "NGN"
},
"test_mode": true,
"created_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"field": "<string>"
}
}Authorizations
Pass your API key as Authorization: Bearer rb_live_...
Headers
Body
application/json
E.164 phone number.
Example:
"+2348012345678"
Registered sender ID, ≤ 11 chars.
Example:
"SHUTTLERS"
Message body (required unless template is set).
Slug or UUID of an SMS template.
Template variables (required when template is set).
ISO-3166 alpha-2 override.
Example:
"NG"
Schedule for a future time.
Response
Accepted — queued for delivery.
Available options:
queued, scheduled, sent, delivered, failed, rejected, cancelled Example:
"+2348012345678"
Example:
"SHUTTLERS"
Available options:
GSM7, UCS2 Example:
"NG"
Example:
"mtn_ng"
Example:
"beem"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I