Share Ad Board
curl --request POST \
--url https://api.example.com/api/v1/ad-library/boards/share \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"board_key": "<string>",
"name": "Ad Board",
"ad_ids": [
"<string>"
]
}
'import requests
url = "https://api.example.com/api/v1/ad-library/boards/share"
payload = {
"board_key": "<string>",
"name": "Ad Board",
"ad_ids": ["<string>"]
}
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({board_key: '<string>', name: 'Ad Board', ad_ids: ['<string>']})
};
fetch('https://api.example.com/api/v1/ad-library/boards/share', 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.example.com/api/v1/ad-library/boards/share",
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([
'board_key' => '<string>',
'name' => 'Ad Board',
'ad_ids' => [
'<string>'
]
]),
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.example.com/api/v1/ad-library/boards/share"
payload := strings.NewReader("{\n \"board_key\": \"<string>\",\n \"name\": \"Ad Board\",\n \"ad_ids\": [\n \"<string>\"\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.example.com/api/v1/ad-library/boards/share")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"board_key\": \"<string>\",\n \"name\": \"Ad Board\",\n \"ad_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/ad-library/boards/share")
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 \"board_key\": \"<string>\",\n \"name\": \"Ad Board\",\n \"ad_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"token": "<string>",
"board_key": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"share_path": "<string>",
"ad_count": 0,
"created": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Ad Library
Share Ad Board
Mint (or refresh) the persistent public share link for an Ad Board.
Idempotent per (user, board_key): the first call creates the token,
every later call refreshes the stored board name/ads but returns the SAME
token, so a link already sent out never changes.
POST
/
api
/
v1
/
ad-library
/
boards
/
share
Share Ad Board
curl --request POST \
--url https://api.example.com/api/v1/ad-library/boards/share \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"board_key": "<string>",
"name": "Ad Board",
"ad_ids": [
"<string>"
]
}
'import requests
url = "https://api.example.com/api/v1/ad-library/boards/share"
payload = {
"board_key": "<string>",
"name": "Ad Board",
"ad_ids": ["<string>"]
}
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({board_key: '<string>', name: 'Ad Board', ad_ids: ['<string>']})
};
fetch('https://api.example.com/api/v1/ad-library/boards/share', 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.example.com/api/v1/ad-library/boards/share",
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([
'board_key' => '<string>',
'name' => 'Ad Board',
'ad_ids' => [
'<string>'
]
]),
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.example.com/api/v1/ad-library/boards/share"
payload := strings.NewReader("{\n \"board_key\": \"<string>\",\n \"name\": \"Ad Board\",\n \"ad_ids\": [\n \"<string>\"\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.example.com/api/v1/ad-library/boards/share")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"board_key\": \"<string>\",\n \"name\": \"Ad Board\",\n \"ad_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/ad-library/boards/share")
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 \"board_key\": \"<string>\",\n \"name\": \"Ad Board\",\n \"ad_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"token": "<string>",
"board_key": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"share_path": "<string>",
"ad_count": 0,
"created": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Share (or re-share) a client-side board. board_key is the client
board id — the idempotency key; re-sharing refreshes name/ads but keeps
the existing token.
Was this page helpful?
⌘I