Send message
curl --request POST \
--url https://api.sendo.dev/v1/message/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"campaign": "<string>",
"body": "<string>",
"to": "<string>",
"from": "<string>",
"mediaUrls": {},
"metadata": {}
}
'import requests
url = "https://api.sendo.dev/v1/message/send"
payload = {
"campaign": "<string>",
"body": "<string>",
"to": "<string>",
"from": "<string>",
"mediaUrls": {},
"metadata": {}
}
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({
campaign: '<string>',
body: JSON.stringify('<string>'),
to: '<string>',
from: '<string>',
mediaUrls: {},
metadata: {}
})
};
fetch('https://api.sendo.dev/v1/message/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.sendo.dev/v1/message/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([
'campaign' => '<string>',
'body' => '<string>',
'to' => '<string>',
'from' => '<string>',
'mediaUrls' => [
],
'metadata' => [
]
]),
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.sendo.dev/v1/message/send"
payload := strings.NewReader("{\n \"campaign\": \"<string>\",\n \"body\": \"<string>\",\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"mediaUrls\": {},\n \"metadata\": {}\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.sendo.dev/v1/message/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"campaign\": \"<string>\",\n \"body\": \"<string>\",\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"mediaUrls\": {},\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendo.dev/v1/message/send")
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 \"campaign\": \"<string>\",\n \"body\": \"<string>\",\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"mediaUrls\": {},\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"id": "f7d258bd-f697-4840-b8a6-165707e12345"
}
{
"success": false,
"error": "Message body required"
}
Message
Send message
Send SMS/MMS to a recipient.
POST
/
v1
/
message
/
send
Send message
curl --request POST \
--url https://api.sendo.dev/v1/message/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"campaign": "<string>",
"body": "<string>",
"to": "<string>",
"from": "<string>",
"mediaUrls": {},
"metadata": {}
}
'import requests
url = "https://api.sendo.dev/v1/message/send"
payload = {
"campaign": "<string>",
"body": "<string>",
"to": "<string>",
"from": "<string>",
"mediaUrls": {},
"metadata": {}
}
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({
campaign: '<string>',
body: JSON.stringify('<string>'),
to: '<string>',
from: '<string>',
mediaUrls: {},
metadata: {}
})
};
fetch('https://api.sendo.dev/v1/message/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.sendo.dev/v1/message/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([
'campaign' => '<string>',
'body' => '<string>',
'to' => '<string>',
'from' => '<string>',
'mediaUrls' => [
],
'metadata' => [
]
]),
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.sendo.dev/v1/message/send"
payload := strings.NewReader("{\n \"campaign\": \"<string>\",\n \"body\": \"<string>\",\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"mediaUrls\": {},\n \"metadata\": {}\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.sendo.dev/v1/message/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"campaign\": \"<string>\",\n \"body\": \"<string>\",\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"mediaUrls\": {},\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendo.dev/v1/message/send")
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 \"campaign\": \"<string>\",\n \"body\": \"<string>\",\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"mediaUrls\": {},\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"id": "f7d258bd-f697-4840-b8a6-165707e12345"
}
{
"success": false,
"error": "Message body required"
}
Before sending messages, you must create a campaign. Once approved, use the
campaign ID on your dashboard when sending API calls.Body
string
required
Body of the text message to send (max 1500 characters).
string
required
Phone number of the recipient. Must be format.
string
Phone number to send from (optional). Must be format.
[string]
Array of media file URLs to send as MMS. Guide here.
object
Object with custom string key-value pairs. Guide here.
Response
boolean
required
Whether the message was sent successfully.
string
The ID of the message that was sent.
string
Error message if the request fails.
Errors
If the request fails, it will return an HTTP error status code and anerror field in the response body with details. Full list of status codes here.
Click here to read our full message deliverability guide
{
"success": true,
"id": "f7d258bd-f697-4840-b8a6-165707e12345"
}
{
"success": false,
"error": "Message body required"
}
⌘I

