Skip to content
PaalChat Docs

Upload media

.md
POST
https://whatsapp.paaltech.org/api/v1/businesses/{external_id}/media

Token ability: messages.send ยท Authentication

Uploads a file to send, as multipart/form-data with a file field (and an optional filename, shown for documents). The type is detected from the file itself: JPEG/PNG images (5 MB), MP4/3GP videos (16 MB), AAC/AMR/MP3/M4A/OGG audio (16 MB), and PDF, Word, Excel, PowerPoint or text documents (100 MB). Then send a message of that type with media.id. A file can be sent many times. Needs media enabled for the business. Example: curl -F file=@receipt.pdf -H "Authorization: Bearer $TOKEN" .../businesses/presec/media.

Path parameters

external_id string required

Your own ID for the business (Multi-SKUUL - the tenant ID).

Max 191 characters. Pattern ^[A-Za-z0-9._:-]+$.

Responses

201

Stored, ready to send.

401

unauthenticated - missing, invalid, revoked or expired token

403

missing_ability, or feature_disabled (media is not enabled for the business).

404

not_found - not yours, or does not exist

422

validation_failed, unsupported_media (WhatsApp cannot send this kind of file) or media_too_large.

429

rate_limited - over 300 requests/minute for this product

Errors always look like {"error": {"code", "message"}} - see Errors and status codes.