Media Storage API

Update stored media

Changed on

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

put/media/{media_name}

Request

  • Base URL: https://api.telnyx.com/v2
  • URL: https://api.telnyx.com/v2/media/{media_name}
  • Auth: HTTP bearer

Path parameters

media_namestring required

Uniquely identifies a media resource.

Request body

media_urlstring

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_url": "http://www.example.com/audio.mp3",
  "ttl_secs": 86400
}

Response

A response describing a media resource

Example response

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

Changes

    • breaking

      the // response's property type changed from integer to string, and format from int32 to no format for status

    • breaking

      the // response's property type changed from integer to string, and format from int32 to no format for status

    • breaking

      the // response's property type changed from integer to string, and format from int32 to no format for status

    • breaking

      the // response's property type changed from integer to string, and format from int32 to no format for status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • breaking

      the // response's property type changed from string to integer, and format from no format to int32 for status

    • breaking

      the // response's property type changed from string to integer, and format from no format to int32 for status

    • breaking

      the // response's property type changed from string to integer, and format from no format to int32 for status

    • breaking

      the // response's property type changed from string to integer, and format from no format to int32 for status