curl --request PUT \
--url https://api.cloudglue.dev/v1/sites/{site_id}/route-previews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"previews": [
{
"route": "clip/intro-to-x",
"previewShareId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previewTitle": "<string>",
"previewDescription": "<string>",
"previewImageUrl": "<string>",
"startSeconds": 1,
"endSeconds": 123
}
]
}
'import requests
url = "https://api.cloudglue.dev/v1/sites/{site_id}/route-previews"
payload = { "previews": [
{
"route": "clip/intro-to-x",
"previewShareId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previewTitle": "<string>",
"previewDescription": "<string>",
"previewImageUrl": "<string>",
"startSeconds": 1,
"endSeconds": 123
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
previews: [
{
route: 'clip/intro-to-x',
previewShareId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
previewTitle: '<string>',
previewDescription: '<string>',
previewImageUrl: '<string>',
startSeconds: 1,
endSeconds: 123
}
]
})
};
fetch('https://api.cloudglue.dev/v1/sites/{site_id}/route-previews', 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.cloudglue.dev/v1/sites/{site_id}/route-previews",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'previews' => [
[
'route' => 'clip/intro-to-x',
'previewShareId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'previewTitle' => '<string>',
'previewDescription' => '<string>',
'previewImageUrl' => '<string>',
'startSeconds' => 1,
'endSeconds' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudglue.dev/v1/sites/{site_id}/route-previews"
payload := strings.NewReader("{\n \"previews\": [\n {\n \"route\": \"clip/intro-to-x\",\n \"previewShareId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"previewTitle\": \"<string>\",\n \"previewDescription\": \"<string>\",\n \"previewImageUrl\": \"<string>\",\n \"startSeconds\": 1,\n \"endSeconds\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.cloudglue.dev/v1/sites/{site_id}/route-previews")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"previews\": [\n {\n \"route\": \"clip/intro-to-x\",\n \"previewShareId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"previewTitle\": \"<string>\",\n \"previewDescription\": \"<string>\",\n \"previewImageUrl\": \"<string>\",\n \"startSeconds\": 1,\n \"endSeconds\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudglue.dev/v1/sites/{site_id}/route-previews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"previews\": [\n {\n \"route\": \"clip/intro-to-x\",\n \"previewShareId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"previewTitle\": \"<string>\",\n \"previewDescription\": \"<string>\",\n \"previewImageUrl\": \"<string>\",\n \"startSeconds\": 1,\n \"endSeconds\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"previews": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"route": "clip/intro-to-x",
"previewShareId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"previewTitle": "<string>",
"previewDescription": "<string>",
"previewImageUrl": "<string>",
"startSeconds": 1,
"endSeconds": 123
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}Replace Site Route Previews
Replace the site’s complete set of per-route unfurl previews. Each entry maps a route within the site (e.g. a clip page) to its own preview card and hero share, so links to that page unfurl distinctly in Slack instead of with the site-wide hero. An optional startSeconds/endSeconds window makes the unfurled player serve only that segment of the hero (trimmed at the asset’s HLS segment boundaries — see the field descriptions). The set is replaced wholesale — typically written by the same pipeline that publishes the site — and an empty array clears all route previews. Routes are stored in canonical form: hash-router prefixes (’#/’), query strings, and surrounding slashes are stripped, so ‘/clip/intro’, ‘clip/intro/’, and ’#/clip/intro’ all name the same route. Links to routes with no registered preview fall back to the site-level preview fields.
curl --request PUT \
--url https://api.cloudglue.dev/v1/sites/{site_id}/route-previews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"previews": [
{
"route": "clip/intro-to-x",
"previewShareId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previewTitle": "<string>",
"previewDescription": "<string>",
"previewImageUrl": "<string>",
"startSeconds": 1,
"endSeconds": 123
}
]
}
'import requests
url = "https://api.cloudglue.dev/v1/sites/{site_id}/route-previews"
payload = { "previews": [
{
"route": "clip/intro-to-x",
"previewShareId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previewTitle": "<string>",
"previewDescription": "<string>",
"previewImageUrl": "<string>",
"startSeconds": 1,
"endSeconds": 123
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
previews: [
{
route: 'clip/intro-to-x',
previewShareId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
previewTitle: '<string>',
previewDescription: '<string>',
previewImageUrl: '<string>',
startSeconds: 1,
endSeconds: 123
}
]
})
};
fetch('https://api.cloudglue.dev/v1/sites/{site_id}/route-previews', 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.cloudglue.dev/v1/sites/{site_id}/route-previews",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'previews' => [
[
'route' => 'clip/intro-to-x',
'previewShareId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'previewTitle' => '<string>',
'previewDescription' => '<string>',
'previewImageUrl' => '<string>',
'startSeconds' => 1,
'endSeconds' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudglue.dev/v1/sites/{site_id}/route-previews"
payload := strings.NewReader("{\n \"previews\": [\n {\n \"route\": \"clip/intro-to-x\",\n \"previewShareId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"previewTitle\": \"<string>\",\n \"previewDescription\": \"<string>\",\n \"previewImageUrl\": \"<string>\",\n \"startSeconds\": 1,\n \"endSeconds\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.cloudglue.dev/v1/sites/{site_id}/route-previews")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"previews\": [\n {\n \"route\": \"clip/intro-to-x\",\n \"previewShareId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"previewTitle\": \"<string>\",\n \"previewDescription\": \"<string>\",\n \"previewImageUrl\": \"<string>\",\n \"startSeconds\": 1,\n \"endSeconds\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudglue.dev/v1/sites/{site_id}/route-previews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"previews\": [\n {\n \"route\": \"clip/intro-to-x\",\n \"previewShareId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"previewTitle\": \"<string>\",\n \"previewDescription\": \"<string>\",\n \"previewImageUrl\": \"<string>\",\n \"startSeconds\": 1,\n \"endSeconds\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"previews": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"route": "clip/intro-to-x",
"previewShareId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"previewTitle": "<string>",
"previewDescription": "<string>",
"previewImageUrl": "<string>",
"startSeconds": 1,
"endSeconds": 123
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the site
Body
The site's complete set of route previews
The site's complete set of route previews. Replaces whatever was stored before — routes omitted here lose their preview (and fall back to the site-level hero). An empty array clears all route previews.
1000Show child attributes
Show child attributes
Response
The stored route previews (routes in canonical form)
Show child attributes
Show child attributes