WhatsApp Cloud API - Media Upload API
Copy for LLM View as Markdown Version v23.0 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 URL
| https://graph.facebook.com |Endpoints
| POST | ///media |POST ///media
This request uploads an image as .jpeg. The parameters are specified as form-data in the request body.Request Syntax
POST///media Select language cURLJavaScriptPythonUser-Agentstring The user agent string identifying the client software making the request. Authorizationstring·required Bearer token for API authentication. This should be a valid access token obtained through the appropriate OAuth flow or system user token. Path Parameters
Versionstring·required Phone-Number-IDstring·required Request BodyOptional
Content Type: application/json Schema: object Show child attributes
filestring
messaging_productstring Content Type: multipart/form-data Schema: object Show child attributes
filestring (binary)
messaging_productstring Responses
This request uploads an image as .jpeg. The parameters are specified as form-data in the request body. 200 Upload Image JSON / Upload Sticker File (form-data) / Upload Sticker File JSON / Upload Audio (form-data) / Upload Audio JSON Content Type: application/json Schema: object Show child attributes
idstring Select language cURLJavaScriptPython

