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

# Update Media Asset



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json put /api/v1/media/{media_id}
openapi: 3.1.0
info:
  title: CATTIX API
  description: CATTIX Backend API
  version: 0.107.0
servers:
  - url: http://localhost:8000
    description: Local
  - url: https://dev-api.cattix.com
    description: Development
  - url: https://staging-api.cattix.com
    description: Staging
  - url: https://api.cattix.com
    description: Production
security: []
paths:
  /api/v1/media/{media_id}:
    put:
      tags:
        - Media
      summary: Update Media Asset
      operationId: update_media_asset_api_v1_media__media_id__put
      parameters:
        - name: media_id
          in: path
          required: true
          schema:
            type: integer
            title: Media Id
        - name: company_id
          in: query
          required: true
          schema:
            type: integer
            description: Company ID
            title: Company Id
          description: Company ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MediaUpdateRequestSchema'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaUploadResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    MediaUpdateRequestSchema:
      properties:
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
          description: Optional new tags list
        alt_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Alt Text
          description: Optional new alt text
      type: object
      title: MediaUpdateRequestSchema
    MediaUploadResponseSchema:
      properties:
        id:
          type: integer
          title: Id
        filename:
          type: string
          title: Filename
        url:
          type: string
          title: Url
        file_size:
          type: integer
          title: File Size
        mime_type:
          type: string
          title: Mime Type
        width:
          anyOf:
            - type: integer
            - type: 'null'
          title: Width
        height:
          anyOf:
            - type: integer
            - type: 'null'
          title: Height
        source_type:
          $ref: '#/components/schemas/MediaSourceType'
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
        external_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: External Metadata
        tags:
          items:
            type: string
          type: array
          title: Tags
        alt_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Alt Text
        date_added:
          type: string
          format: date-time
          title: Date Added
        date_updated:
          type: string
          format: date-time
          title: Date Updated
      type: object
      required:
        - id
        - filename
        - url
        - file_size
        - mime_type
        - source_type
        - date_added
        - date_updated
      title: MediaUploadResponseSchema
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MediaSourceType:
      type: string
      enum:
        - upload
        - stock
        - ai_generated
      title: MediaSourceType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````