WhatsApp Media
Authorizations
Path parameters
phoneNumberIdintegerRequired
The ID of the WhatsApp phone number for which the media is being uploaded
Body
filestring · binaryOptional
The file to be uploaded
typestringOptionalExample:
The media type (e.g., image, video, etc.)
imageResponses
200
Media uploaded successfully
application/json
media_idstringOptionalExample:
wamid.HBgMMjAxMTI2MjIwODA2FQIAERgSOTJDREYzMDZBODc1RkY0OTgxAA==media_urlstringOptionalExample:
https://yourdomain.com/uploads/1/whatsapp/1234/sample.jpgmessagestringOptionalExample:
Media uploaded successfully400
Invalid media properties
application/json
401
Failed to get a valid access token
application/json
500
Upload failed
application/json
post
/api/whatsapp/media/{phoneNumberId}/uploadAuthorizations
Path parameters
whatsappPhoneNumberintegerRequired
ID of the WhatsApp phone number
Body
filefileOptional
Media file to upload
typestringOptionalExample:
Media type (image, video, etc.)
imageResponses
200
Media uploaded successfully
application/json
media_idstringOptionalExample:
WhatsApp media ID
1166846181421424messagestringOptionalExample:
Media uploaded successfully401
Unauthorized
application/json
500
Upload failed
application/json
post
/api/whatsapp/media/{whatsappPhoneNumber}/upload-cloudAuthorizations
Path parameters
whatsappPhoneNumberintegerRequired
ID of the WhatsApp phone number
Body
filefileOptional
Media file to upload
typestringOptionalExample:
Media type (image, video, etc.)
imageResponses
200
Media uploaded successfully
application/json
media_urlstringOptionalExample:
OSS media URL
https://oss.yourdomain.com/uploads/whatsapp/12345/image.jpgmessagestringOptionalExample:
Media uploaded successfully500
Upload failed
application/json
post
/api/whatsapp/media/{whatsappPhoneNumber}/upload-ossLast updated