Create campaign
curl --request POST \
--url https://api.sendo.dev/v1/campaign/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "<string>",
"usecase": {
"2FA": "<string>",
"ACCOUNT_NOTIFICATION": "<string>",
"CUSTOMER_CARE": "<string>",
"DELIVERY_NOTIFICATION": "<string>",
"FRAUD_ALERT": "<string>",
"MARKETING": "<string>",
"POLLING_VOTING": "<string>",
"SECURITY_ALERT": "<string>",
"HIGHER_EDUCATION": "<string>",
"K12_EDUCATION": "<string>"
},
"brandId": "<string>",
"description": "<string>",
"consentFlow": "<string>",
"screenshotUrl": "<string>",
"sample1": "<string>",
"sample2": "<string>",
"sample3": "<string>",
"sample4": "<string>",
"sample5": "<string>",
"isLowVolume": true
}
'import requests
url = "https://api.sendo.dev/v1/campaign/create"
payload = {
"displayName": "<string>",
"usecase": {
"2FA": "<string>",
"ACCOUNT_NOTIFICATION": "<string>",
"CUSTOMER_CARE": "<string>",
"DELIVERY_NOTIFICATION": "<string>",
"FRAUD_ALERT": "<string>",
"MARKETING": "<string>",
"POLLING_VOTING": "<string>",
"SECURITY_ALERT": "<string>",
"HIGHER_EDUCATION": "<string>",
"K12_EDUCATION": "<string>"
},
"brandId": "<string>",
"description": "<string>",
"consentFlow": "<string>",
"screenshotUrl": "<string>",
"sample1": "<string>",
"sample2": "<string>",
"sample3": "<string>",
"sample4": "<string>",
"sample5": "<string>",
"isLowVolume": True
}
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({
displayName: '<string>',
usecase: {
'2FA': '<string>',
ACCOUNT_NOTIFICATION: '<string>',
CUSTOMER_CARE: '<string>',
DELIVERY_NOTIFICATION: '<string>',
FRAUD_ALERT: '<string>',
MARKETING: '<string>',
POLLING_VOTING: '<string>',
SECURITY_ALERT: '<string>',
HIGHER_EDUCATION: '<string>',
K12_EDUCATION: '<string>'
},
brandId: '<string>',
description: '<string>',
consentFlow: '<string>',
screenshotUrl: '<string>',
sample1: '<string>',
sample2: '<string>',
sample3: '<string>',
sample4: '<string>',
sample5: '<string>',
isLowVolume: true
})
};
fetch('https://api.sendo.dev/v1/campaign/create', 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/campaign/create",
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([
'displayName' => '<string>',
'usecase' => [
'2FA' => '<string>',
'ACCOUNT_NOTIFICATION' => '<string>',
'CUSTOMER_CARE' => '<string>',
'DELIVERY_NOTIFICATION' => '<string>',
'FRAUD_ALERT' => '<string>',
'MARKETING' => '<string>',
'POLLING_VOTING' => '<string>',
'SECURITY_ALERT' => '<string>',
'HIGHER_EDUCATION' => '<string>',
'K12_EDUCATION' => '<string>'
],
'brandId' => '<string>',
'description' => '<string>',
'consentFlow' => '<string>',
'screenshotUrl' => '<string>',
'sample1' => '<string>',
'sample2' => '<string>',
'sample3' => '<string>',
'sample4' => '<string>',
'sample5' => '<string>',
'isLowVolume' => true
]),
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/campaign/create"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"usecase\": {\n \"2FA\": \"<string>\",\n \"ACCOUNT_NOTIFICATION\": \"<string>\",\n \"CUSTOMER_CARE\": \"<string>\",\n \"DELIVERY_NOTIFICATION\": \"<string>\",\n \"FRAUD_ALERT\": \"<string>\",\n \"MARKETING\": \"<string>\",\n \"POLLING_VOTING\": \"<string>\",\n \"SECURITY_ALERT\": \"<string>\",\n \"HIGHER_EDUCATION\": \"<string>\",\n \"K12_EDUCATION\": \"<string>\"\n },\n \"brandId\": \"<string>\",\n \"description\": \"<string>\",\n \"consentFlow\": \"<string>\",\n \"screenshotUrl\": \"<string>\",\n \"sample1\": \"<string>\",\n \"sample2\": \"<string>\",\n \"sample3\": \"<string>\",\n \"sample4\": \"<string>\",\n \"sample5\": \"<string>\",\n \"isLowVolume\": true\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/campaign/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\",\n \"usecase\": {\n \"2FA\": \"<string>\",\n \"ACCOUNT_NOTIFICATION\": \"<string>\",\n \"CUSTOMER_CARE\": \"<string>\",\n \"DELIVERY_NOTIFICATION\": \"<string>\",\n \"FRAUD_ALERT\": \"<string>\",\n \"MARKETING\": \"<string>\",\n \"POLLING_VOTING\": \"<string>\",\n \"SECURITY_ALERT\": \"<string>\",\n \"HIGHER_EDUCATION\": \"<string>\",\n \"K12_EDUCATION\": \"<string>\"\n },\n \"brandId\": \"<string>\",\n \"description\": \"<string>\",\n \"consentFlow\": \"<string>\",\n \"screenshotUrl\": \"<string>\",\n \"sample1\": \"<string>\",\n \"sample2\": \"<string>\",\n \"sample3\": \"<string>\",\n \"sample4\": \"<string>\",\n \"sample5\": \"<string>\",\n \"isLowVolume\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendo.dev/v1/campaign/create")
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 \"displayName\": \"<string>\",\n \"usecase\": {\n \"2FA\": \"<string>\",\n \"ACCOUNT_NOTIFICATION\": \"<string>\",\n \"CUSTOMER_CARE\": \"<string>\",\n \"DELIVERY_NOTIFICATION\": \"<string>\",\n \"FRAUD_ALERT\": \"<string>\",\n \"MARKETING\": \"<string>\",\n \"POLLING_VOTING\": \"<string>\",\n \"SECURITY_ALERT\": \"<string>\",\n \"HIGHER_EDUCATION\": \"<string>\",\n \"K12_EDUCATION\": \"<string>\"\n },\n \"brandId\": \"<string>\",\n \"description\": \"<string>\",\n \"consentFlow\": \"<string>\",\n \"screenshotUrl\": \"<string>\",\n \"sample1\": \"<string>\",\n \"sample2\": \"<string>\",\n \"sample3\": \"<string>\",\n \"sample4\": \"<string>\",\n \"sample5\": \"<string>\",\n \"isLowVolume\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"campaign": {
"id": "U7fQ39nX",
"brandId": "A8wm4k2s",
"displayName": "Internal Testing",
"createdAt": "2023-09-21T00:42:01.007Z",
"updatedAt": "2023-09-21T00:42:01.007Z",
"status": "ACTIVE",
"monthlyFee": null,
"usecase": "MIXED",
"subUsecases": [
"CUSTOMER_CARE",
"ACCOUNT_NOTIFICATION"
],
"details": {
"description": "This campaign will be used for 2FA login codes.",
"consentFlow": "Users consent to receive SMS when making an account.",
"screenshotUrl": "https://sendo-images.s3.amazonaws.com/OTPVerification-7bf5878dc5.png",
"sample1": "Your Sendo login code is 123456.",
"sample2": "Your Sendo login code is 987654.",
"sample3": null,
"sample4": null,
"sample5": null,
"optinKeywords": [
"START",
"SUBSCRIBE"
],
"optoutKeywords": [
"STOP"
],
"helpKeywords": [
"HELP"
],
"optinMessage": "You've subscribed to receive messages from this number. Reply STOP to unsubscribe.",
"optoutMessage": "You will no longer receive messages from this number. Reply START to subscribe again.",
"helpMessage": "Text STOP to unsubscribe. Email support@sendo.dev with any questions."
},
"limits": {
"smsTpmAtt": null,
"mmsTpmAtt": null,
"dailyTmoCap": null
}
}
}
{
"success": false,
"error": "Insufficient account balance"
}
Campaign
Create campaign
This endpoint creates a campaign.
POST
/
v1
/
campaign
/
create
Create campaign
curl --request POST \
--url https://api.sendo.dev/v1/campaign/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "<string>",
"usecase": {
"2FA": "<string>",
"ACCOUNT_NOTIFICATION": "<string>",
"CUSTOMER_CARE": "<string>",
"DELIVERY_NOTIFICATION": "<string>",
"FRAUD_ALERT": "<string>",
"MARKETING": "<string>",
"POLLING_VOTING": "<string>",
"SECURITY_ALERT": "<string>",
"HIGHER_EDUCATION": "<string>",
"K12_EDUCATION": "<string>"
},
"brandId": "<string>",
"description": "<string>",
"consentFlow": "<string>",
"screenshotUrl": "<string>",
"sample1": "<string>",
"sample2": "<string>",
"sample3": "<string>",
"sample4": "<string>",
"sample5": "<string>",
"isLowVolume": true
}
'import requests
url = "https://api.sendo.dev/v1/campaign/create"
payload = {
"displayName": "<string>",
"usecase": {
"2FA": "<string>",
"ACCOUNT_NOTIFICATION": "<string>",
"CUSTOMER_CARE": "<string>",
"DELIVERY_NOTIFICATION": "<string>",
"FRAUD_ALERT": "<string>",
"MARKETING": "<string>",
"POLLING_VOTING": "<string>",
"SECURITY_ALERT": "<string>",
"HIGHER_EDUCATION": "<string>",
"K12_EDUCATION": "<string>"
},
"brandId": "<string>",
"description": "<string>",
"consentFlow": "<string>",
"screenshotUrl": "<string>",
"sample1": "<string>",
"sample2": "<string>",
"sample3": "<string>",
"sample4": "<string>",
"sample5": "<string>",
"isLowVolume": True
}
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({
displayName: '<string>',
usecase: {
'2FA': '<string>',
ACCOUNT_NOTIFICATION: '<string>',
CUSTOMER_CARE: '<string>',
DELIVERY_NOTIFICATION: '<string>',
FRAUD_ALERT: '<string>',
MARKETING: '<string>',
POLLING_VOTING: '<string>',
SECURITY_ALERT: '<string>',
HIGHER_EDUCATION: '<string>',
K12_EDUCATION: '<string>'
},
brandId: '<string>',
description: '<string>',
consentFlow: '<string>',
screenshotUrl: '<string>',
sample1: '<string>',
sample2: '<string>',
sample3: '<string>',
sample4: '<string>',
sample5: '<string>',
isLowVolume: true
})
};
fetch('https://api.sendo.dev/v1/campaign/create', 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/campaign/create",
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([
'displayName' => '<string>',
'usecase' => [
'2FA' => '<string>',
'ACCOUNT_NOTIFICATION' => '<string>',
'CUSTOMER_CARE' => '<string>',
'DELIVERY_NOTIFICATION' => '<string>',
'FRAUD_ALERT' => '<string>',
'MARKETING' => '<string>',
'POLLING_VOTING' => '<string>',
'SECURITY_ALERT' => '<string>',
'HIGHER_EDUCATION' => '<string>',
'K12_EDUCATION' => '<string>'
],
'brandId' => '<string>',
'description' => '<string>',
'consentFlow' => '<string>',
'screenshotUrl' => '<string>',
'sample1' => '<string>',
'sample2' => '<string>',
'sample3' => '<string>',
'sample4' => '<string>',
'sample5' => '<string>',
'isLowVolume' => true
]),
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/campaign/create"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"usecase\": {\n \"2FA\": \"<string>\",\n \"ACCOUNT_NOTIFICATION\": \"<string>\",\n \"CUSTOMER_CARE\": \"<string>\",\n \"DELIVERY_NOTIFICATION\": \"<string>\",\n \"FRAUD_ALERT\": \"<string>\",\n \"MARKETING\": \"<string>\",\n \"POLLING_VOTING\": \"<string>\",\n \"SECURITY_ALERT\": \"<string>\",\n \"HIGHER_EDUCATION\": \"<string>\",\n \"K12_EDUCATION\": \"<string>\"\n },\n \"brandId\": \"<string>\",\n \"description\": \"<string>\",\n \"consentFlow\": \"<string>\",\n \"screenshotUrl\": \"<string>\",\n \"sample1\": \"<string>\",\n \"sample2\": \"<string>\",\n \"sample3\": \"<string>\",\n \"sample4\": \"<string>\",\n \"sample5\": \"<string>\",\n \"isLowVolume\": true\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/campaign/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\",\n \"usecase\": {\n \"2FA\": \"<string>\",\n \"ACCOUNT_NOTIFICATION\": \"<string>\",\n \"CUSTOMER_CARE\": \"<string>\",\n \"DELIVERY_NOTIFICATION\": \"<string>\",\n \"FRAUD_ALERT\": \"<string>\",\n \"MARKETING\": \"<string>\",\n \"POLLING_VOTING\": \"<string>\",\n \"SECURITY_ALERT\": \"<string>\",\n \"HIGHER_EDUCATION\": \"<string>\",\n \"K12_EDUCATION\": \"<string>\"\n },\n \"brandId\": \"<string>\",\n \"description\": \"<string>\",\n \"consentFlow\": \"<string>\",\n \"screenshotUrl\": \"<string>\",\n \"sample1\": \"<string>\",\n \"sample2\": \"<string>\",\n \"sample3\": \"<string>\",\n \"sample4\": \"<string>\",\n \"sample5\": \"<string>\",\n \"isLowVolume\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendo.dev/v1/campaign/create")
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 \"displayName\": \"<string>\",\n \"usecase\": {\n \"2FA\": \"<string>\",\n \"ACCOUNT_NOTIFICATION\": \"<string>\",\n \"CUSTOMER_CARE\": \"<string>\",\n \"DELIVERY_NOTIFICATION\": \"<string>\",\n \"FRAUD_ALERT\": \"<string>\",\n \"MARKETING\": \"<string>\",\n \"POLLING_VOTING\": \"<string>\",\n \"SECURITY_ALERT\": \"<string>\",\n \"HIGHER_EDUCATION\": \"<string>\",\n \"K12_EDUCATION\": \"<string>\"\n },\n \"brandId\": \"<string>\",\n \"description\": \"<string>\",\n \"consentFlow\": \"<string>\",\n \"screenshotUrl\": \"<string>\",\n \"sample1\": \"<string>\",\n \"sample2\": \"<string>\",\n \"sample3\": \"<string>\",\n \"sample4\": \"<string>\",\n \"sample5\": \"<string>\",\n \"isLowVolume\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"campaign": {
"id": "U7fQ39nX",
"brandId": "A8wm4k2s",
"displayName": "Internal Testing",
"createdAt": "2023-09-21T00:42:01.007Z",
"updatedAt": "2023-09-21T00:42:01.007Z",
"status": "ACTIVE",
"monthlyFee": null,
"usecase": "MIXED",
"subUsecases": [
"CUSTOMER_CARE",
"ACCOUNT_NOTIFICATION"
],
"details": {
"description": "This campaign will be used for 2FA login codes.",
"consentFlow": "Users consent to receive SMS when making an account.",
"screenshotUrl": "https://sendo-images.s3.amazonaws.com/OTPVerification-7bf5878dc5.png",
"sample1": "Your Sendo login code is 123456.",
"sample2": "Your Sendo login code is 987654.",
"sample3": null,
"sample4": null,
"sample5": null,
"optinKeywords": [
"START",
"SUBSCRIBE"
],
"optoutKeywords": [
"STOP"
],
"helpKeywords": [
"HELP"
],
"optinMessage": "You've subscribed to receive messages from this number. Reply STOP to unsubscribe.",
"optoutMessage": "You will no longer receive messages from this number. Reply START to subscribe again.",
"helpMessage": "Text STOP to unsubscribe. Email support@sendo.dev with any questions."
},
"limits": {
"smsTpmAtt": null,
"mmsTpmAtt": null,
"dailyTmoCap": null
}
}
}
{
"success": false,
"error": "Insufficient account balance"
}
This endpoint lets customers create campaigns programatically. New campaigns will be reviewed by the Sendo team and the cell carriers for compliance. This process takes an average of 2-5 business days. It is important that your submission is fully compliant in order to avoid rejections, which can delay the launch of your campaign.
When creating a campaign programatically, we will deduct the $20 creation fee from your account balance. If you do not have enough funds in your account, the request will fail. The $10 monthly renewal fee will not be charged until the campaign is approved by the Sendo team.
NOTE: Newly created campaigns will start with no phone numbers. You can add phone numbers to the campaign using the API endpoint to buy a number, or you can add them manually on the Sendo dashboard.
API support for creating webhooks is coming soon! 🚀
Body
string
The display name for the campaign.
enum
The usecase for the campaign, i.e.
MARKETING.Show usecases options
Show usecases options
string
Two-factor authentication codes.
string
Reminders, alerts and notifications to users.
string
Conversational messages for user support.
string
Updates about the status of a delivery.
string
Notifications alerting users to potential fraud.
string
Marketing or promotional messages.
string
Messages for polling or voting.
string
Notifications about the security of a system.
string
Messages sent on behalf of colleges or universities.
string
Messages sent on behalf of K-12 schools.
string
A of the messaging campaign.
string
A screenshot of the consent flow (optional).
string
A sample message for the campaign.
string
A sample message for the campaign.
string
A sample message for the campaign (optional).
string
A sample message for the campaign (optional).
string
A sample message for the campaign (optional).
boolean
Whether to register the campaign as .
Response
boolean
Whether the campaign was created successfully.
object
The contents of the campaign.
Show campaign fields
Show campaign fields
string
The ID of the retrieved campaign.
string
The display name of the campaign.
timestamp
The time the campaign was created.
timestamp
The time the campaign was last updated.
string
number
Monthly renewal fee for the campaign (cents).
string
The usecase for the campaign, i.e.
MARKETING.string[]
An array of sub-usecases (optional).
object
Object of submission details for the campaign.
Show details fields
Show details fields
string
A description of the messaging campaign.
string
A screenshot of the consent flow (optional).
string
A sample message for the campaign.
string
A sample message for the campaign.
string
A sample message for the campaign (optional).
string
A sample message for the campaign (optional).
string
A sample message for the campaign (optional).
string[]
Array of keywords that trigger opt-in.
string[]
Array of keywords that trigger opt-out.
string[]
Array of keywords that trigger HELP message.
string
Message sent in response to opt-in keyword.
string
Message sent in response to opt-out keyword.
string
Message sent in response to HELP keyword.
The
monthlyFee and carrier limits will be null until the campaign is approved by Sendo and submitted to the cell carriers for review.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 body with details. Full list of status codes here.
{
"success": true,
"campaign": {
"id": "U7fQ39nX",
"brandId": "A8wm4k2s",
"displayName": "Internal Testing",
"createdAt": "2023-09-21T00:42:01.007Z",
"updatedAt": "2023-09-21T00:42:01.007Z",
"status": "ACTIVE",
"monthlyFee": null,
"usecase": "MIXED",
"subUsecases": [
"CUSTOMER_CARE",
"ACCOUNT_NOTIFICATION"
],
"details": {
"description": "This campaign will be used for 2FA login codes.",
"consentFlow": "Users consent to receive SMS when making an account.",
"screenshotUrl": "https://sendo-images.s3.amazonaws.com/OTPVerification-7bf5878dc5.png",
"sample1": "Your Sendo login code is 123456.",
"sample2": "Your Sendo login code is 987654.",
"sample3": null,
"sample4": null,
"sample5": null,
"optinKeywords": [
"START",
"SUBSCRIBE"
],
"optoutKeywords": [
"STOP"
],
"helpKeywords": [
"HELP"
],
"optinMessage": "You've subscribed to receive messages from this number. Reply STOP to unsubscribe.",
"optoutMessage": "You will no longer receive messages from this number. Reply START to subscribe again.",
"helpMessage": "Text STOP to unsubscribe. Email support@sendo.dev with any questions."
},
"limits": {
"smsTpmAtt": null,
"mmsTpmAtt": null,
"dailyTmoCap": null
}
}
}
{
"success": false,
"error": "Insufficient account balance"
}
⌘I

