---
title: "Upload media"
method: POST
path: "/media"
tags: ["Media"]
---

# Upload media

`POST /media`

This method is used to upload a file to cloud storage. In the response, you will receive the MediaID for the uploaded file, which can be used later, for example, to send media messages. The file type are determined by the file extension. [Read more about file storage period.](https://support.whapi.cloud/help-desk/receiving/file-expiration-period)

## Request body

- object — Media file to upload.
  - `no_encode` boolean — Do not use our encoding
  - `media` union
    - string, binary — File to upload
    - string — Media file URL for upload
    - string — Base64 encoded file to upload

## Response `200`

- UploadMediaResponse
  - `media` UploadMedia[]
    - `id` string — Media ID

## Other responses

- `400` — Wrong request parameters
- `401` — Need channel authorization for upload media
- `500` — Internal Error

---

[API](https://skmtc.dev/whapi/apis/whatsapp-api.md) · [All operations](https://skmtc.dev/whapi/apis/whatsapp-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/whapi/whatsapp-api/revisions/40ab05abffdb/schema)
