> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thepublive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Media

> Updates metadata of an existing media asset. Only send the fields you want to change.

<Warning>`path` and `type` are immutable after creation and cannot be changed via update.</Warning>



## OpenAPI

````yaml /openapi/content-management.json patch /publisher/{publisher_id}/media-library/{id}/
openapi: 3.1.0
info:
  title: Publive Content Management API
  version: 1.0.0
  description: >-
    Read/write API for managing publisher content: categories, tags, posts, live
    blogs, media, custom content types, custom components, forms, reader
    accounts, and newsletter subscriptions.
servers:
  - url: https://cms.thepublive.com
security:
  - basicAuth: []
tags:
  - name: Categories
  - name: Tags
  - name: Posts
  - name: Live Blogs
  - name: Media Library
  - name: Custom Content Types
  - name: Custom Components
  - name: Forms
  - name: Reader
  - name: Newsletter
paths:
  /publisher/{publisher_id}/media-library/{id}/:
    patch:
      tags:
        - Media Library
      summary: Update Media
      description: >-
        Updates metadata of an existing media asset. Only send the fields you
        want to change.


        <Warning>`path` and `type` are immutable after creation and cannot be
        changed via update.</Warning>
      operationId: updateMedia
      parameters:
        - $ref: '#/components/parameters/PublisherId'
        - $ref: '#/components/parameters/Id'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                filename:
                  type: string
                  description: Renames must keep a file extension matching the stored file.
                alt_text:
                  type: string
                caption:
                  type: string
                source:
                  type: string
                meta_data:
                  type: object
      responses:
        '200':
          description: Updated
          content:
            application/json:
              example:
                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
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    PublisherId:
      name: publisher_id
      in: path
      required: true
      schema:
        type: string
      description: Your Publisher ID
    Id:
      name: id
      in: path
      required: true
      schema:
        type: integer
  responses:
    Unauthorized:
      description: Invalid or missing credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorDetail'
          example:
            detail: Invalid Auth Credentials
  schemas:
    ErrorDetail:
      type: object
      properties:
        detail:
          type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Auth using your Publive API key pair, base64-encoded.

````