Retrieve campaign
curl --request GET \
--url https://api.sendo.dev/v1/campaign/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sendo.dev/v1/campaign/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sendo.dev/v1/campaign/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sendo.dev/v1/campaign/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sendo.dev/v1/campaign/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendo.dev/v1/campaign/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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": 1000,
"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": 75,
"mmsTpmAtt": 50,
"dailyTmoCap": 2000
}
}
}
{
"brand": null,
"error": "Campaign not found"
}
Campaign
Retrieve campaign
This endpoint retrieves a campaign.
GET
/
v1
/
campaign
/
{id}
Retrieve campaign
curl --request GET \
--url https://api.sendo.dev/v1/campaign/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sendo.dev/v1/campaign/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sendo.dev/v1/campaign/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sendo.dev/v1/campaign/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sendo.dev/v1/campaign/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendo.dev/v1/campaign/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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": 1000,
"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": 75,
"mmsTpmAtt": 50,
"dailyTmoCap": 2000
}
}
}
{
"brand": null,
"error": "Campaign not found"
}
This endpoint retrieves a campaign. Click here to learn more.
Parameters
string
required
The ID of the campaign to retrieve.
Response
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.
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.
{
"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": 1000,
"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": 75,
"mmsTpmAtt": 50,
"dailyTmoCap": 2000
}
}
}
{
"brand": null,
"error": "Campaign not found"
}
⌘I

