> ## Documentation Index
> Fetch the complete documentation index at: https://help.cloudtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload media

> Uploads one image or file as `multipart/form-data` with one part, `file`, and answers `201` with its `id`. Pass the `id` in `mediaIds` on [Send a message](/api-reference/messages/send-a-message) before `expiresAt`, 24 hours after the upload. Each upload goes with one message.

**Images:** jpg, png or gif on MMS, jpg or png on WhatsApp (`image/jpeg`, `image/jpg`, `image/png`, `image/gif`), up to 5,226,880 bytes on both channels.

**Files, for WhatsApp only**, up to 16,777,216 bytes (16 MiB): PDF (`application/pdf`); vCard (`text/vcard`, `text/x-vcard`, `application/vcard`); `text/csv`, `text/rtf`, `text/richtext`, `text/calendar` and `text/directory`; images `image/bmp` and `image/tiff`; audio `audio/mpeg`, `audio/mp4`, `audio/ogg`, `audio/amr`, `audio/amr-nb`, `audio/3gpp`, `audio/3gpp2`, `audio/ac3`, `audio/webm`, `audio/basic`, `audio/L24`, `audio/vnd.wave` and `audio/vnd.rn-realaudio`; video `video/mp4`, `video/mpeg`, `video/quicktime`, `video/webm`, `video/3gpp`, `video/3gpp2`, `video/3gpp-tt`, `video/H261`, `video/H263`, `video/H263-1998`, `video/H263-2000` and `video/H264`.

Every upload needs SMS on your account, and files other than images also need WhatsApp. The declared type must match the file's content. There is no upload by URL. The file name comes back as `media[].fileName` on the message.

Counts toward your company's Messaging rate limit, one count shared by the Messages, Conversations, WhatsApp templates and media operations: 60 requests per minute by default. See [Rate limiting](/guides/rate-limiting).



## API Specification

The full API specification for this endpoint is available in the [documentation index](https://help.cloudtalk.io/llms.txt).


## Related topics

- [Send and read messages with the API](https://help.cloudtalk.io/guides/messages/manage-with-api.md)
- [Send a message](https://help.cloudtalk.io/api-reference/messages/send-a-message.md)
- [CloudTalk API HTTP Error Codes: Causes and Resolutions](https://help.cloudtalk.io/guides/error-codes.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.