List campaigns
curl --request GET \
--url https://api.sendo.dev/v1/campaign/list \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sendo.dev/v1/campaign/list"
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/list', 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/list",
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/list"
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/list")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendo.dev/v1/campaign/list")
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{
"campaigns": [
{
"id": "h4cQ2gls",
"brandId": "A8wm4k2s",
"displayName": "Internal Testing",
"createdAt": "2023-12-12T12:33:33.630Z",
"updatedAt": "2023-12-12T12:33:33.630Z",
"status": "ACTIVE",
...
},
{
"id": "A8wm4k2s",
"brandId": "oR439zks",
"displayName": "User Notifications",
"createdAt": "2023-12-07T12:33:33.630Z",
"updatedAt": "2023-12-08T12:33:33.630Z",
"status": "PENDING",
...
}
And so on...
]
}
{
"campaigns": [],
"error": "Internal server error"
}
Campaign
List campaigns
This endpoint lists your campaigns.
GET
/
v1
/
campaign
/
list
List campaigns
curl --request GET \
--url https://api.sendo.dev/v1/campaign/list \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sendo.dev/v1/campaign/list"
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/list', 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/list",
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/list"
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/list")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendo.dev/v1/campaign/list")
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{
"campaigns": [
{
"id": "h4cQ2gls",
"brandId": "A8wm4k2s",
"displayName": "Internal Testing",
"createdAt": "2023-12-12T12:33:33.630Z",
"updatedAt": "2023-12-12T12:33:33.630Z",
"status": "ACTIVE",
...
},
{
"id": "A8wm4k2s",
"brandId": "oR439zks",
"displayName": "User Notifications",
"createdAt": "2023-12-07T12:33:33.630Z",
"updatedAt": "2023-12-08T12:33:33.630Z",
"status": "PENDING",
...
}
And so on...
]
}
{
"campaigns": [],
"error": "Internal server error"
}
This endpoint lists your submitted campaigns. Campaigns in
DRAFT status will not be returned. Click here for more information about campaigns.
URL Params
number
The number of campaigns to return (default 10).
number
The number of campaigns to skip (i.e. offset).
Response
[campaign]
An array of campaign objects returned.
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
An explanation of how consent is obtained.
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.
{
"campaigns": [
{
"id": "h4cQ2gls",
"brandId": "A8wm4k2s",
"displayName": "Internal Testing",
"createdAt": "2023-12-12T12:33:33.630Z",
"updatedAt": "2023-12-12T12:33:33.630Z",
"status": "ACTIVE",
...
},
{
"id": "A8wm4k2s",
"brandId": "oR439zks",
"displayName": "User Notifications",
"createdAt": "2023-12-07T12:33:33.630Z",
"updatedAt": "2023-12-08T12:33:33.630Z",
"status": "PENDING",
...
}
And so on...
]
}
{
"campaigns": [],
"error": "Internal server error"
}
⌘I

