WhatsApp
Upload media
Upload an image or document, then send it by media_id with sendWhatsappMessage, or use it as a template header with createWhatsappTemplate. A template header file is at most 5 MB.
Set up WhatsApp first. Connect a WhatsApp number in the dashboard or with Connect numbers. Included on every paid plan. See plans.
Uploading is free. Only the send is charged. The media_id works for 24
hours, only for the number and type it was uploaded for.
Images can be JPEG, PNG or WebP up to 5 MB. Documents can be PDF, DOCX, XLSX or plain text up to 16 MB. The type is read from the file's bytes, not its name.
Body
phone_number_idintegerrequiredThe number that will send the file.
typeenumrequiredOne of: imagedocument
filestringrequiredThe file to upload.
Was this page helpful?
