v52

OpenAPI 3.1.0raw.githubusercontent.com2026-07-311,1941,9384.1 MB
Media Storage API

Upload media

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

post/media

Request body

media_namestring

The unique identifier of a file.

media_urlstring required

The URL where the media to be stored in Telnyx network is currently hosted. The maximum allowed size is 20 MB.

ttl_secsinteger

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.

Example request

{
  "media_name": "my-file",
  "media_url": "http://www.example.com/audio.mp3",
  "ttl_secs": 86400
}

Response

A response describing a media resource

Example response

{
  "data": {
    "content_type": "application/xml",
    "created_at": "2019-01-23T18:10:02.574Z",
    "expires_at": "2020-01-23T18:10:02.574Z",
    "media_name": "f5586561-8ff0-4291-a0ac-84fe544797bd",
    "updated_at": "2019-01-23T18:10:02.574Z"
  }
}