curl --request POST \
--url https://api.mottostreaming.com/cms/banners/v1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"name": "<string>",
"destination_url": {},
"texts": [
{
"text": {},
"color": "<string>",
"background_color": "<string>",
"font_family": "<string>",
"is_button": true
}
],
"background_assets": [
{
"asset_id": {},
"loop": true,
"breakpoint_width": 123
}
]
}
'import requests
url = "https://api.mottostreaming.com/cms/banners/v1"
payload = {
"project_id": "<string>",
"name": "<string>",
"destination_url": {},
"texts": [
{
"text": {},
"color": "<string>",
"background_color": "<string>",
"font_family": "<string>",
"is_button": True
}
],
"background_assets": [
{
"asset_id": {},
"loop": True,
"breakpoint_width": 123
}
]
}
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({
project_id: '<string>',
name: '<string>',
destination_url: {},
texts: [
{
text: {},
color: '<string>',
background_color: '<string>',
font_family: '<string>',
is_button: true
}
],
background_assets: [{asset_id: {}, loop: true, breakpoint_width: 123}]
})
};
fetch('https://api.mottostreaming.com/cms/banners/v1', 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.mottostreaming.com/cms/banners/v1",
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([
'project_id' => '<string>',
'name' => '<string>',
'destination_url' => [
],
'texts' => [
[
'text' => [
],
'color' => '<string>',
'background_color' => '<string>',
'font_family' => '<string>',
'is_button' => true
]
],
'background_assets' => [
[
'asset_id' => [
],
'loop' => true,
'breakpoint_width' => 123
]
]
]),
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.mottostreaming.com/cms/banners/v1"
payload := strings.NewReader("{\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"destination_url\": {},\n \"texts\": [\n {\n \"text\": {},\n \"color\": \"<string>\",\n \"background_color\": \"<string>\",\n \"font_family\": \"<string>\",\n \"is_button\": true\n }\n ],\n \"background_assets\": [\n {\n \"asset_id\": {},\n \"loop\": true,\n \"breakpoint_width\": 123\n }\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))
}HttpResponse<String> response = Unirest.post("https://api.mottostreaming.com/cms/banners/v1")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"destination_url\": {},\n \"texts\": [\n {\n \"text\": {},\n \"color\": \"<string>\",\n \"background_color\": \"<string>\",\n \"font_family\": \"<string>\",\n \"is_button\": true\n }\n ],\n \"background_assets\": [\n {\n \"asset_id\": {},\n \"loop\": true,\n \"breakpoint_width\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mottostreaming.com/cms/banners/v1")
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 \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"destination_url\": {},\n \"texts\": [\n {\n \"text\": {},\n \"color\": \"<string>\",\n \"background_color\": \"<string>\",\n \"font_family\": \"<string>\",\n \"is_button\": true\n }\n ],\n \"background_assets\": [\n {\n \"asset_id\": {},\n \"loop\": true,\n \"breakpoint_width\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"banner": {
"project_id": "<string>",
"name": "<string>",
"id": "<string>",
"destination_url": {},
"texts": [
{
"text": {},
"color": "<string>",
"background_color": "<string>",
"font_family": "<string>",
"is_button": true
}
],
"background_assets": [
{
"asset_id": {},
"loop": true,
"breakpoint_width": 123
}
],
"visibility": "VISIBILITY_UNSPECIFIED"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Create banner
CreateBanner
Creates new banner.
curl --request POST \
--url https://api.mottostreaming.com/cms/banners/v1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"name": "<string>",
"destination_url": {},
"texts": [
{
"text": {},
"color": "<string>",
"background_color": "<string>",
"font_family": "<string>",
"is_button": true
}
],
"background_assets": [
{
"asset_id": {},
"loop": true,
"breakpoint_width": 123
}
]
}
'import requests
url = "https://api.mottostreaming.com/cms/banners/v1"
payload = {
"project_id": "<string>",
"name": "<string>",
"destination_url": {},
"texts": [
{
"text": {},
"color": "<string>",
"background_color": "<string>",
"font_family": "<string>",
"is_button": True
}
],
"background_assets": [
{
"asset_id": {},
"loop": True,
"breakpoint_width": 123
}
]
}
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({
project_id: '<string>',
name: '<string>',
destination_url: {},
texts: [
{
text: {},
color: '<string>',
background_color: '<string>',
font_family: '<string>',
is_button: true
}
],
background_assets: [{asset_id: {}, loop: true, breakpoint_width: 123}]
})
};
fetch('https://api.mottostreaming.com/cms/banners/v1', 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.mottostreaming.com/cms/banners/v1",
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([
'project_id' => '<string>',
'name' => '<string>',
'destination_url' => [
],
'texts' => [
[
'text' => [
],
'color' => '<string>',
'background_color' => '<string>',
'font_family' => '<string>',
'is_button' => true
]
],
'background_assets' => [
[
'asset_id' => [
],
'loop' => true,
'breakpoint_width' => 123
]
]
]),
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.mottostreaming.com/cms/banners/v1"
payload := strings.NewReader("{\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"destination_url\": {},\n \"texts\": [\n {\n \"text\": {},\n \"color\": \"<string>\",\n \"background_color\": \"<string>\",\n \"font_family\": \"<string>\",\n \"is_button\": true\n }\n ],\n \"background_assets\": [\n {\n \"asset_id\": {},\n \"loop\": true,\n \"breakpoint_width\": 123\n }\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))
}HttpResponse<String> response = Unirest.post("https://api.mottostreaming.com/cms/banners/v1")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"destination_url\": {},\n \"texts\": [\n {\n \"text\": {},\n \"color\": \"<string>\",\n \"background_color\": \"<string>\",\n \"font_family\": \"<string>\",\n \"is_button\": true\n }\n ],\n \"background_assets\": [\n {\n \"asset_id\": {},\n \"loop\": true,\n \"breakpoint_width\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mottostreaming.com/cms/banners/v1")
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 \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"destination_url\": {},\n \"texts\": [\n {\n \"text\": {},\n \"color\": \"<string>\",\n \"background_color\": \"<string>\",\n \"font_family\": \"<string>\",\n \"is_button\": true\n }\n ],\n \"background_assets\": [\n {\n \"asset_id\": {},\n \"loop\": true,\n \"breakpoint_width\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"banner": {
"project_id": "<string>",
"name": "<string>",
"id": "<string>",
"destination_url": {},
"texts": [
{
"text": {},
"color": "<string>",
"background_color": "<string>",
"font_family": "<string>",
"is_button": true
}
],
"background_assets": [
{
"asset_id": {},
"loop": true,
"breakpoint_width": 123
}
],
"visibility": "VISIBILITY_UNSPECIFIED"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Banner represents a single banner that can be displayed on an end-user facing web/app page.
A name for visual identification within the management UI. Does not appear towards end users.
A map of localized destination URLs. The key is the language code (ISO 639 - set 1), e.g. "en", "de", "fr", etc. If you want to localize the URL for different regions of the same language, you can add the country code (ISO 3166-1 alpha-2), e.g. "en-US", "en-GB", etc.
Show child attributes
Show child attributes
A list of textual elements that should show on top of the banner, ordered vertically from top to bottom. The first element will be considered the "primary" and will appear more prominently.
Show child attributes
Show child attributes
A list of assets to be shown in the background (as the main banner image).
Each asset is meant for a different screen size, determined by its breakpoint_width property.
E.g. if you only want a single asset for this banner, you can set breakpoint_width to 0.
E.g. if you want to show a different asset for mobile vs desktop, you can set breakpoint_width to 0 for the
mobile asset and 1024 for the desktop asset.
Show child attributes
Show child attributes
VISIBILITY_UNSPECIFIED, VISIBILITY_PUBLISHED, VISIBILITY_UNLISTED, VISIBILITY_HIDDEN Response
OK
Banner represents a single banner that can be displayed on an end-user facing web/app page.
Show child attributes
Show child attributes

