---
title: "Update a media library item"
method: PATCH
path: "/api/journey/media-templates/{media_id}"
tags: ["journey"]
---

# Update a media library item

`PATCH /api/journey/media-templates/{media_id}`

## Path parameters

- `media_id` string, uuid, required — Media template id

## Request body

- UpdateMediaTemplateRequest — Partial update for a media template. Only provided fields change.
  - `title` string, nullable
  - `description` string, nullable
  - `tags` string[], nullable
  - `payload` union
    - TextContentPayload
      - `type` 'text'
      - `style` 'title' | 'body', nullable — title or body
      - `text` string, nullable — The text content
      - `metadata` TextContentMetadata
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable — Show only when the patient is at risk on this side
    - ImageContentPayload
      - `type` 'image'
      - `file_path` string, nullable — Internal file path
      - `variant` 'full', nullable — e.g. full
      - `metadata` ImageContentMetadata
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable — Show only when the patient is at risk on this side
    - VideoContentPayload
      - `type` 'video'
      - `title` string, nullable
      - `description` string, nullable
      - `url` string, nullable — External video URL
      - `metadata` VideoContentMetadata
        - `duration_seconds` integer, nullable — Video duration in seconds
        - `video_id` union — Linked internal video id
          - string
          - string, uuid
        - `family_course_episode` integer, nullable — Family-course episode number
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable
    - AudioContentPayload
      - `type` 'audio'
      - `title` string, nullable
      - `description` string, nullable
      - `url` string, nullable — External audio URL
      - `metadata` AudioContentMetadata
        - `duration_seconds` integer, nullable — Audio duration in seconds
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable
    - PodcastContentPayload
      - `type` 'podcast'
      - `title` string, nullable
      - `description` string, nullable
      - `url` string, nullable — External podcast URL
      - `metadata` PodcastContentMetadata
        - `duration_seconds` integer, nullable — Podcast duration in seconds
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable
    - PdfContentPayload
      - `type` 'pdf'
      - `title` string, nullable
      - `description` string, nullable
      - `file_path` string, nullable — Internal file path
      - `metadata` PdfContentMetadata
        - `editable` boolean, nullable — Whether the PDF is editable
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable
    - MicroGameContentPayload
      - `type` 'micro_game'
      - `title` string, nullable
      - `description` string, nullable
      - `game_type` string, nullable — micro_game template identifier
      - `metadata` MicroGameContentMetadata
        - `game_type` string, nullable — micro_game template identifier
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable
    - QuestionnaireContentPayload
      - `type` 'questionnaire'
      - `title` string, nullable
      - `description` string, nullable
      - `metadata` QuestionnaireContentMetadata
        - `questionnaire_type` string, nullable — Questionnaire identifier
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable

## Response `200`

Successful Response

- MediaTemplateResponse — A single-use media from the library.
  - `id` string, required — Media template id
  - `title` string, required
  - `description` string, nullable
  - `type` string, required — Content type (video, pdf, image, ...)
  - `tags` string[] — Free-form tags to search by theme
  - `payload` union, required — Type-specific content payload
    - TextContentPayload
      - `type` 'text'
      - `style` 'title' | 'body', nullable — title or body
      - `text` string, nullable — The text content
      - `metadata` TextContentMetadata
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable — Show only when the patient is at risk on this side
    - ImageContentPayload
      - `type` 'image'
      - `file_path` string, nullable — Internal file path
      - `variant` 'full', nullable — e.g. full
      - `metadata` ImageContentMetadata
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable — Show only when the patient is at risk on this side
    - VideoContentPayload
      - `type` 'video'
      - `title` string, nullable
      - `description` string, nullable
      - `url` string, nullable — External video URL
      - `metadata` VideoContentMetadata
        - `duration_seconds` integer, nullable — Video duration in seconds
        - `video_id` union — Linked internal video id
          - string
          - string, uuid
        - `family_course_episode` integer, nullable — Family-course episode number
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable
    - AudioContentPayload
      - `type` 'audio'
      - `title` string, nullable
      - `description` string, nullable
      - `url` string, nullable — External audio URL
      - `metadata` AudioContentMetadata
        - `duration_seconds` integer, nullable — Audio duration in seconds
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable
    - PodcastContentPayload
      - `type` 'podcast'
      - `title` string, nullable
      - `description` string, nullable
      - `url` string, nullable — External podcast URL
      - `metadata` PodcastContentMetadata
        - `duration_seconds` integer, nullable — Podcast duration in seconds
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable
    - PdfContentPayload
      - `type` 'pdf'
      - `title` string, nullable
      - `description` string, nullable
      - `file_path` string, nullable — Internal file path
      - `metadata` PdfContentMetadata
        - `editable` boolean, nullable — Whether the PDF is editable
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable
    - MicroGameContentPayload
      - `type` 'micro_game'
      - `title` string, nullable
      - `description` string, nullable
      - `game_type` string, nullable — micro_game template identifier
      - `metadata` MicroGameContentMetadata
        - `game_type` string, nullable — micro_game template identifier
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable
    - QuestionnaireContentPayload
      - `type` 'questionnaire'
      - `title` string, nullable
      - `description` string, nullable
      - `metadata` QuestionnaireContentMetadata
        - `questionnaire_type` string, nullable — Questionnaire identifier
        - `show_when_risk` 'psi' | 'nutri' | 'both', nullable
  - `used_in` MediaUsage — The step a library media is currently used in.
    - `track_code` string, required — Track of the step using this media
    - `step_code` string, required — Step using this media
    - `step_title` string, required — Step title

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/corabea/apis/corabea-api.md) · [All operations](https://skmtc.dev/corabea/apis/corabea-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corabea/corabea-api/revisions/13c1bce1bdc4/schema)
