Request a sender
curl --request POST \
--url https://api.sendbaze.com/v1/senders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "AcmeShop",
"useCase": "Order confirmations and delivery updates for our online shop, and monthly offers to customers who opted in.",
"countries": [
"ZA",
"BW"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
value: 'AcmeShop',
useCase: 'Order confirmations and delivery updates for our online shop, and monthly offers to customers who opted in.',
countries: ['ZA', 'BW']
})
};
fetch('https://api.sendbaze.com/v1/senders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendbaze.com/v1/senders"
payload = {
"value": "AcmeShop",
"useCase": "Order confirmations and delivery updates for our online shop, and monthly offers to customers who opted in.",
"countries": ["ZA", "BW"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.sendbaze.com/v1/senders")
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 \"value\": \"AcmeShop\",\n \"useCase\": \"Order confirmations and delivery updates for our online shop, and monthly offers to customers who opted in.\",\n \"countries\": [\n \"ZA\",\n \"BW\"\n ]\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sendbaze.com/v1/senders",
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([
'value' => 'AcmeShop',
'useCase' => 'Order confirmations and delivery updates for our online shop, and monthly offers to customers who opted in.',
'countries' => [
'ZA',
'BW'
]
]),
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.sendbaze.com/v1/senders"
payload := strings.NewReader("{\n \"value\": \"AcmeShop\",\n \"useCase\": \"Order confirmations and delivery updates for our online shop, and monthly offers to customers who opted in.\",\n \"countries\": [\n \"ZA\",\n \"BW\"\n ]\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))
}{
"id": "sdr_01j9x7k2r4m8q3v5n6b7c8d9e0",
"value": "AcmeShop",
"kind": "numeric",
"status": "requested",
"isDefault": true,
"useCase": "<string>",
"countries": [
"ZA",
"BW"
],
"caveats": [
"<string>"
],
"reviewNote": "<string>",
"requestedAt": "2023-11-07T05:31:56Z",
"reviewedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "domain_not_verified",
"message": "yourshop.co.za is not a verified sending domain of this organisation.",
"docs": "https://docs.sendbaze.com/errors#domain_not_verified"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"docs": "<string>",
"fields": {},
"limit": 123,
"upgradeUrl": "<string>",
"topUpUrl": "<string>",
"settingsUrl": "<string>",
"domainsUrl": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "The request has invalid fields.",
"docs": "https://docs.sendbaze.com/errors#validation_error",
"fields": {
"to.1": [
"must be a valid email address"
]
}
}
}Senders
Request a sender
Asks for a dedicated sender: a number your organisation owns, or a brand name of 3 to 11 letters and digits.
Sendbaze registers it with the networks and approves or rejects it (you are emailed); until then a send that names
it answers 403 sender_not_approved. The first approved sender becomes your default. Requires sms:send and a plan
that includes dedicated senders (Growth and up; 403 plan_limit otherwise). One request per sender value.
POST
/
v1
/
senders
Request a sender
curl --request POST \
--url https://api.sendbaze.com/v1/senders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "AcmeShop",
"useCase": "Order confirmations and delivery updates for our online shop, and monthly offers to customers who opted in.",
"countries": [
"ZA",
"BW"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
value: 'AcmeShop',
useCase: 'Order confirmations and delivery updates for our online shop, and monthly offers to customers who opted in.',
countries: ['ZA', 'BW']
})
};
fetch('https://api.sendbaze.com/v1/senders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendbaze.com/v1/senders"
payload = {
"value": "AcmeShop",
"useCase": "Order confirmations and delivery updates for our online shop, and monthly offers to customers who opted in.",
"countries": ["ZA", "BW"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.sendbaze.com/v1/senders")
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 \"value\": \"AcmeShop\",\n \"useCase\": \"Order confirmations and delivery updates for our online shop, and monthly offers to customers who opted in.\",\n \"countries\": [\n \"ZA\",\n \"BW\"\n ]\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sendbaze.com/v1/senders",
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([
'value' => 'AcmeShop',
'useCase' => 'Order confirmations and delivery updates for our online shop, and monthly offers to customers who opted in.',
'countries' => [
'ZA',
'BW'
]
]),
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.sendbaze.com/v1/senders"
payload := strings.NewReader("{\n \"value\": \"AcmeShop\",\n \"useCase\": \"Order confirmations and delivery updates for our online shop, and monthly offers to customers who opted in.\",\n \"countries\": [\n \"ZA\",\n \"BW\"\n ]\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))
}{
"id": "sdr_01j9x7k2r4m8q3v5n6b7c8d9e0",
"value": "AcmeShop",
"kind": "numeric",
"status": "requested",
"isDefault": true,
"useCase": "<string>",
"countries": [
"ZA",
"BW"
],
"caveats": [
"<string>"
],
"reviewNote": "<string>",
"requestedAt": "2023-11-07T05:31:56Z",
"reviewedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "domain_not_verified",
"message": "yourshop.co.za is not a verified sending domain of this organisation.",
"docs": "https://docs.sendbaze.com/errors#domain_not_verified"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"docs": "<string>",
"fields": {},
"limit": 123,
"upgradeUrl": "<string>",
"topUpUrl": "<string>",
"settingsUrl": "<string>",
"domainsUrl": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "The request has invalid fields.",
"docs": "https://docs.sendbaze.com/errors#validation_error",
"fields": {
"to.1": [
"must be a valid email address"
]
}
}
}Authorizations
Body
application/json
Response
Requested