Change a recording's gate, button or end card
US Region: https://public-api.sessionboard.com · EU Region: https://public-api-eu.sessionboard.com
Send only what changes; anything left out keeps its value. A custom button needs a label and a web link. This changes what visitors see wherever the recording plays. Requires write:marketing; refused for a key restricted to particular events. Also at PUT /v1/marketing/video/items/{mediaId}.
Request example
curl --request PUT \ --url 'https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/video/items/{mediaId}' \ --header 'x-access-token: <api-token>' \ --header 'Content-Type: application/json' \ --data '{ "gate": "off", "gateAtS": 0, "ctaMode": "auto", "ctaLabel": "<string>", "ctaUrl": "<string>", "ctaAtS": 0, "endCard": true}'const response = await fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/video/items/{mediaId}', { method: 'PUT', headers: { "x-access-token": "<api-token>", "Content-Type": "application/json" }, body: JSON.stringify({ "gate": "off", "gateAtS": 0, "ctaMode": "auto", "ctaLabel": "<string>", "ctaUrl": "<string>", "ctaAtS": 0, "endCard": true }),});
const data = await response.json();console.log(data);import requests
response = requests.request( "PUT", "https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/video/items/{mediaId}", headers={ "x-access-token": "<api-token>", "Content-Type": "application/json" }, json={ "gate": "off", "gateAtS": 0, "ctaMode": "auto", "ctaLabel": "<string>", "ctaUrl": "<string>", "ctaAtS": 0, "endCard": True },)
print(response.json())<?php
$curl = curl_init();
curl_setopt_array($curl, [ CURLOPT_URL => "https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/video/items/{mediaId}", CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => '{ "gate": "off", "gateAtS": 0, "ctaMode": "auto", "ctaLabel": "<string>", "ctaUrl": "<string>", "ctaAtS": 0, "endCard": true}', CURLOPT_HTTPHEADER => [ "x-access-token: <api-token>", "Content-Type: application/json", ],]);
$response = curl_exec($curl);curl_close($curl);
echo $response;package main
import ( "fmt" "io" "net/http" "strings")
func main() { req, _ := http.NewRequest("PUT", "https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/video/items/{mediaId}", strings.NewReader(`{ "gate": "off", "gateAtS": 0, "ctaMode": "auto", "ctaLabel": "<string>", "ctaUrl": "<string>", "ctaAtS": 0, "endCard": true}`)) req.Header.Add("x-access-token", "<api-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))}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/video/items/{mediaId}")) .header("x-access-token", "<api-token>") .header("Content-Type", "application/json") .method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"gate\": \"off\",\n \"gateAtS\": 0,\n \"ctaMode\": \"auto\",\n \"ctaLabel\": \"<string>\",\n \"ctaUrl\": \"<string>\",\n \"ctaAtS\": 0,\n \"endCard\": true\n}")) .build();
HttpResponse<String> response = HttpClient.newHttpClient() .send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Try it
Response headers
Authorizations
x-access-tokenstringheaderOrganization API token. Generate from Organization Settings → API Tokens.
AuthorizationBearer <token>headerorOAuth 2.1 access token. Obtained via the OAuth PKCE flow at
/oauth/token.
Send one of these. See Authentication.
Path parameters
orgIdstringpathrequiredYour organization ID. Any other organization returns
404.mediaIdstring<uuid>pathrequiredThe recording (Media item)
Request body
gatestring- Allowed values
"off", "before", "at"
gateAtSintegerNeeded with gate at
- Minimum
0- Maximum
86400
ctaModestring- Allowed values
"auto", "custom", "off"
ctaLabelstring- Max length
80
ctaUrlstringA web address (https://…)
ctaAtSinteger | null- Minimum
0- Maximum
86400
endCardboolean
{ "gate": "off", "gateAtS": 0, "ctaMode": "auto", "ctaLabel": "<string>", "ctaUrl": "<string>", "ctaAtS": 0, "endCard": true}Responses
200
payload is the VideoOptions after the change
400
A time after the end of the recording, a custom button without a label or link, or a link that is not a web address.
403
SCOPE_REQUIRED— the token lacksread:marketing(reads) orwrite:marketing(writes).ORG_WIDE_TOKEN_REQUIRED— the token is restricted to particular events; this operation reads the whole organization.FORBIDDEN— the organization's plan does not include Marketing, or the token's user cannot change goals (writes need an organization admin or the organization settings permission).
404
The recording is not in your organization.
