Skip to main content
POST https://cms.thepublive.com/publisher/{publisher_id}/media-library/ Creates a new media entry in the library.

Headers

NameTypeRequiredDescription
usernamestringYesAPI Key
passwordstringYesAPI Secret
Content-TypestringYesapplication/json

Request Body

FieldTypeRequiredDescription
filename*stringYesFilename
path*stringYesMedia URL
alt_textstringNoAlt text for accessibility
captionstringNoCaption/description
sourcestringNoSource/credit
typestringNoImage, Video, or File
meta_dataobjectNoMetadata (width, height, etc.)

Example Request

curl -X POST \
  'https://cms.thepublive.com/publisher/123/media-library/' \
  -H 'username: YOUR_API_KEY' \
  -H 'password: YOUR_API_SECRET' \
  -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"
  }
}