Update a scheduled broadcast
Fully replaces schedule fields for a broadcast. Path :id is the UBS broadcast id; the body must include scheduled_broadcast_id and re-send any fields that should be kept.
PUT
/
2
/
broadcasts
/
scheduled
/
{id}
Update a scheduled broadcast
curl --request PUT \
--url https://api.x.com/2/broadcasts/scheduled/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scheduled_broadcast_id": "<string>",
"scheduled_end_ms": "<string>",
"scheduled_start_ms": "<string>",
"available_for_replay": true,
"chat_option": "<string>",
"description": "<string>",
"is_locked": true,
"locale": "<string>",
"manual_publish": true,
"roll_forward": true,
"source_id": "<string>",
"thumbnail_media_id": "<string>",
"title": "<string>"
}
'import requests
url = "https://api.x.com/2/broadcasts/scheduled/{id}"
payload = {
"scheduled_broadcast_id": "<string>",
"scheduled_end_ms": "<string>",
"scheduled_start_ms": "<string>",
"available_for_replay": True,
"chat_option": "<string>",
"description": "<string>",
"is_locked": True,
"locale": "<string>",
"manual_publish": True,
"roll_forward": True,
"source_id": "<string>",
"thumbnail_media_id": "<string>",
"title": "<string>"
}
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({
scheduled_broadcast_id: '<string>',
scheduled_end_ms: '<string>',
scheduled_start_ms: '<string>',
available_for_replay: true,
chat_option: '<string>',
description: '<string>',
is_locked: true,
locale: '<string>',
manual_publish: true,
roll_forward: true,
source_id: '<string>',
thumbnail_media_id: '<string>',
title: '<string>'
})
};
fetch('https://api.x.com/2/broadcasts/scheduled/{id}', 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.x.com/2/broadcasts/scheduled/{id}",
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([
'scheduled_broadcast_id' => '<string>',
'scheduled_end_ms' => '<string>',
'scheduled_start_ms' => '<string>',
'available_for_replay' => true,
'chat_option' => '<string>',
'description' => '<string>',
'is_locked' => true,
'locale' => '<string>',
'manual_publish' => true,
'roll_forward' => true,
'source_id' => '<string>',
'thumbnail_media_id' => '<string>',
'title' => '<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.x.com/2/broadcasts/scheduled/{id}"
payload := strings.NewReader("{\n \"scheduled_broadcast_id\": \"<string>\",\n \"scheduled_end_ms\": \"<string>\",\n \"scheduled_start_ms\": \"<string>\",\n \"available_for_replay\": true,\n \"chat_option\": \"<string>\",\n \"description\": \"<string>\",\n \"is_locked\": true,\n \"locale\": \"<string>\",\n \"manual_publish\": true,\n \"roll_forward\": true,\n \"source_id\": \"<string>\",\n \"thumbnail_media_id\": \"<string>\",\n \"title\": \"<string>\"\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.x.com/2/broadcasts/scheduled/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scheduled_broadcast_id\": \"<string>\",\n \"scheduled_end_ms\": \"<string>\",\n \"scheduled_start_ms\": \"<string>\",\n \"available_for_replay\": true,\n \"chat_option\": \"<string>\",\n \"description\": \"<string>\",\n \"is_locked\": true,\n \"locale\": \"<string>\",\n \"manual_publish\": true,\n \"roll_forward\": true,\n \"source_id\": \"<string>\",\n \"thumbnail_media_id\": \"<string>\",\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.x.com/2/broadcasts/scheduled/{id}")
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 \"scheduled_broadcast_id\": \"<string>\",\n \"scheduled_end_ms\": \"<string>\",\n \"scheduled_start_ms\": \"<string>\",\n \"available_for_replay\": true,\n \"chat_option\": \"<string>\",\n \"description\": \"<string>\",\n \"is_locked\": true,\n \"locale\": \"<string>\",\n \"manual_publish\": true,\n \"roll_forward\": true,\n \"source_id\": \"<string>\",\n \"thumbnail_media_id\": \"<string>\",\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"available_for_replay": true,
"broadcast_id": "<string>",
"chat_option": "<string>",
"description": "<string>",
"locale": "<string>",
"manual_publish": true,
"recurring_schedule_id": "<string>",
"scheduled_broadcast_id": "<string>",
"scheduled_end_ms": "<string>",
"scheduled_start_ms": "<string>",
"source_id": "<string>",
"state": "<string>",
"telecast_id": "<string>",
"thumbnail_media_id": "<string>",
"title": "<string>"
},
"errors": [
{
"detail": "<string>",
"resource_type": "<string>",
"title": "<string>",
"type": "https://api.x.com/2/problems/resource-not-found",
"parameter": "<string>",
"resource_id": "<string>",
"status": 123,
"value": "<string>"
}
]
}{
"code": 123,
"message": "<string>"
}Authorizations
OAuth2UserTokenUserToken
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Pattern:
^[a-zA-Z0-9]{1,13}$Body
application/json
Numeric scheduler id from create/list/get.
Pattern:
^[0-9]{1,19}$End time, ms since Unix epoch (decimal string).
Pattern:
^[0-9]{1,19}$Start time, ms since Unix epoch (decimal string).
Pattern:
^[0-9]{1,19}$Enable replay.
Chat permission option (numeric string).
Pattern:
^[0-9]{1,19}$Description.
Lock the broadcast.
Locale.
If true, do not auto-publish at start; call POST .../live when ready.
When true, shift the head of a recurring series.
Ingest / source id.
Pre-live slate media id (numeric string).
Pattern:
^[0-9]{1,19}$Title / status text.
⌘I
Update a scheduled broadcast
curl --request PUT \
--url https://api.x.com/2/broadcasts/scheduled/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scheduled_broadcast_id": "<string>",
"scheduled_end_ms": "<string>",
"scheduled_start_ms": "<string>",
"available_for_replay": true,
"chat_option": "<string>",
"description": "<string>",
"is_locked": true,
"locale": "<string>",
"manual_publish": true,
"roll_forward": true,
"source_id": "<string>",
"thumbnail_media_id": "<string>",
"title": "<string>"
}
'import requests
url = "https://api.x.com/2/broadcasts/scheduled/{id}"
payload = {
"scheduled_broadcast_id": "<string>",
"scheduled_end_ms": "<string>",
"scheduled_start_ms": "<string>",
"available_for_replay": True,
"chat_option": "<string>",
"description": "<string>",
"is_locked": True,
"locale": "<string>",
"manual_publish": True,
"roll_forward": True,
"source_id": "<string>",
"thumbnail_media_id": "<string>",
"title": "<string>"
}
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({
scheduled_broadcast_id: '<string>',
scheduled_end_ms: '<string>',
scheduled_start_ms: '<string>',
available_for_replay: true,
chat_option: '<string>',
description: '<string>',
is_locked: true,
locale: '<string>',
manual_publish: true,
roll_forward: true,
source_id: '<string>',
thumbnail_media_id: '<string>',
title: '<string>'
})
};
fetch('https://api.x.com/2/broadcasts/scheduled/{id}', 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.x.com/2/broadcasts/scheduled/{id}",
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([
'scheduled_broadcast_id' => '<string>',
'scheduled_end_ms' => '<string>',
'scheduled_start_ms' => '<string>',
'available_for_replay' => true,
'chat_option' => '<string>',
'description' => '<string>',
'is_locked' => true,
'locale' => '<string>',
'manual_publish' => true,
'roll_forward' => true,
'source_id' => '<string>',
'thumbnail_media_id' => '<string>',
'title' => '<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.x.com/2/broadcasts/scheduled/{id}"
payload := strings.NewReader("{\n \"scheduled_broadcast_id\": \"<string>\",\n \"scheduled_end_ms\": \"<string>\",\n \"scheduled_start_ms\": \"<string>\",\n \"available_for_replay\": true,\n \"chat_option\": \"<string>\",\n \"description\": \"<string>\",\n \"is_locked\": true,\n \"locale\": \"<string>\",\n \"manual_publish\": true,\n \"roll_forward\": true,\n \"source_id\": \"<string>\",\n \"thumbnail_media_id\": \"<string>\",\n \"title\": \"<string>\"\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.x.com/2/broadcasts/scheduled/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scheduled_broadcast_id\": \"<string>\",\n \"scheduled_end_ms\": \"<string>\",\n \"scheduled_start_ms\": \"<string>\",\n \"available_for_replay\": true,\n \"chat_option\": \"<string>\",\n \"description\": \"<string>\",\n \"is_locked\": true,\n \"locale\": \"<string>\",\n \"manual_publish\": true,\n \"roll_forward\": true,\n \"source_id\": \"<string>\",\n \"thumbnail_media_id\": \"<string>\",\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.x.com/2/broadcasts/scheduled/{id}")
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 \"scheduled_broadcast_id\": \"<string>\",\n \"scheduled_end_ms\": \"<string>\",\n \"scheduled_start_ms\": \"<string>\",\n \"available_for_replay\": true,\n \"chat_option\": \"<string>\",\n \"description\": \"<string>\",\n \"is_locked\": true,\n \"locale\": \"<string>\",\n \"manual_publish\": true,\n \"roll_forward\": true,\n \"source_id\": \"<string>\",\n \"thumbnail_media_id\": \"<string>\",\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"available_for_replay": true,
"broadcast_id": "<string>",
"chat_option": "<string>",
"description": "<string>",
"locale": "<string>",
"manual_publish": true,
"recurring_schedule_id": "<string>",
"scheduled_broadcast_id": "<string>",
"scheduled_end_ms": "<string>",
"scheduled_start_ms": "<string>",
"source_id": "<string>",
"state": "<string>",
"telecast_id": "<string>",
"thumbnail_media_id": "<string>",
"title": "<string>"
},
"errors": [
{
"detail": "<string>",
"resource_type": "<string>",
"title": "<string>",
"type": "https://api.x.com/2/problems/resource-not-found",
"parameter": "<string>",
"resource_id": "<string>",
"status": 123,
"value": "<string>"
}
]
}{
"code": 123,
"message": "<string>"
}