Update Media
curl --request PATCH \
--url https://cms.thepublive.com/publisher/{publisher_id}/media-library/{id}/ \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'filename=<string>' \
--data 'alt_text=<string>' \
--data 'caption=<string>' \
--data 'source=<string>' \
--data 'meta_data={}'import requests
url = "https://cms.thepublive.com/publisher/{publisher_id}/media-library/{id}/"
payload = {
"filename": "<string>",
"alt_text": "<string>",
"caption": "<string>",
"source": "<string>",
"meta_data": "{}"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
filename: '<string>',
alt_text: '<string>',
caption: '<string>',
source: '<string>',
meta_data: '{}'
})
};
fetch('https://cms.thepublive.com/publisher/{publisher_id}/media-library/{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://cms.thepublive.com/publisher/{publisher_id}/media-library/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "filename=%3Cstring%3E&alt_text=%3Cstring%3E&caption=%3Cstring%3E&source=%3Cstring%3E&meta_data=%7B%7D",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://cms.thepublive.com/publisher/{publisher_id}/media-library/{id}/"
payload := strings.NewReader("filename=%3Cstring%3E&alt_text=%3Cstring%3E&caption=%3Cstring%3E&source=%3Cstring%3E&meta_data=%7B%7D")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://cms.thepublive.com/publisher/{publisher_id}/media-library/{id}/")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("filename=%3Cstring%3E&alt_text=%3Cstring%3E&caption=%3Cstring%3E&source=%3Cstring%3E&meta_data=%7B%7D")
.asString();require 'uri'
require 'net/http'
url = URI("https://cms.thepublive.com/publisher/{publisher_id}/media-library/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "filename=%3Cstring%3E&alt_text=%3Cstring%3E&caption=%3Cstring%3E&source=%3Cstring%3E&meta_data=%7B%7D"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Updated Successfully",
"data": {
"id": 999,
"filename": "budget-2026.jpg",
"alt_text": "Updated alt text",
"caption": "Budget session in Parliament",
"path": "https://cdn.publive.com/images/budget-2026.jpg",
"source": "Reuters",
"type": "Image",
"meta_data": {
"width": 1200,
"height": 630
}
}
}{
"detail": "Invalid Auth Credentials"
}Update Media
Updates metadata of an existing media asset. Only send the fields you want to change.
path and type are immutable after creation and cannot be changed via update.PATCH
/
publisher
/
{publisher_id}
/
media-library
/
{id}
/
Update Media
curl --request PATCH \
--url https://cms.thepublive.com/publisher/{publisher_id}/media-library/{id}/ \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'filename=<string>' \
--data 'alt_text=<string>' \
--data 'caption=<string>' \
--data 'source=<string>' \
--data 'meta_data={}'import requests
url = "https://cms.thepublive.com/publisher/{publisher_id}/media-library/{id}/"
payload = {
"filename": "<string>",
"alt_text": "<string>",
"caption": "<string>",
"source": "<string>",
"meta_data": "{}"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
filename: '<string>',
alt_text: '<string>',
caption: '<string>',
source: '<string>',
meta_data: '{}'
})
};
fetch('https://cms.thepublive.com/publisher/{publisher_id}/media-library/{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://cms.thepublive.com/publisher/{publisher_id}/media-library/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "filename=%3Cstring%3E&alt_text=%3Cstring%3E&caption=%3Cstring%3E&source=%3Cstring%3E&meta_data=%7B%7D",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://cms.thepublive.com/publisher/{publisher_id}/media-library/{id}/"
payload := strings.NewReader("filename=%3Cstring%3E&alt_text=%3Cstring%3E&caption=%3Cstring%3E&source=%3Cstring%3E&meta_data=%7B%7D")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://cms.thepublive.com/publisher/{publisher_id}/media-library/{id}/")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("filename=%3Cstring%3E&alt_text=%3Cstring%3E&caption=%3Cstring%3E&source=%3Cstring%3E&meta_data=%7B%7D")
.asString();require 'uri'
require 'net/http'
url = URI("https://cms.thepublive.com/publisher/{publisher_id}/media-library/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "filename=%3Cstring%3E&alt_text=%3Cstring%3E&caption=%3Cstring%3E&source=%3Cstring%3E&meta_data=%7B%7D"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Updated Successfully",
"data": {
"id": 999,
"filename": "budget-2026.jpg",
"alt_text": "Updated alt text",
"caption": "Budget session in Parliament",
"path": "https://cdn.publive.com/images/budget-2026.jpg",
"source": "Reuters",
"type": "Image",
"meta_data": {
"width": 1200,
"height": 630
}
}
}{
"detail": "Invalid Auth Credentials"
}Authorizations
HTTP Basic Auth using your Publive API key pair, base64-encoded.
Body
application/x-www-form-urlencoded
Response
Updated
Last modified on August 10, 2026
Was this page helpful?
⌘I