Media Storage API

Upload media

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

post/media

Request body

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.

media_namestring

The unique identifier of a file.

Example request

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

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

Changed in 3 of the 99 revisions of this API.9

    • ▲

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

      response-property-type-changed

    • ▲

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

      response-property-type-changed

    • ▲

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

      response-property-type-changed

    This revision also has 34 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ▲

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

      response-property-type-changed

    • ▲

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

      response-property-type-changed

    • ▲

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

      response-property-type-changed

    This revision also has 64 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ▲

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

      response-property-type-changed

    • ▲

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

      response-property-type-changed

    • ▲

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

      response-property-type-changed

    This revision also has 41 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

Of the 99 revisions, 1 has no diff computed.