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

# Update media



## OpenAPI

````yaml /openapi.json put /media_contents/{mediaContent}
openapi: 3.1.0
info:
  title: PublishBuddy
  version: 0.0.1
servers:
  - url: https://api.publishbuddy.com/v1
security: []
paths:
  /media_contents/{mediaContent}:
    put:
      tags:
        - MediaContent
      summary: Update media
      operationId: v1.media_contents.update
      parameters:
        - name: mediaContent
          in: path
          required: true
          description: The media content UUID
          schema:
            type: string
        - name: Authorization
          in: header
          required: true
          description: JWT token.
          schema:
            type: string
          example: Bearer 123
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMediaContentRequest'
      responses:
        '200':
          description: '`MediaContentResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/MediaContentResource'
                  message:
                    type: string
                required:
                  - data
                  - message
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    UpdateMediaContentRequest:
      type: object
      properties:
        label:
          type:
            - string
            - 'null'
          description: Media Content Label to update. Optional
          maxLength: 250
        folder_id:
          type:
            - string
            - 'null'
      title: UpdateMediaContentRequest
    MediaContentResource:
      type: object
      properties:
        id:
          type: string
          description: UUID
        name:
          type: string
          description: Name of media file
        full_name:
          type: string
          description: Full relative name
        label:
          type:
            - string
            - 'null'
          description: Label of media
        link:
          type: string
          description: Full link to media
        size:
          type:
            - integer
            - 'null'
          description: Media size in bytes
        width:
          type:
            - integer
            - 'null'
          description: Width in pixel
        height:
          type:
            - integer
            - 'null'
          description: Height in pixel
        time:
          type:
            - integer
            - 'null'
          description: Time is second
        folder_id:
          type: string
      required:
        - id
        - name
        - full_name
        - label
        - link
        - size
        - width
        - height
        - time
        - folder_id
      title: MediaContentResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````