Uploading Media

Use this API to upload, retrieve, or delete media.

If you use the media upload process rather than linking to a media URL, the file must be uploaded to the media volume. Once the upload is complete, you can send a message using the media ID.

See the Supported Content-Types section below for information about supported Content-Type you can upload.

❗️

Request Body

POST body of the API request must contain the binary media data and the Content-Type header must be set to the type of the media being uploaded.

🚧

Maximum allowed media size

The maximum allowed size for uploading is 10 MB and in case of the large files use the URL option in send message APIs directly.

Supported Content-Types

Media

Supported Content-Types

audio

  • audio/aac

  • audio/mp4

  • audio/amr

  • audio/mpeg

  • audio/ogg; codecs=opus

  • *Note**:
    The base audio/ogg type is **not** supported

document

Any valid MIME-type

image

  • image/jpeg
  • image/png

sticker

image/webp

video

video/mp4 , video/3gpp

  • *Note**:
    • Only H.264 videocodec and AAC audio codec is supported.
    • Only videos with a single audio stream are supported.
Language
Credentials
Header
Click Try It! to start a request and see the response here!