---
title: "Update a media"
method: PATCH
path: "/v2/sites/{site_id}/media/{media_id}/"
tags: ["media"]
---

# Update a media

`PATCH /v2/sites/{site_id}/media/{media_id}/`

Update a media

## Path parameters

- `site_id` string, required — Unique identifier for a resource
- `media_id` string, required — Unique identifier for a resource

## Request body

- object
  - `metadata` MediaResourceMetadataUpdate
    - `author` string — Name of the author <br /><br /> A maximum of 256 characters is permitted.
    - `title` string — Title of the media <br /><br /> A maximum of 5000 characters is permitted.
    - `description` string — Short explanation of the video content <br /><br /> A maximum of 25000 characters is permitted.
    - `external_id` string — Non-JWX ID for the media A maximum of 64 characters is permitted. Update can only be made to media with a hosting_type of external, hosted, or renditions. The external_id field excludes Live-to-VOD media converted from a JWX live stream. Updates exclude hosted VOD media that was converted from a live stream within JWX.
    - `drm` boolean — Indicates whether DRM is enabled for a media item in a DRM-enabled site
    - `duration` number — Length of the media in seconds This can only be defined manually for externally hosted media. The `duration` is set automatically for hosted media.
    - `permalink` string — URL of the page where this media is published A maximum of 2048 characters is permitted.
    - `category` 'Automotive' | 'Books and Literature' | 'Business and Finance' | 'Careers' | 'Education' | 'Events and Attractions' | 'Family and Relationships' | 'Fine Art' | 'Food & Drink' | 'Healthy Living' | 'Hobbies & Interests' | 'Home & Garden' | 'Medical Health' | 'Movies' | 'Music and Audio' | 'News and Politics' | 'Personal Finance' | 'Pets' | 'Pop Culture' | 'Real Estate' | 'Religion & Spirituality' | 'Science' | 'Shopping' | 'Sports' | 'Style & Fashion' | 'Technology & Computing' | 'Television' | 'Travel' | 'Video Gaming' — IAB category
    - `publish_start_date` string, date-time — Start date and time in ISO 8601 format when media is available for streaming
    - `publish_end_date` string, date-time — End date and time in ISO 8601 format when media is no longer available for streaming
    - `tags` string[] — User-generated labels used to classify a video Tags are case sensitive, and trailing whitespace is removed. When defining `tags`, include all the `tags` that should be associated with the target resource. When updating existing `tags`, include those already in use. Any `tags` not included within the updated `tags` in the request body will be deleted.
    - `language` 'aa' | 'ab' | 'ae' | 'af' | 'ak' | 'am' | 'an' | 'ar' | 'as' | 'av' | 'ay' | 'az' | 'ba' | 'be' | 'bg' | 'bh' | 'bi' | 'bm' | 'bn' | 'bo' | 'br' | 'bs' | 'ca' | 'ce' | 'ch' | 'co' | 'cr' | 'cs' | 'cu' | 'cv' | 'cy' | 'da' | 'de' | 'dv' | 'dz' | 'ee' | 'el' | 'en' | 'eo' | 'es' | 'et' | 'eu' | 'fa' | 'ff' | 'fi' | 'fj' | 'fo' | 'fr' | 'fy' | 'ga' | 'gd' | 'gl' | 'gn' | 'gu' | 'gv' | 'ha' | 'he' | 'hi' | 'ho' | 'hr' | 'ht' | 'hu' | 'hy' | 'hz' | 'ia' | 'id' | 'ie' | 'ig' | 'ii' | 'ik' | 'io' | 'is' | 'it' | 'iu' | 'ja' | 'jv' | 'ka' | 'kg' | 'ki' | 'kj' | 'kk' | 'kl' | 'km' | 'kn' | 'ko' | 'kr' | 'ks' | 'ku' | 'kv' | 'kw' | 'ky' | 'la' | 'lb' | 'lg' | 'li' | 'ln' | 'lo' | 'lt' | 'lu' | 'lv' | 'mg' | 'mh' | 'mi' | 'mk' | 'ml' | 'mn' | 'mr' | 'ms' | 'mt' | 'my' | 'na' | 'nb' | 'nd' | 'ne' | 'ng' | 'nl' | 'nn' | 'no' | 'nr' | 'nv' | 'ny' | 'oc' | 'oj' | 'om' | 'or' | 'os' | 'pa' | 'pi' | 'pl' | 'ps' | 'pt' | 'qu' | 'rm' | 'rn' | 'ro' | 'ru' | 'rw' | 'sa' | 'sc' | 'sd' | 'se' | 'sg' | 'si' | 'sk' | 'sl' | 'sm' | 'sn' | 'so' | 'sq' | 'sr' | 'ss' | 'st' | 'su' | 'sv' | 'sw' | 'ta' | 'te' | 'tg' | 'th' | 'ti' | 'tk' | 'tl' | 'tn' | 'to' | 'tr' | 'ts' | 'tt' | 'tw' | 'ty' | 'ug' | 'uk' | 'ur' | 'uz' | 've' | 'vi' | 'vo' | 'wa' | 'wo' | 'xh' | 'yi' | 'yo' | 'za' | 'zh' | 'zu' — List of language codes to define a language. Uses ISO-639-1 language codes.
    - `content_type` string — Content type of the media item <br /> **JWX default values**: - `movie` - `series` - `episode` - `live_channel` - `live_event` - `trailer` - `hub` - `static_page` <br /> **NOTE**: [Content types](https://docs.jwplayer.com/platform/docs/add-a-content-type) allow you to classify media using shared custom parameters. The content type of a media item affects how it is organized and used within JWX. Ensure the selected content type is compatible with the media item's other metadata and relationships.
    - `custom_params` CustomParamSchema — User-generated key-value pairs When defining `custom_params`, include all custom parameters that should be associated with the target resource. When updating existing `custom_params`, include all `custom_params` keys with their updated values. Any `custom_params` key-value pair not included within the updated `custom_params` in the request body is [deleted](https://docs.jwplayer.com/platform/docs/stream-faq-how-can-i-delete-a-custom-parameter).
  - `relationships` object
    - `protection_rule` RelationshipWrite
      - `id` string, required — Unique identifier for a resource

## Response `200`

Resource successfully updated

- MediaResourceRead
  - `schema` string
  - `id` string — Unique identifier for a resource
  - `created` string — Date and time at which the resource was created
  - `last_modified` string — Date and time at which the resource was most recently modified
  - `type` string — Name of the type of resource.
  - `relationships` object — Ancilliary resources associated to the primary resource being read
    - `protection_rule` RelationshipRead
      - `id` string — Unique identifier for a resource
      - `type` string — Resource type
  - `metadata` MediaResourceMetadata
    - `title` string — Title of the media <br /><br /> A maximum of 5000 characters is permitted.
    - `description` string — Short explanation of the video content <br /><br /> A maximum of 25000 characters is permitted.
    - `author` string — Name of the author <br /><br /> A maximum of 256 characters is permitted.
    - `drm` boolean — Indicates whether DRM is enabled for a media item in a DRM-enabled site
    - `duration` number — Length of the media in seconds This can only be defined manually for externally hosted media. The `duration` is set automatically for hosted media.
    - `permalink` string — URL of the page where this media is published A maximum of 2048 characters is permitted.
    - `category` 'Automotive' | 'Books and Literature' | 'Business and Finance' | 'Careers' | 'Education' | 'Events and Attractions' | 'Family and Relationships' | 'Fine Art' | 'Food & Drink' | 'Healthy Living' | 'Hobbies & Interests' | 'Home & Garden' | 'Medical Health' | 'Movies' | 'Music and Audio' | 'News and Politics' | 'Personal Finance' | 'Pets' | 'Pop Culture' | 'Real Estate' | 'Religion & Spirituality' | 'Science' | 'Shopping' | 'Sports' | 'Style & Fashion' | 'Technology & Computing' | 'Television' | 'Travel' | 'Video Gaming' — IAB category
    - `publish_start_date` string, date-time — Start date and time in ISO 8601 format when media is available for streaming
    - `publish_end_date` string, date-time — End date and time in ISO 8601 format when media is no longer available for streaming
    - `tags` string[] — User-generated labels used to classify a video Tags are case sensitive, and trailing whitespace is removed. When defining `tags`, include all the `tags` that should be associated with the target resource. When updating existing `tags`, include those already in use. Any `tags` not included within the updated `tags` in the request body will be deleted.
    - `language` 'aa' | 'ab' | 'ae' | 'af' | 'ak' | 'am' | 'an' | 'ar' | 'as' | 'av' | 'ay' | 'az' | 'ba' | 'be' | 'bg' | 'bh' | 'bi' | 'bm' | 'bn' | 'bo' | 'br' | 'bs' | 'ca' | 'ce' | 'ch' | 'co' | 'cr' | 'cs' | 'cu' | 'cv' | 'cy' | 'da' | 'de' | 'dv' | 'dz' | 'ee' | 'el' | 'en' | 'eo' | 'es' | 'et' | 'eu' | 'fa' | 'ff' | 'fi' | 'fj' | 'fo' | 'fr' | 'fy' | 'ga' | 'gd' | 'gl' | 'gn' | 'gu' | 'gv' | 'ha' | 'he' | 'hi' | 'ho' | 'hr' | 'ht' | 'hu' | 'hy' | 'hz' | 'ia' | 'id' | 'ie' | 'ig' | 'ii' | 'ik' | 'io' | 'is' | 'it' | 'iu' | 'ja' | 'jv' | 'ka' | 'kg' | 'ki' | 'kj' | 'kk' | 'kl' | 'km' | 'kn' | 'ko' | 'kr' | 'ks' | 'ku' | 'kv' | 'kw' | 'ky' | 'la' | 'lb' | 'lg' | 'li' | 'ln' | 'lo' | 'lt' | 'lu' | 'lv' | 'mg' | 'mh' | 'mi' | 'mk' | 'ml' | 'mn' | 'mr' | 'ms' | 'mt' | 'my' | 'na' | 'nb' | 'nd' | 'ne' | 'ng' | 'nl' | 'nn' | 'no' | 'nr' | 'nv' | 'ny' | 'oc' | 'oj' | 'om' | 'or' | 'os' | 'pa' | 'pi' | 'pl' | 'ps' | 'pt' | 'qu' | 'rm' | 'rn' | 'ro' | 'ru' | 'rw' | 'sa' | 'sc' | 'sd' | 'se' | 'sg' | 'si' | 'sk' | 'sl' | 'sm' | 'sn' | 'so' | 'sq' | 'sr' | 'ss' | 'st' | 'su' | 'sv' | 'sw' | 'ta' | 'te' | 'tg' | 'th' | 'ti' | 'tk' | 'tl' | 'tn' | 'to' | 'tr' | 'ts' | 'tt' | 'tw' | 'ty' | 'ug' | 'uk' | 'ur' | 'uz' | 've' | 'vi' | 'vo' | 'wa' | 'wo' | 'xh' | 'yi' | 'yo' | 'za' | 'zh' | 'zu' — List of language codes to define a language. Uses ISO-639-1 language codes.
    - `content_type` string — Content type of the media item <br /> **JWX default values**: - `movie` - `series` - `episode` - `live_channel` - `live_event` - `trailer` - `hub` - `static_page` <br /> **NOTE**: [Content types](https://docs.jwplayer.com/platform/docs/add-a-content-type) allow you to classify media using shared custom parameters. The content type of a media item affects how it is organized and used within JWX. Ensure the selected content type is compatible with the media item's other metadata and relationships.
    - `custom_params` CustomParamSchema — User-generated key-value pairs When defining `custom_params`, include all custom parameters that should be associated with the target resource. When updating existing `custom_params`, include all `custom_params` keys with their updated values. Any `custom_params` key-value pair not included within the updated `custom_params` in the request body is [deleted](https://docs.jwplayer.com/platform/docs/stream-faq-how-can-i-delete-a-custom-parameter).
  - `status` 'created' | 'processing' | 'ready' | 'updating' | 'failed' — Media upload status
  - `media_type` 'audio' | 'video'
  - `hosting_type` 'external' | 'hosted' | 'renditions' — Indicates whether JW Platform hosts and transcodes the media or not. Possible values: - `external`: The media is transcoded and hosted by a third-party - `hosted`: The media is transcoded and hosted by JW Platform - `renditions`: The media is transcoded by a third party but hosted on JW Platform
  - `mime_type` 'video/mp4' | 'video/webm' | 'video/flv' | 'audio/aac' | 'audio/mpeg' | 'audio/ogg' | 'application/vnd.apple.mpegurl' | 'application/smil+xml' | 'application/dash+xml' | 'video/flash'
  - `error_message` string — Message describing an issue uploading or processing the media
  - `external_id` string — Non-JWX ID for the media A maximum of 64 characters is permitted.
  - `duration` number — Length of the media in seconds
  - `trim_in_point` string — Starting point to trim the video
  - `trim_out_point` string — Ending point to trim the video

## Other responses

- `400` — Bad Request The request either lacks certain attributes or contains malformed/invalid attributes.
- `404` — Not Found The requested asset could not be found.

---

[API](https://skmtc.net/jwplayer/apis/management-api-v2.md) · [All operations](https://skmtc.net/jwplayer/apis/management-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jwplayer/management-api-v2/versions/180db7cada27/schema)
