curl --request POST \
--url https://api.mottostreaming.com/monetization/ads/v1/sponsorship_collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"project_id": "<string>",
"name": "<string>",
"slots": [
{
"asset_id": {},
"destination_url": {}
}
]
}
'import requests
url = "https://api.mottostreaming.com/monetization/ads/v1/sponsorship_collections"
payload = {
"id": "<string>",
"project_id": "<string>",
"name": "<string>",
"slots": [
{
"asset_id": {},
"destination_url": {}
}
]
}
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({
id: '<string>',
project_id: '<string>',
name: '<string>',
slots: [{asset_id: {}, destination_url: {}}]
})
};
fetch('https://api.mottostreaming.com/monetization/ads/v1/sponsorship_collections', 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/monetization/ads/v1/sponsorship_collections",
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([
'id' => '<string>',
'project_id' => '<string>',
'name' => '<string>',
'slots' => [
[
'asset_id' => [
],
'destination_url' => [
]
]
]
]),
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/monetization/ads/v1/sponsorship_collections"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"slots\": [\n {\n \"asset_id\": {},\n \"destination_url\": {}\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/monetization/ads/v1/sponsorship_collections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"slots\": [\n {\n \"asset_id\": {},\n \"destination_url\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mottostreaming.com/monetization/ads/v1/sponsorship_collections")
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 \"id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"slots\": [\n {\n \"asset_id\": {},\n \"destination_url\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"sponsorship_collection": {
"id": "<string>",
"project_id": "<string>",
"name": "<string>",
"slots": [
{
"asset_id": {},
"destination_url": {}
}
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Create sponsorship collection
CreateSponsorshipCollection
Creates new sponsorship_collection.
curl --request POST \
--url https://api.mottostreaming.com/monetization/ads/v1/sponsorship_collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"project_id": "<string>",
"name": "<string>",
"slots": [
{
"asset_id": {},
"destination_url": {}
}
]
}
'import requests
url = "https://api.mottostreaming.com/monetization/ads/v1/sponsorship_collections"
payload = {
"id": "<string>",
"project_id": "<string>",
"name": "<string>",
"slots": [
{
"asset_id": {},
"destination_url": {}
}
]
}
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({
id: '<string>',
project_id: '<string>',
name: '<string>',
slots: [{asset_id: {}, destination_url: {}}]
})
};
fetch('https://api.mottostreaming.com/monetization/ads/v1/sponsorship_collections', 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/monetization/ads/v1/sponsorship_collections",
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([
'id' => '<string>',
'project_id' => '<string>',
'name' => '<string>',
'slots' => [
[
'asset_id' => [
],
'destination_url' => [
]
]
]
]),
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/monetization/ads/v1/sponsorship_collections"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"slots\": [\n {\n \"asset_id\": {},\n \"destination_url\": {}\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/monetization/ads/v1/sponsorship_collections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"slots\": [\n {\n \"asset_id\": {},\n \"destination_url\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mottostreaming.com/monetization/ads/v1/sponsorship_collections")
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 \"id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"slots\": [\n {\n \"asset_id\": {},\n \"destination_url\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"sponsorship_collection": {
"id": "<string>",
"project_id": "<string>",
"name": "<string>",
"slots": [
{
"asset_id": {},
"destination_url": {}
}
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
SponsorshipCollection represents a collection of sponsorship slots that can be displayed in one of various layouts on an end-user facing web/app page.
A unique identifier for the sponsorship collection. This can be set manually, or auto-generated if left empty.
A name for visual identification within the management UI. Does not appear towards end users.
A list of sponsorship slots that should be included in this sponsorship collection. The order of this list determines the order in which the sponsorship slots are displayed towards end users.
Show child attributes
Show child attributes
VISIBILITY_UNSPECIFIED, VISIBILITY_PUBLISHED, VISIBILITY_UNLISTED, VISIBILITY_HIDDEN Response
OK
SponsorshipCollection represents a collection of sponsorship slots that can be displayed in one of various layouts on an end-user facing web/app page.
Show child attributes
Show child attributes

