Skip to main content
flag
Mon - Fri   10:00 – 18:00

Upload Media

API Documentation / WhatsApp / Upload Media

Base URL for your account: https://cpaas.studio

POST /api/whatsapp/v1/media

Upload a file to your media library (multipart form field `file`). Image 5 MB, video / audio 16 MB, document 100 MB, sticker 500 KB; the type is detected from the file itself.

Parameters

Param Type Required Notes
file file yes
type string no Expected type.
channel string no Pre-upload to Meta for this number.

Request example

curl -X POST "https://cpaas.studio/api/whatsapp/v1/media" \
  -H "X-API-KEY: cpk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -F "file=@invoice.pdf"

Success response (data)

{
    "media": {
        "uid": "WMD7Q2M4X8A1B",
        "type": "document",
        "mime": "application/pdf",
        "name": "invoice.pdf",
        "size": 48211,
        "source": "api",
        "created_at": "2026-10-10T09:00:00+00:00"
    }
}

Need more context? See Getting started for authentication, the response envelope, and the full error-code reference.