WhatsApp API

Send Photos, PDFs, Videos and Voice Notes with the WhatsApp API

03 Oct 2026 · 14 views

WhatsApp API guide · Part 4 of 12. New here? Start with Part 1: Get your API key.

A photo of your new offer. A PDF bill. A short video on how to use your product. With the E-Public Touch API you can send all of these from your software, just like a text message.

A photo with text under it on the customer's phone
A photo with your text under it.
A PDF price list on the customer's phone
A PDF with a file name and your text under it.

Two ways to send a file

  1. By upload (easiest in the tester): the file is on your computer or phone. You upload it to us, and we give you a link to use.
  2. By link: your file is already online, for example on your website. You give us the link and WhatsApp downloads the file from it.

Send a photo

  1. Open the API Tester. Your key should show in step 1, Your API key.
  2. In the left menu, under Send a message, click Photo.
  3. In Send to (WhatsApp number), type the customer's number.
  4. In Photo, click Upload photo and pick the photo. A green line says Uploaded: … The link is filled in for you. (Already have a link? Paste it in the box next to the button instead.)
  5. Type Text under the photo if you like. Leave it empty to send only the photo.
  6. Check the phone on the right: How it looks on the phone shows your photo (as a box with its file name) and your text under it.
  7. Click the gold Send now button under the phone.
The Photo page of the API Tester: Send to, the Upload photo button with the link filled in and the text under the photo on the left, and the phone preview with Send now on the right
The Photo page after an upload: the link box was filled in for you, and the phone shows the photo with your text.

The link looks like this:

https://epublictouch.com/app/api/send/whatsapp?secret=YOUR_API_KEY
&recipient=919876543210&type=image
&media_url=https://yoursite.com/diwali-offer.jpg
&message=Diwali offer is live! 30% off on LED TVs

Send a PDF or other document

Click PDF / Document in the left menu of the tester. It works like the Photo page: in File, click Upload file or paste a link. Then fill File name the customer sees (optional) and Text under the file (optional). In a link, use type=document:

...&type=document
&document_url=https://yoursite.com/files/price-list.pdf
&document_name=Price-List-Oct-2026.pdf
&message=Here is our latest price list.

document_name is the file name your customer sees. If you leave it out, we use the name from the link.

Video and voice notes

  • In the tester, Video and Audio are under More message types in the left menu. They have Upload video and Upload audio buttons.
  • Video: type=video&media_url=https://yoursite.com/how-to-install.mp4 with an optional text in message (in the tester: Text under the video).
  • Audio / voice note: type=audio&media_url=https://yoursite.com/warranty.mp3. WhatsApp does not show any text with audio.
  • Not sure of the type? Use type=media. We read the file ending (.jpg, .mp4, .pdf…) and choose for you. In the tester this is More message types → Any media: leave Kind of file on Find out for me, and change it only if we guess wrong.
A video message on the customer's phone
A short video with your text under it.
An audio message on the customer's phone
An audio file plays like a voice note.

Allowed files and sizes

KindFile typesMax size
PhotoJPG, PNG5 MB
VideoMP4, 3GP16 MB
AudioMP3, OGG, M4A, AAC, AMR16 MB
DocumentPDF, Word, Excel, PowerPoint, TXT, CSV16 MB

The text under a photo, video or file (message) can be up to 1,024 characters.

The link must open the file directly

WhatsApp downloads the file from your link. So the link must open the file itself, without a login page. Google Drive and Dropbox "share" links open a web page, not the file, so they usually fail. Use the upload method below instead.

A quick check: paste the link in a private browser window. If the photo or PDF opens straight away, it will work.

No link? Upload the file in the API Tester

Every photo, video and PDF box in the API Tester starts with an upload button (Upload photo, Upload video, Upload file), and the link box comes after it. Pick the file from your computer or phone. It is saved on E-Public Touch and the link box is filled in for you. Then click Send now, or open Link & code for your software under it and click Copy link.

There is also an Upload a file page in the left menu (under Files). It works in two clicks:

  1. In the middle, click Choose a file and pick your file. A line says Chosen: … Now press Upload now. Nothing is uploaded yet.
  2. In the dark panel on the right (on a phone, below), press the gold Upload now.
The Upload a file page with a PDF chosen: Choose a file in the middle with the line Chosen, now press Upload now, and the gold Upload now button in the dark panel
A file is chosen. Now press the gold Upload now to upload it.

You then get Your file's link with a Copy link button, so you can use the file anywhere (Part 11 shows it).

Upload a file (for developers)

If the file is on your computer or server, upload it to upload/media with your key. We check the file, save it and give you a link:

curl -X POST https://epublictouch.com/app/api/upload/media \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@price-list.pdf"

The answer has data.url. Use that link as document_url or media_url. You can also send in one step by attaching the file to the send request as media_file or document_file (a POST form upload).

  • We check the real file type, not just its name. A wrong type gets the error FILE_TYPE, a big file gets FILE_TOO_BIG.
  • Each business can upload up to 300 files (500 MB in total) a day through the API.

Remember the 24-hour rule

Photos, PDFs and videos are normal messages. They work only within 24 hours of the customer's last message. To send a file to a new customer, use a template with a photo, video or document header (see Part 3, header_image and header_document).

What next?

Want your customer to reply with one tap? Part 5 covers reply buttons, list menus, website buttons and the Poster with buttons page (a photo with buttons under it).

Next: Part 5 — Buttons, list menus and posters

Want this working for your business? Our team sets up the complete WhatsApp Cloud API panel for you — approval, templates, chatbot, everything.
Book Free Demo Try Free Message Checker