Send an image
POST /v1/messages/image — an image from a public link, with an optional caption.
Notes
urlmust be a publichttp(s)link directly to the image file — not a Google Drive preview page, not a share link that shows a viewer.captionis shown under the image and is capped at 1,024 characters.mime_typeis an optional hint such asimage/png. It is checked for the shapetype/subtypeonly; we do not verify it matches the file. You can normally leave it out.- A link that passes validation but cannot actually be downloaded comes back as
422 media_fetch_failed.
Examples
Authorizations
Your API key, sent in an apikey request header. Never in the URL, never as a Bearer token.
Body
Which of your connected numbers to send FROM. Copy it from your numbers screen in the portal, or from GET /v1/instances. It must belong to your account.
"3f9c1a2b-7d4e-4c81-9f0a-2b6d5e8c1a34"
The recipient, with country code and no leading zero — for example 919876543210. Spaces, dashes, brackets and a leading + are accepted and stripped; 6 to 15 digits must remain.
"919876543210"
A public http(s) link to the file. There is no upload endpoint — we fetch the file from this link, so it must be reachable from the internet and be a direct link to the file itself, not a preview or share page. Private, internal and loopback addresses are refused, as are links containing a username or password.
2048"https://example.com/receipt-2043.png"
Text shown with the file. Up to 1,024 characters.
1024"Your receipt"
Optional content-type hint such as application/pdf. It is checked for the shape type/subtype only — we do not verify it matches the file. Usually you can leave it out.
128"application/pdf"
Send this message as a reply, quoting an earlier one. Use the data.message_id returned by a previous send.
128"3EB0C1D2F4A5B6C7D8E9"
Set true when the quoted message is one you sent from this number. Only valid together with quoted_message_id.

