Register Media (URL)
curl --request POST \
--url https://cms.thepublive.com/publisher/{publisher_id}/media-library/ \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data filename=hero-image.jpg \
--data 'path=<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/"
payload = {
"filename": "hero-image.jpg",
"path": "<string>",
"alt_text": "<string>",
"caption": "<string>",
"source": "<string>",
"meta_data": "{}"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
filename: 'hero-image.jpg',
path: '<string>',
alt_text: '<string>',
caption: '<string>',
source: '<string>',
meta_data: '{}'
})
};
fetch('https://cms.thepublive.com/publisher/{publisher_id}/media-library/', 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/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "filename=hero-image.jpg&path=%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/"
payload := strings.NewReader("filename=hero-image.jpg&path=%3Cstring%3E&alt_text=%3Cstring%3E&caption=%3Cstring%3E&source=%3Cstring%3E&meta_data=%7B%7D")
req, _ := http.NewRequest("POST", 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.post("https://cms.thepublive.com/publisher/{publisher_id}/media-library/")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("filename=hero-image.jpg&path=%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/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "filename=hero-image.jpg&path=%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": "Created Successfully",
"data": {
"id": 1000,
"filename": "hero-image.jpg",
"alt_text": "Hero banner image",
"caption": "",
"path": "https://cdn.publive.com/images/hero-image.jpg",
"source": "Staff Photographer",
"type": "Image",
"meta_data": {},
"date": "2026-02-12",
"member": "admin"
}
}{
"detail": "Invalid Auth Credentials"
}Register Media (URL)
Register an existing external media URL to the CMS library
POST
/
publisher
/
{publisher_id}
/
media-library
/
Register Media (URL)
curl --request POST \
--url https://cms.thepublive.com/publisher/{publisher_id}/media-library/ \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data filename=hero-image.jpg \
--data 'path=<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/"
payload = {
"filename": "hero-image.jpg",
"path": "<string>",
"alt_text": "<string>",
"caption": "<string>",
"source": "<string>",
"meta_data": "{}"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
filename: 'hero-image.jpg',
path: '<string>',
alt_text: '<string>',
caption: '<string>',
source: '<string>',
meta_data: '{}'
})
};
fetch('https://cms.thepublive.com/publisher/{publisher_id}/media-library/', 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/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "filename=hero-image.jpg&path=%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/"
payload := strings.NewReader("filename=hero-image.jpg&path=%3Cstring%3E&alt_text=%3Cstring%3E&caption=%3Cstring%3E&source=%3Cstring%3E&meta_data=%7B%7D")
req, _ := http.NewRequest("POST", 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.post("https://cms.thepublive.com/publisher/{publisher_id}/media-library/")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("filename=hero-image.jpg&path=%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/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "filename=hero-image.jpg&path=%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": "Created Successfully",
"data": {
"id": 1000,
"filename": "hero-image.jpg",
"alt_text": "Hero banner image",
"caption": "",
"path": "https://cdn.publive.com/images/hero-image.jpg",
"source": "Staff Photographer",
"type": "Image",
"meta_data": {},
"date": "2026-02-12",
"member": "admin"
}
}{
"detail": "Invalid Auth Credentials"
}Registers an already-hosted media URL as a new entry in the library, without uploading a file. Send the request as
application/x-www-form-urlencoded with a path field pointing at the external URL.
filename must include a file extension, and it must match the file path points at — e.g. hero-image.jpg.To upload a file directly instead, see Upload Media (File). Both pages document the same endpoint — pick whichever example below matches how you’re sending the request.
Example Request
curl -X POST \
'https://cms.thepublive.com/publisher/123/media-library/' \
-H 'Authorization: Basic <BASE64_AUTH_TOKEN>' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'filename=hero-image.jpg&path=https://cdn.publive.com/images/hero-image.jpg&alt_text=Hero banner image&source=Staff Photographer'
Authorizations
HTTP Basic Auth using your Publive API key pair, base64-encoded.
Path Parameters
Your Publisher ID
Body
application/x-www-form-urlencoded
Must include a file extension matching the file path points at.
Example:
"hero-image.jpg"
Immutable after creation. External media URL.
Immutable after creation.
Available options:
Image, Video, File Response
Created
Last modified on August 12, 2026
Was this page helpful?
⌘I