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

# Upload Media File

`POST /media/upload`

## Request

- Base URL: `https://waapi.pepipost.com/api/v2`
- URL: `https://waapi.pepipost.com/api/v2/media/upload`
- Auth: HTTP bearer

Upload media files (images, videos, documents) to Netcore's platform and receive a media ID that can be used in WhatsApp messages.

**Supported Media Types:**
- **Images**: JPEG, PNG, GIF, WebP
- **Videos**: MP4, 3GPP
- **Audio**: AAC, M4A, AMR, OGG OPUS
- **Documents**: PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX

**Usage:**
- Use this approach when you don't have publicly hosted media files
- Perfect for sending the same media file to multiple recipients
- Ideal for documents or images that aren't customized per recipient

## Headers

- `Content-Type` 'multipart/form-data', required

## Request body `multipart/form-data`

- MediaUploadRequest: Request payload for uploading media file
  - `file` string, binary, required: The media file to upload (binary data)

## Response `200`

Media uploaded successfully

- MediaUploadResponse: Response containing uploaded media information
  - `status` string, required: Overall status of the API call
  - `message` string, required: Human-readable message about the operation
  - `data` object, required: Media upload data details
    - `mediaId` string, uuid, required: Unique identifier for the uploaded media file

## Other responses

- `400`: Invalid Request
- `413`: Uploaded file exceeds size limit
- `415`: Unsupported media file type
- `4XX`: Generic error message

---

[API](https://skmtc.dev/netcorecloud/apis/whatsapp-api.md) - [All operations](https://skmtc.dev/netcorecloud/apis/whatsapp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/netcorecloud/apis/whatsapp-api/revisions/82cdf689fb7a?raw)
