WhatsApp Cloud API - Media Upload API | Developer Documentation
WhatsApp Cloud API - Media Upload API
Copy for LLM
Version
Upload media files (images, videos, audio, documents, stickers) to WhatsApp.
Returns a media ID that can be used to send media messages.
Supports multiple file formats and multipart form-data uploads.
Base URLAuthentication
Type
Location
Endpoints
POST
/{Version}/{Phone-Number-ID}/media
Request Syntax
curl --request POST \ --url 'https://graph.facebook.com/{Version}/{Phone-Number-ID}/media' \ --header 'Authorization: Bearer <Token>' \ --header 'Content-Type: application/json' \ --data '{ "file": "@/local/path/file.ogg;type=ogg", "messaging_product": "whatsapp" }'
{ "Upload Audio (form-data)": { "value": { "id": "<MEDIA_ID>" } }, "Upload Audio JSON": { "value": { "id": "4490709327384033" } }, "Upload Image JSON": { "value": { "id": "4490709327384033" } }, "Upload Sticker File (form-data)": { "value": { "id": "<MEDIA_ID>" } }, "Upload Sticker File JSON": { "value": { "id": "4490709327384033" } } }
curl --request POST \ --url 'https://graph.facebook.com/{Version}/{Phone-Number-ID}/media' \ --header 'Authorization: Bearer <Token>' \ --header 'Content-Type: application/json' \ --data '{ "file": "@/local/path/file.ogg;type=ogg", "messaging_product": "whatsapp" }'
{ "Upload Audio (form-data)": { "value": { "id": "<MEDIA_ID>" } }, "Upload Audio JSON": { "value": { "id": "4490709327384033" } }, "Upload Image JSON": { "value": { "id": "4490709327384033" } }, "Upload Sticker File (form-data)": { "value": { "id": "<MEDIA_ID>" } }, "Upload Sticker File JSON": { "value": { "id": "4490709327384033" } } }
Authentication
HTTP Bearer |
Header:
AuthorizationUsage Examples
bearerAuth:
Include
Authorization: Bearer your-token-here in request headersGlobal Authentication Requirements
All endpoints require:
bearerAuth