curl --request POST \
--url https://api.mottostreaming.com/cms/banners/v3 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"name": "<string>",
"content_id": "<string>",
"dynamic_target": {
"filter": "<string>",
"order_by": "<string>",
"offset": "<string>"
},
"background_assets": [
{
"options": [
{
"asset_id": {
"asset_id": {}
},
"keypath": "<string>"
}
],
"breakpoint_width": 123
}
],
"template": {
"default_banner": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"slot_one_text": {},
"show_main_button": true,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"default_entity": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"show_main_button": true,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"entity_1": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"show_main_button": true,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"feature_banner": {
"main_text": {},
"description": {},
"top_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"side_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"show_main_button": true,
"main_button_show_play_icon": true,
"main_button_text": {},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>"
},
"single_event": {
"main_text": {},
"slot_one_text": {},
"venue_text": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"team_vs_team_hero": {
"main_text": {},
"slot_one_text": {},
"venue_text": {},
"home_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"away_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"team_vs_team_midpage": {
"main_text": {},
"description": {},
"tagline": {},
"tagline_colors": {
"color1": "<string>",
"color2": "<string>"
},
"home_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"away_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"vs_divider": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"home_color": "<string>",
"away_color": "<string>",
"show_main_button": true,
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
}
},
"environments": [
"<string>"
],
"css_classes": [
"<string>"
],
"overrides": {},
"geo_applicability_exempt": {
"country_codes": [
"<string>"
]
},
"geo_applicability_apply": {
"country_codes": [
"<string>"
]
},
"destination_url": {},
"is_preview": true,
"source_banner_id": "<string>",
"is_fallback": true
}
'import requests
url = "https://api.mottostreaming.com/cms/banners/v3"
payload = {
"project_id": "<string>",
"name": "<string>",
"content_id": "<string>",
"dynamic_target": {
"filter": "<string>",
"order_by": "<string>",
"offset": "<string>"
},
"background_assets": [
{
"options": [
{
"asset_id": { "asset_id": {} },
"keypath": "<string>"
}
],
"breakpoint_width": 123
}
],
"template": {
"default_banner": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"slot_one_text": {},
"show_main_button": True,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": True,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": { "items": [{}] }
},
"default_entity": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"show_main_button": True,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": True,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": { "items": [{}] }
},
"entity_1": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"show_main_button": True,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": True,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": { "items": [{}] }
},
"feature_banner": {
"main_text": {},
"description": {},
"top_logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"side_logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"show_main_button": True,
"main_button_show_play_icon": True,
"main_button_text": {},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>"
},
"single_event": {
"main_text": {},
"slot_one_text": {},
"venue_text": {},
"logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": True,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": { "items": [{}] }
},
"team_vs_team_hero": {
"main_text": {},
"slot_one_text": {},
"venue_text": {},
"home_logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"away_logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": True,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": { "items": [{}] }
},
"team_vs_team_midpage": {
"main_text": {},
"description": {},
"tagline": {},
"tagline_colors": {
"color1": "<string>",
"color2": "<string>"
},
"home_logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"away_logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"vs_divider": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"home_color": "<string>",
"away_color": "<string>",
"show_main_button": True,
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"gradients": { "items": [{}] }
}
},
"environments": ["<string>"],
"css_classes": ["<string>"],
"overrides": {},
"geo_applicability_exempt": { "country_codes": ["<string>"] },
"geo_applicability_apply": { "country_codes": ["<string>"] },
"destination_url": {},
"is_preview": True,
"source_banner_id": "<string>",
"is_fallback": 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({
project_id: '<string>',
name: '<string>',
content_id: '<string>',
dynamic_target: {filter: '<string>', order_by: '<string>', offset: '<string>'},
background_assets: [
{
options: [{asset_id: {asset_id: {}}, keypath: '<string>'}],
breakpoint_width: 123
}
],
template: {
default_banner: {
main_text: {},
description: {},
logo: {keypath: '<string>', asset_id: {asset_id: {}}},
slot_one_text: {},
show_main_button: true,
main_button_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>',
show_share: true,
share_button_colors: {color1: '<string>', color2: '<string>'},
share_button_text_color: '<string>',
gradients: {items: [{}]}
},
default_entity: {
main_text: {},
description: {},
logo: {keypath: '<string>', asset_id: {asset_id: {}}},
show_main_button: true,
main_button_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>',
show_share: true,
share_button_colors: {color1: '<string>', color2: '<string>'},
share_button_text_color: '<string>',
gradients: {items: [{}]}
},
entity_1: {
main_text: {},
description: {},
logo: {keypath: '<string>', asset_id: {asset_id: {}}},
show_main_button: true,
main_button_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>',
show_share: true,
share_button_colors: {color1: '<string>', color2: '<string>'},
share_button_text_color: '<string>',
gradients: {items: [{}]}
},
feature_banner: {
main_text: {},
description: {},
top_logo: {keypath: '<string>', asset_id: {asset_id: {}}},
side_logo: {keypath: '<string>', asset_id: {asset_id: {}}},
show_main_button: true,
main_button_show_play_icon: true,
main_button_text: {},
main_button_watch_text: {},
main_button_default_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>'
},
single_event: {
main_text: {},
slot_one_text: {},
venue_text: {},
logo: {keypath: '<string>', asset_id: {asset_id: {}}},
main_button_watch_text: {},
main_button_default_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>',
show_share: true,
share_button_colors: {color1: '<string>', color2: '<string>'},
share_button_text_color: '<string>',
gradients: {items: [{}]}
},
team_vs_team_hero: {
main_text: {},
slot_one_text: {},
venue_text: {},
home_logo: {keypath: '<string>', asset_id: {asset_id: {}}},
away_logo: {keypath: '<string>', asset_id: {asset_id: {}}},
main_button_watch_text: {},
main_button_default_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>',
show_share: true,
share_button_colors: {color1: '<string>', color2: '<string>'},
share_button_text_color: '<string>',
gradients: {items: [{}]}
},
team_vs_team_midpage: {
main_text: {},
description: {},
tagline: {},
tagline_colors: {color1: '<string>', color2: '<string>'},
home_logo: {keypath: '<string>', asset_id: {asset_id: {}}},
away_logo: {keypath: '<string>', asset_id: {asset_id: {}}},
vs_divider: {keypath: '<string>', asset_id: {asset_id: {}}},
home_color: '<string>',
away_color: '<string>',
show_main_button: true,
main_button_watch_text: {},
main_button_default_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>',
gradients: {items: [{}]}
}
},
environments: ['<string>'],
css_classes: ['<string>'],
overrides: {},
geo_applicability_exempt: {country_codes: ['<string>']},
geo_applicability_apply: {country_codes: ['<string>']},
destination_url: {},
is_preview: true,
source_banner_id: '<string>',
is_fallback: true
})
};
fetch('https://api.mottostreaming.com/cms/banners/v3', 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/v3",
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>',
'content_id' => '<string>',
'dynamic_target' => [
'filter' => '<string>',
'order_by' => '<string>',
'offset' => '<string>'
],
'background_assets' => [
[
'options' => [
[
'asset_id' => [
'asset_id' => [
]
],
'keypath' => '<string>'
]
],
'breakpoint_width' => 123
]
],
'template' => [
'default_banner' => [
'main_text' => [
],
'description' => [
],
'logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'slot_one_text' => [
],
'show_main_button' => true,
'main_button_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>',
'show_share' => true,
'share_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'share_button_text_color' => '<string>',
'gradients' => [
'items' => [
[
]
]
]
],
'default_entity' => [
'main_text' => [
],
'description' => [
],
'logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'show_main_button' => true,
'main_button_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>',
'show_share' => true,
'share_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'share_button_text_color' => '<string>',
'gradients' => [
'items' => [
[
]
]
]
],
'entity_1' => [
'main_text' => [
],
'description' => [
],
'logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'show_main_button' => true,
'main_button_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>',
'show_share' => true,
'share_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'share_button_text_color' => '<string>',
'gradients' => [
'items' => [
[
]
]
]
],
'feature_banner' => [
'main_text' => [
],
'description' => [
],
'top_logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'side_logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'show_main_button' => true,
'main_button_show_play_icon' => true,
'main_button_text' => [
],
'main_button_watch_text' => [
],
'main_button_default_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>'
],
'single_event' => [
'main_text' => [
],
'slot_one_text' => [
],
'venue_text' => [
],
'logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'main_button_watch_text' => [
],
'main_button_default_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>',
'show_share' => true,
'share_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'share_button_text_color' => '<string>',
'gradients' => [
'items' => [
[
]
]
]
],
'team_vs_team_hero' => [
'main_text' => [
],
'slot_one_text' => [
],
'venue_text' => [
],
'home_logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'away_logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'main_button_watch_text' => [
],
'main_button_default_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>',
'show_share' => true,
'share_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'share_button_text_color' => '<string>',
'gradients' => [
'items' => [
[
]
]
]
],
'team_vs_team_midpage' => [
'main_text' => [
],
'description' => [
],
'tagline' => [
],
'tagline_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'home_logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'away_logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'vs_divider' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'home_color' => '<string>',
'away_color' => '<string>',
'show_main_button' => true,
'main_button_watch_text' => [
],
'main_button_default_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>',
'gradients' => [
'items' => [
[
]
]
]
]
],
'environments' => [
'<string>'
],
'css_classes' => [
'<string>'
],
'overrides' => [
],
'geo_applicability_exempt' => [
'country_codes' => [
'<string>'
]
],
'geo_applicability_apply' => [
'country_codes' => [
'<string>'
]
],
'destination_url' => [
],
'is_preview' => true,
'source_banner_id' => '<string>',
'is_fallback' => 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.mottostreaming.com/cms/banners/v3"
payload := strings.NewReader("{\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"content_id\": \"<string>\",\n \"dynamic_target\": {\n \"filter\": \"<string>\",\n \"order_by\": \"<string>\",\n \"offset\": \"<string>\"\n },\n \"background_assets\": [\n {\n \"options\": [\n {\n \"asset_id\": {\n \"asset_id\": {}\n },\n \"keypath\": \"<string>\"\n }\n ],\n \"breakpoint_width\": 123\n }\n ],\n \"template\": {\n \"default_banner\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"slot_one_text\": {},\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"default_entity\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"entity_1\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"feature_banner\": {\n \"main_text\": {},\n \"description\": {},\n \"top_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"side_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_show_play_icon\": true,\n \"main_button_text\": {},\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\"\n },\n \"single_event\": {\n \"main_text\": {},\n \"slot_one_text\": {},\n \"venue_text\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"team_vs_team_hero\": {\n \"main_text\": {},\n \"slot_one_text\": {},\n \"venue_text\": {},\n \"home_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"away_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"team_vs_team_midpage\": {\n \"main_text\": {},\n \"description\": {},\n \"tagline\": {},\n \"tagline_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"home_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"away_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"vs_divider\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"home_color\": \"<string>\",\n \"away_color\": \"<string>\",\n \"show_main_button\": true,\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n }\n },\n \"environments\": [\n \"<string>\"\n ],\n \"css_classes\": [\n \"<string>\"\n ],\n \"overrides\": {},\n \"geo_applicability_exempt\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"geo_applicability_apply\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"destination_url\": {},\n \"is_preview\": true,\n \"source_banner_id\": \"<string>\",\n \"is_fallback\": 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.mottostreaming.com/cms/banners/v3")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"content_id\": \"<string>\",\n \"dynamic_target\": {\n \"filter\": \"<string>\",\n \"order_by\": \"<string>\",\n \"offset\": \"<string>\"\n },\n \"background_assets\": [\n {\n \"options\": [\n {\n \"asset_id\": {\n \"asset_id\": {}\n },\n \"keypath\": \"<string>\"\n }\n ],\n \"breakpoint_width\": 123\n }\n ],\n \"template\": {\n \"default_banner\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"slot_one_text\": {},\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"default_entity\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"entity_1\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"feature_banner\": {\n \"main_text\": {},\n \"description\": {},\n \"top_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"side_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_show_play_icon\": true,\n \"main_button_text\": {},\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\"\n },\n \"single_event\": {\n \"main_text\": {},\n \"slot_one_text\": {},\n \"venue_text\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"team_vs_team_hero\": {\n \"main_text\": {},\n \"slot_one_text\": {},\n \"venue_text\": {},\n \"home_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"away_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"team_vs_team_midpage\": {\n \"main_text\": {},\n \"description\": {},\n \"tagline\": {},\n \"tagline_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"home_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"away_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"vs_divider\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"home_color\": \"<string>\",\n \"away_color\": \"<string>\",\n \"show_main_button\": true,\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n }\n },\n \"environments\": [\n \"<string>\"\n ],\n \"css_classes\": [\n \"<string>\"\n ],\n \"overrides\": {},\n \"geo_applicability_exempt\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"geo_applicability_apply\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"destination_url\": {},\n \"is_preview\": true,\n \"source_banner_id\": \"<string>\",\n \"is_fallback\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mottostreaming.com/cms/banners/v3")
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 \"content_id\": \"<string>\",\n \"dynamic_target\": {\n \"filter\": \"<string>\",\n \"order_by\": \"<string>\",\n \"offset\": \"<string>\"\n },\n \"background_assets\": [\n {\n \"options\": [\n {\n \"asset_id\": {\n \"asset_id\": {}\n },\n \"keypath\": \"<string>\"\n }\n ],\n \"breakpoint_width\": 123\n }\n ],\n \"template\": {\n \"default_banner\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"slot_one_text\": {},\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"default_entity\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"entity_1\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"feature_banner\": {\n \"main_text\": {},\n \"description\": {},\n \"top_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"side_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_show_play_icon\": true,\n \"main_button_text\": {},\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\"\n },\n \"single_event\": {\n \"main_text\": {},\n \"slot_one_text\": {},\n \"venue_text\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"team_vs_team_hero\": {\n \"main_text\": {},\n \"slot_one_text\": {},\n \"venue_text\": {},\n \"home_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"away_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"team_vs_team_midpage\": {\n \"main_text\": {},\n \"description\": {},\n \"tagline\": {},\n \"tagline_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"home_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"away_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"vs_divider\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"home_color\": \"<string>\",\n \"away_color\": \"<string>\",\n \"show_main_button\": true,\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n }\n },\n \"environments\": [\n \"<string>\"\n ],\n \"css_classes\": [\n \"<string>\"\n ],\n \"overrides\": {},\n \"geo_applicability_exempt\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"geo_applicability_apply\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"destination_url\": {},\n \"is_preview\": true,\n \"source_banner_id\": \"<string>\",\n \"is_fallback\": true\n}"
response = http.request(request)
puts response.read_body{
"banner": {
"project_id": "<string>",
"name": "<string>",
"id": "<string>",
"content_id": "<string>",
"dynamic_target": {
"filter": "<string>",
"order_by": "<string>",
"offset": "<string>"
},
"background_assets": [
{
"options": [
{
"asset_id": {
"asset_id": {}
},
"keypath": "<string>"
}
],
"breakpoint_width": 123
}
],
"template": {
"default_banner": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"slot_one_text": {},
"show_main_button": true,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"default_entity": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"show_main_button": true,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"entity_1": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"show_main_button": true,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"feature_banner": {
"main_text": {},
"description": {},
"top_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"side_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"show_main_button": true,
"main_button_show_play_icon": true,
"main_button_text": {},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>"
},
"single_event": {
"main_text": {},
"slot_one_text": {},
"venue_text": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"team_vs_team_hero": {
"main_text": {},
"slot_one_text": {},
"venue_text": {},
"home_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"away_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"team_vs_team_midpage": {
"main_text": {},
"description": {},
"tagline": {},
"tagline_colors": {
"color1": "<string>",
"color2": "<string>"
},
"home_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"away_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"vs_divider": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"home_color": "<string>",
"away_color": "<string>",
"show_main_button": true,
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
}
},
"environments": [
"<string>"
],
"css_classes": [
"<string>"
],
"overrides": {},
"geo_applicability_exempt": {
"country_codes": [
"<string>"
]
},
"geo_applicability_apply": {
"country_codes": [
"<string>"
]
},
"destination_url": {},
"is_preview": true,
"source_banner_id": "<string>",
"is_fallback": true
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Create banner
CreateBanner
Creates new banner.
curl --request POST \
--url https://api.mottostreaming.com/cms/banners/v3 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"name": "<string>",
"content_id": "<string>",
"dynamic_target": {
"filter": "<string>",
"order_by": "<string>",
"offset": "<string>"
},
"background_assets": [
{
"options": [
{
"asset_id": {
"asset_id": {}
},
"keypath": "<string>"
}
],
"breakpoint_width": 123
}
],
"template": {
"default_banner": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"slot_one_text": {},
"show_main_button": true,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"default_entity": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"show_main_button": true,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"entity_1": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"show_main_button": true,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"feature_banner": {
"main_text": {},
"description": {},
"top_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"side_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"show_main_button": true,
"main_button_show_play_icon": true,
"main_button_text": {},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>"
},
"single_event": {
"main_text": {},
"slot_one_text": {},
"venue_text": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"team_vs_team_hero": {
"main_text": {},
"slot_one_text": {},
"venue_text": {},
"home_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"away_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"team_vs_team_midpage": {
"main_text": {},
"description": {},
"tagline": {},
"tagline_colors": {
"color1": "<string>",
"color2": "<string>"
},
"home_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"away_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"vs_divider": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"home_color": "<string>",
"away_color": "<string>",
"show_main_button": true,
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
}
},
"environments": [
"<string>"
],
"css_classes": [
"<string>"
],
"overrides": {},
"geo_applicability_exempt": {
"country_codes": [
"<string>"
]
},
"geo_applicability_apply": {
"country_codes": [
"<string>"
]
},
"destination_url": {},
"is_preview": true,
"source_banner_id": "<string>",
"is_fallback": true
}
'import requests
url = "https://api.mottostreaming.com/cms/banners/v3"
payload = {
"project_id": "<string>",
"name": "<string>",
"content_id": "<string>",
"dynamic_target": {
"filter": "<string>",
"order_by": "<string>",
"offset": "<string>"
},
"background_assets": [
{
"options": [
{
"asset_id": { "asset_id": {} },
"keypath": "<string>"
}
],
"breakpoint_width": 123
}
],
"template": {
"default_banner": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"slot_one_text": {},
"show_main_button": True,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": True,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": { "items": [{}] }
},
"default_entity": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"show_main_button": True,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": True,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": { "items": [{}] }
},
"entity_1": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"show_main_button": True,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": True,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": { "items": [{}] }
},
"feature_banner": {
"main_text": {},
"description": {},
"top_logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"side_logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"show_main_button": True,
"main_button_show_play_icon": True,
"main_button_text": {},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>"
},
"single_event": {
"main_text": {},
"slot_one_text": {},
"venue_text": {},
"logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": True,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": { "items": [{}] }
},
"team_vs_team_hero": {
"main_text": {},
"slot_one_text": {},
"venue_text": {},
"home_logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"away_logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": True,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": { "items": [{}] }
},
"team_vs_team_midpage": {
"main_text": {},
"description": {},
"tagline": {},
"tagline_colors": {
"color1": "<string>",
"color2": "<string>"
},
"home_logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"away_logo": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"vs_divider": {
"keypath": "<string>",
"asset_id": { "asset_id": {} }
},
"home_color": "<string>",
"away_color": "<string>",
"show_main_button": True,
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"gradients": { "items": [{}] }
}
},
"environments": ["<string>"],
"css_classes": ["<string>"],
"overrides": {},
"geo_applicability_exempt": { "country_codes": ["<string>"] },
"geo_applicability_apply": { "country_codes": ["<string>"] },
"destination_url": {},
"is_preview": True,
"source_banner_id": "<string>",
"is_fallback": 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({
project_id: '<string>',
name: '<string>',
content_id: '<string>',
dynamic_target: {filter: '<string>', order_by: '<string>', offset: '<string>'},
background_assets: [
{
options: [{asset_id: {asset_id: {}}, keypath: '<string>'}],
breakpoint_width: 123
}
],
template: {
default_banner: {
main_text: {},
description: {},
logo: {keypath: '<string>', asset_id: {asset_id: {}}},
slot_one_text: {},
show_main_button: true,
main_button_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>',
show_share: true,
share_button_colors: {color1: '<string>', color2: '<string>'},
share_button_text_color: '<string>',
gradients: {items: [{}]}
},
default_entity: {
main_text: {},
description: {},
logo: {keypath: '<string>', asset_id: {asset_id: {}}},
show_main_button: true,
main_button_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>',
show_share: true,
share_button_colors: {color1: '<string>', color2: '<string>'},
share_button_text_color: '<string>',
gradients: {items: [{}]}
},
entity_1: {
main_text: {},
description: {},
logo: {keypath: '<string>', asset_id: {asset_id: {}}},
show_main_button: true,
main_button_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>',
show_share: true,
share_button_colors: {color1: '<string>', color2: '<string>'},
share_button_text_color: '<string>',
gradients: {items: [{}]}
},
feature_banner: {
main_text: {},
description: {},
top_logo: {keypath: '<string>', asset_id: {asset_id: {}}},
side_logo: {keypath: '<string>', asset_id: {asset_id: {}}},
show_main_button: true,
main_button_show_play_icon: true,
main_button_text: {},
main_button_watch_text: {},
main_button_default_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>'
},
single_event: {
main_text: {},
slot_one_text: {},
venue_text: {},
logo: {keypath: '<string>', asset_id: {asset_id: {}}},
main_button_watch_text: {},
main_button_default_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>',
show_share: true,
share_button_colors: {color1: '<string>', color2: '<string>'},
share_button_text_color: '<string>',
gradients: {items: [{}]}
},
team_vs_team_hero: {
main_text: {},
slot_one_text: {},
venue_text: {},
home_logo: {keypath: '<string>', asset_id: {asset_id: {}}},
away_logo: {keypath: '<string>', asset_id: {asset_id: {}}},
main_button_watch_text: {},
main_button_default_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>',
show_share: true,
share_button_colors: {color1: '<string>', color2: '<string>'},
share_button_text_color: '<string>',
gradients: {items: [{}]}
},
team_vs_team_midpage: {
main_text: {},
description: {},
tagline: {},
tagline_colors: {color1: '<string>', color2: '<string>'},
home_logo: {keypath: '<string>', asset_id: {asset_id: {}}},
away_logo: {keypath: '<string>', asset_id: {asset_id: {}}},
vs_divider: {keypath: '<string>', asset_id: {asset_id: {}}},
home_color: '<string>',
away_color: '<string>',
show_main_button: true,
main_button_watch_text: {},
main_button_default_text: {},
main_button_colors: {color1: '<string>', color2: '<string>'},
main_button_text_color: '<string>',
gradients: {items: [{}]}
}
},
environments: ['<string>'],
css_classes: ['<string>'],
overrides: {},
geo_applicability_exempt: {country_codes: ['<string>']},
geo_applicability_apply: {country_codes: ['<string>']},
destination_url: {},
is_preview: true,
source_banner_id: '<string>',
is_fallback: true
})
};
fetch('https://api.mottostreaming.com/cms/banners/v3', 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/v3",
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>',
'content_id' => '<string>',
'dynamic_target' => [
'filter' => '<string>',
'order_by' => '<string>',
'offset' => '<string>'
],
'background_assets' => [
[
'options' => [
[
'asset_id' => [
'asset_id' => [
]
],
'keypath' => '<string>'
]
],
'breakpoint_width' => 123
]
],
'template' => [
'default_banner' => [
'main_text' => [
],
'description' => [
],
'logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'slot_one_text' => [
],
'show_main_button' => true,
'main_button_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>',
'show_share' => true,
'share_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'share_button_text_color' => '<string>',
'gradients' => [
'items' => [
[
]
]
]
],
'default_entity' => [
'main_text' => [
],
'description' => [
],
'logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'show_main_button' => true,
'main_button_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>',
'show_share' => true,
'share_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'share_button_text_color' => '<string>',
'gradients' => [
'items' => [
[
]
]
]
],
'entity_1' => [
'main_text' => [
],
'description' => [
],
'logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'show_main_button' => true,
'main_button_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>',
'show_share' => true,
'share_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'share_button_text_color' => '<string>',
'gradients' => [
'items' => [
[
]
]
]
],
'feature_banner' => [
'main_text' => [
],
'description' => [
],
'top_logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'side_logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'show_main_button' => true,
'main_button_show_play_icon' => true,
'main_button_text' => [
],
'main_button_watch_text' => [
],
'main_button_default_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>'
],
'single_event' => [
'main_text' => [
],
'slot_one_text' => [
],
'venue_text' => [
],
'logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'main_button_watch_text' => [
],
'main_button_default_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>',
'show_share' => true,
'share_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'share_button_text_color' => '<string>',
'gradients' => [
'items' => [
[
]
]
]
],
'team_vs_team_hero' => [
'main_text' => [
],
'slot_one_text' => [
],
'venue_text' => [
],
'home_logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'away_logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'main_button_watch_text' => [
],
'main_button_default_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>',
'show_share' => true,
'share_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'share_button_text_color' => '<string>',
'gradients' => [
'items' => [
[
]
]
]
],
'team_vs_team_midpage' => [
'main_text' => [
],
'description' => [
],
'tagline' => [
],
'tagline_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'home_logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'away_logo' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'vs_divider' => [
'keypath' => '<string>',
'asset_id' => [
'asset_id' => [
]
]
],
'home_color' => '<string>',
'away_color' => '<string>',
'show_main_button' => true,
'main_button_watch_text' => [
],
'main_button_default_text' => [
],
'main_button_colors' => [
'color1' => '<string>',
'color2' => '<string>'
],
'main_button_text_color' => '<string>',
'gradients' => [
'items' => [
[
]
]
]
]
],
'environments' => [
'<string>'
],
'css_classes' => [
'<string>'
],
'overrides' => [
],
'geo_applicability_exempt' => [
'country_codes' => [
'<string>'
]
],
'geo_applicability_apply' => [
'country_codes' => [
'<string>'
]
],
'destination_url' => [
],
'is_preview' => true,
'source_banner_id' => '<string>',
'is_fallback' => 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.mottostreaming.com/cms/banners/v3"
payload := strings.NewReader("{\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"content_id\": \"<string>\",\n \"dynamic_target\": {\n \"filter\": \"<string>\",\n \"order_by\": \"<string>\",\n \"offset\": \"<string>\"\n },\n \"background_assets\": [\n {\n \"options\": [\n {\n \"asset_id\": {\n \"asset_id\": {}\n },\n \"keypath\": \"<string>\"\n }\n ],\n \"breakpoint_width\": 123\n }\n ],\n \"template\": {\n \"default_banner\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"slot_one_text\": {},\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"default_entity\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"entity_1\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"feature_banner\": {\n \"main_text\": {},\n \"description\": {},\n \"top_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"side_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_show_play_icon\": true,\n \"main_button_text\": {},\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\"\n },\n \"single_event\": {\n \"main_text\": {},\n \"slot_one_text\": {},\n \"venue_text\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"team_vs_team_hero\": {\n \"main_text\": {},\n \"slot_one_text\": {},\n \"venue_text\": {},\n \"home_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"away_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"team_vs_team_midpage\": {\n \"main_text\": {},\n \"description\": {},\n \"tagline\": {},\n \"tagline_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"home_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"away_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"vs_divider\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"home_color\": \"<string>\",\n \"away_color\": \"<string>\",\n \"show_main_button\": true,\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n }\n },\n \"environments\": [\n \"<string>\"\n ],\n \"css_classes\": [\n \"<string>\"\n ],\n \"overrides\": {},\n \"geo_applicability_exempt\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"geo_applicability_apply\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"destination_url\": {},\n \"is_preview\": true,\n \"source_banner_id\": \"<string>\",\n \"is_fallback\": 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.mottostreaming.com/cms/banners/v3")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"content_id\": \"<string>\",\n \"dynamic_target\": {\n \"filter\": \"<string>\",\n \"order_by\": \"<string>\",\n \"offset\": \"<string>\"\n },\n \"background_assets\": [\n {\n \"options\": [\n {\n \"asset_id\": {\n \"asset_id\": {}\n },\n \"keypath\": \"<string>\"\n }\n ],\n \"breakpoint_width\": 123\n }\n ],\n \"template\": {\n \"default_banner\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"slot_one_text\": {},\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"default_entity\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"entity_1\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"feature_banner\": {\n \"main_text\": {},\n \"description\": {},\n \"top_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"side_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_show_play_icon\": true,\n \"main_button_text\": {},\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\"\n },\n \"single_event\": {\n \"main_text\": {},\n \"slot_one_text\": {},\n \"venue_text\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"team_vs_team_hero\": {\n \"main_text\": {},\n \"slot_one_text\": {},\n \"venue_text\": {},\n \"home_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"away_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"team_vs_team_midpage\": {\n \"main_text\": {},\n \"description\": {},\n \"tagline\": {},\n \"tagline_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"home_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"away_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"vs_divider\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"home_color\": \"<string>\",\n \"away_color\": \"<string>\",\n \"show_main_button\": true,\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n }\n },\n \"environments\": [\n \"<string>\"\n ],\n \"css_classes\": [\n \"<string>\"\n ],\n \"overrides\": {},\n \"geo_applicability_exempt\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"geo_applicability_apply\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"destination_url\": {},\n \"is_preview\": true,\n \"source_banner_id\": \"<string>\",\n \"is_fallback\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mottostreaming.com/cms/banners/v3")
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 \"content_id\": \"<string>\",\n \"dynamic_target\": {\n \"filter\": \"<string>\",\n \"order_by\": \"<string>\",\n \"offset\": \"<string>\"\n },\n \"background_assets\": [\n {\n \"options\": [\n {\n \"asset_id\": {\n \"asset_id\": {}\n },\n \"keypath\": \"<string>\"\n }\n ],\n \"breakpoint_width\": 123\n }\n ],\n \"template\": {\n \"default_banner\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"slot_one_text\": {},\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"default_entity\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"entity_1\": {\n \"main_text\": {},\n \"description\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"feature_banner\": {\n \"main_text\": {},\n \"description\": {},\n \"top_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"side_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"show_main_button\": true,\n \"main_button_show_play_icon\": true,\n \"main_button_text\": {},\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\"\n },\n \"single_event\": {\n \"main_text\": {},\n \"slot_one_text\": {},\n \"venue_text\": {},\n \"logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"team_vs_team_hero\": {\n \"main_text\": {},\n \"slot_one_text\": {},\n \"venue_text\": {},\n \"home_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"away_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"show_share\": true,\n \"share_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"share_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n },\n \"team_vs_team_midpage\": {\n \"main_text\": {},\n \"description\": {},\n \"tagline\": {},\n \"tagline_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"home_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"away_logo\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"vs_divider\": {\n \"keypath\": \"<string>\",\n \"asset_id\": {\n \"asset_id\": {}\n }\n },\n \"home_color\": \"<string>\",\n \"away_color\": \"<string>\",\n \"show_main_button\": true,\n \"main_button_watch_text\": {},\n \"main_button_default_text\": {},\n \"main_button_colors\": {\n \"color1\": \"<string>\",\n \"color2\": \"<string>\"\n },\n \"main_button_text_color\": \"<string>\",\n \"gradients\": {\n \"items\": [\n {}\n ]\n }\n }\n },\n \"environments\": [\n \"<string>\"\n ],\n \"css_classes\": [\n \"<string>\"\n ],\n \"overrides\": {},\n \"geo_applicability_exempt\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"geo_applicability_apply\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"destination_url\": {},\n \"is_preview\": true,\n \"source_banner_id\": \"<string>\",\n \"is_fallback\": true\n}"
response = http.request(request)
puts response.read_body{
"banner": {
"project_id": "<string>",
"name": "<string>",
"id": "<string>",
"content_id": "<string>",
"dynamic_target": {
"filter": "<string>",
"order_by": "<string>",
"offset": "<string>"
},
"background_assets": [
{
"options": [
{
"asset_id": {
"asset_id": {}
},
"keypath": "<string>"
}
],
"breakpoint_width": 123
}
],
"template": {
"default_banner": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"slot_one_text": {},
"show_main_button": true,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"default_entity": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"show_main_button": true,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"entity_1": {
"main_text": {},
"description": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"show_main_button": true,
"main_button_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"feature_banner": {
"main_text": {},
"description": {},
"top_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"side_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"show_main_button": true,
"main_button_show_play_icon": true,
"main_button_text": {},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>"
},
"single_event": {
"main_text": {},
"slot_one_text": {},
"venue_text": {},
"logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"team_vs_team_hero": {
"main_text": {},
"slot_one_text": {},
"venue_text": {},
"home_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"away_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"show_share": true,
"share_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"share_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
},
"team_vs_team_midpage": {
"main_text": {},
"description": {},
"tagline": {},
"tagline_colors": {
"color1": "<string>",
"color2": "<string>"
},
"home_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"away_logo": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"vs_divider": {
"keypath": "<string>",
"asset_id": {
"asset_id": {}
}
},
"home_color": "<string>",
"away_color": "<string>",
"show_main_button": true,
"main_button_watch_text": {},
"main_button_default_text": {},
"main_button_colors": {
"color1": "<string>",
"color2": "<string>"
},
"main_button_text_color": "<string>",
"gradients": {
"items": [
{}
]
}
}
},
"environments": [
"<string>"
],
"css_classes": [
"<string>"
],
"overrides": {},
"geo_applicability_exempt": {
"country_codes": [
"<string>"
]
},
"geo_applicability_apply": {
"country_codes": [
"<string>"
]
},
"destination_url": {},
"is_preview": true,
"source_banner_id": "<string>",
"is_fallback": true
}
}{
"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. Banners can be either static (with fixed content) or dynamic (content derived from parameters).
A name for visual identification within the management UI. Does not appear towards end users.
The type of banner that determines how content is sourced.
BANNER_TYPE_UNSPECIFIED, BANNER_TYPE_DEFAULT, BANNER_TYPE_EVENT, BANNER_TYPE_CREATIVE_WORK, BANNER_TYPE_ENTITY Single banner - it is connected to a single content item (either an event, entity, or creative work).
Important: at most one of content_id, dynamic_target may be set per request.
Dynamic banner - it is not connected to a single content item, but derives its content from a set of filters.
Important: at most one of content_id, dynamic_target may be set per request.
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
The content needed by the template that should be rendered.
Show child attributes
Show child attributes
The environments in which this banner should be rendered. The available options are: "web", "ios", "android", "tvos", "lg", "samsung", "androidtv"
Important: this should always be a subset of the environments configured at the page-component level for the associated banner collection. For example, if a page component is configured to be "ios" only, but a banner inside that component has "web" only, that banner will never be shown.
Web only. A list of CSS classes that should be added to the banner's container element. This can be used to apply custom styling to the banner.
VISIBILITY_UNSPECIFIED, VISIBILITY_PUBLISHED, VISIBILITY_UNLISTED, VISIBILITY_HIDDEN A map of overrides for the banner. This is useful for scenarios where some subset of Banner instantiations should have different properties.
The key is a content_id (either event ID, entity ID, or creative work ID), the value is the override to apply when that content is in context.
Note that a hit on a banner override will entirely replace the banner template and its content; it will not merge with the base banner.
Show child attributes
Show child attributes
Viewers from these countries will not have this video ad shown.
Important: at most one of geo_applicability_exempt, geo_applicability_apply may be set per request.
Show child attributes
Show child attributes
Viewers from these countries will have this video ad shown.
Important: at most one of geo_applicability_exempt, geo_applicability_apply may be set per request.
Show child attributes
Show child attributes
Optional. 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. Note that this is not necessary for banners of type BANNER_TYPE_EVENT, BANNER_TYPE_CREATIVE_WORK, or BANNER_TYPE_ENTITY, as the destination URL will be derived from the connected content item in those cases.
Show child attributes
Show child attributes
Indicates that this banner is a preview banner. Preview banner are not shown to end users, but can be used for testing and previewing changes.
When you wish to deploy a preview banner to production (your main platform for end users), you should use CloneBanner.
The banner ID of the production page that this preview banner is based on. This field is only relevant when "is_preview" is true. It will be set automatically when using the "CloneBanner" API method.
Indicates that this banner is a fallback banner. Fallback banners are shown only when there are no other banners
that can be shown based on their targeting criteria in connected_content.
If multiple fallback banners exist in a banner collection, only the first one in a banner collection will be used.
Response
OK
Banner represents a single banner that can be displayed on an end-user facing web/app page. Banners can be either static (with fixed content) or dynamic (content derived from parameters).
Show child attributes
Show child attributes

