---
title: "Upload media"
method: POST
path: "/media"
tags: ["Media Storage API"]
---

# Upload media

`POST /media`

Upload media file to Telnyx so it can be used with other Telnyx services

## Request body

- UploadMediaRequest
  - `media_name` string — The unique identifier of a file.
  - `media_url` string, required — 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 `201`

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
- `422` — Unexpected error
- `default` — Unexpected error

---

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