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

# Update media.



## OpenAPI

````yaml /openapi/chat-client.yaml patch /media/{id}
openapi: 3.0.3
info:
  version: 1.0.0
  title: HealviChat Client API
servers:
  - url: https://{tenant_domain}/third-party/v1
    variables:
      tenant_domain:
        default: your-tenant.onhealvi.com
        description: Your tenant domain
security:
  - bearerAuth: []
paths:
  /media/{id}:
    patch:
      tags:
        - media
      summary: Update media.
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  description: Human readable title of media.
                  type: string
                  nullable: true
                description:
                  description: Human readable description of media.
                  type: string
                  nullable: true
                filename:
                  description: Technical name of the file.
                  type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Media'
components:
  schemas:
    Media:
      description: >-
        Media used to quickly send files without having to upload them first
        every time.
      type: object
      properties:
        id:
          type: integer
          description: Internal ID.
        type:
          type: string
          enum:
            - image
            - video
            - audio
            - document
        uuid:
          description: |
            Internal file system UUID.
            Use this UUID when sending messages.
          type: string
        public_download_url:
          description: |
            URL to directly download the file without a token.
            WARNING: Temporary valid for 7 days!
        title:
          description: Human readable title of media.
          type: string
          nullable: true
        description:
          description: Human readable description of media.
          type: string
          nullable: true
        filename:
          description: Technical name of the file.
          type: string
        mime_type:
          description: Mime type of the file.
          type: string
        size:
          description: Size in bytes.
          type: integer
        user_id:
          description: Optional ID of user which uploaded the media.
          type: integer
          nullable: true
        created_at:
          description: Datetime when template was created.
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
        updated_at:
          description: Datetime when template was last updated.
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````