---
title: "Update stored media"
method: PUT
path: "/media/{media_name}"
tags: ["Media Storage API"]
---

# Update stored media

`PUT /media/{media_name}`

Updates the specified stored media file and returns the updated resource.

## Path parameters

- `media_name` string, required

## Request body

- UpdateMediaRequest
  - `media_url` string — The URL where the media to be stored in Telnyx network is currently hosted. The maximum allowed size is 20 MB.
  - `ttl_secs` integer — The number of seconds after which the media resource will be deleted, defaults to 2 days. The maximum allowed vale is 630720000, which translates to 20 years.

## Response `200`

A response describing a media resource

- object
  - `data` MediaResource
    - `content_type` string — Content type of the file
    - `created_at` string — ISO 8601 formatted date of when the media resource was created
    - `expires_at` string — ISO 8601 formatted date of when the media resource will expire and be deleted.
    - `media_name` string — Uniquely identifies a media resource.
    - `updated_at` string — ISO 8601 formatted date of when the media resource was last updated

## Other responses

- `401` — Unexpected error
- `404` — Unexpected error
- `422` — Unexpected error
- `default` — Unexpected error

## Changes

- **2026-08-17** `1571b0380bd7` — 4 breaking
  - the `errors/items/code` response's property type changed from `integer` to `string`, and format from `int32` to no format for status `401`
  - the `errors/items/code` response's property type changed from `integer` to `string`, and format from `int32` to no format for status `404`
  - the `errors/items/code` response's property type changed from `integer` to `string`, and format from `int32` to no format for status `422`
  - the `errors/items/code` response's property type changed from `integer` to `string`, and format from `int32` to no format for status `default`
- **2026-08-04** `8f5f4e537994` — 4 breaking
  - the `errors/items/code` response's property type changed from `string` to `integer`, and format from no format to `int32` for status `401`
  - the `errors/items/code` response's property type changed from `string` to `integer`, and format from no format to `int32` for status `404`
  - the `errors/items/code` response's property type changed from `string` to `integer`, and format from no format to `int32` for status `422`
  - the `errors/items/code` response's property type changed from `string` to `integer`, and format from no format to `int32` for status `default`

[Change history](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/changes/media/:media_name/put.md)

---

[API](https://skmtc.dev/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api-2/revisions/3fdc16374d70/schema)
