Skip to main content
POST
/
publisher
/
{publisher_id}
/
media-library
Register Media
curl --request POST \
  --url https://cms.thepublive.com/publisher/{publisher_id}/media-library/ \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>",
  "path": "<string>",
  "alt_text": "<string>",
  "caption": "<string>",
  "source": "<string>",
  "type": "<string>",
  "meta_data": {}
}
'
{
  "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"
  }
}
Registers an existing media URL to the CMS library.
This endpoint does not support direct file uploads. It expects a standard JSON payload containing a direct URL (path) to an image or file hosted on an external server (e.g., S3, Cloudinary). Sending multipart/form-data or binary files will result in a server error.
Creates a new media entry in the library using an external URL.
publisher_id
string
required
Your Publisher ID
filename
string
required
Filename
path
string
required
Media URL. Cannot be changed after creation.
alt_text
string
Alt text for accessibility
caption
string
Caption/description
source
string
Source/credit
type
string
Image, Video, or File. Cannot be changed after creation.
meta_data
object
Metadata (width, height, etc.)

Example Request

curl -X POST \
  'https://cms.thepublive.com/publisher/123/media-library/' \
  -H 'Authorization: Basic <BASE64_AUTH_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
    "filename": "hero-image.jpg",
    "path": "https://cdn.publive.com/images/hero-image.jpg",
    "alt_text": "Hero banner image",
    "source": "Staff Photographer"
  }'
{
  "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"
  }
}