WhatsApp Media

WhatsApp Media

Upload media for WhatsApp messaging

post
Body
filestring · binaryRequired
Responses
200

Media uploaded successfully

application/json
post
/api/whatsapp/media/resumable-upload

Upload Media to WhatsApp

post

Uploads media to WhatsApp and saves the file using Spatie Media Library. The response contains the media URL from the Spatie library.

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

typestringOptional

The media type (e.g., image, video, etc.)

Example: image
Responses
200

Media uploaded successfully

application/json
post
/api/whatsapp/media/{phoneNumberId}/upload

Download Media from WhatsApp Cloud API

get

Retrieve and download media content from WhatsApp Cloud API using the provided media ID.

Authorizations
Path parameters
mediaIdstringRequired

The ID of the media to download

Responses
200

Successfully downloaded the media file.

application/octet-stream
Responsestring · binary
get
/whatsapp/media/download/{mediaId}

Upload media to WhatsApp Cloud API

post

Uploads media to WhatsApp Cloud API and returns a media ID.

Authorizations
Path parameters
whatsappPhoneNumberintegerRequired

ID of the WhatsApp phone number

Body
filefileOptional

Media file to upload

typestringOptional

Media type (image, video, etc.)

Example: image
Responses
200

Media uploaded successfully

application/json
post
/api/whatsapp/media/{whatsappPhoneNumber}/upload-cloud

Upload media to OSS

post

Uploads media to OSS and returns the media link.

Authorizations
Path parameters
whatsappPhoneNumberintegerRequired

ID of the WhatsApp phone number

Body
filefileOptional

Media file to upload

typestringOptional

Media type (image, video, etc.)

Example: image
Responses
200

Media uploaded successfully

application/json
post
/api/whatsapp/media/{whatsappPhoneNumber}/upload-oss

Last updated