Skip to content

Send an image message

Sends a JPEG or PNG image, optionally with a caption. Needs an open 24-hour window.

Provide the image one of two ways:

  • link: a public HTTPS URL WhatsApp can download from.
  • id: a media_id from POST /v1/media/upload. Use this to send the same file many times, or when the file isn’t publicly reachable.
Terminal window
curl -X POST "$HELLO_API_URL/v1/<your-phone-number-id>/messages" \
-H "Authorization: Bearer $HELLO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+919999999999",
"type": "image",
"image": {
"link": "https://example.com/catalog/sneaker-red.jpg",
"caption": "The Runner 2 in red, back in stock."
}
}'
{
"to": "+919999999999",
"type": "image",
"image": { "id": "1099999999991234", "caption": "Your receipt" }
}

202 Accepted (queued), or 200 with ?sync=true once WhatsApp accepts it. See Send a message.

Field Type Required Description
image.link string One of link / id Public HTTPS URL of the image
image.id string One of link / id media_id from /v1/media/upload. Takes precedence if both are set.
image.caption string No Text shown under the image

Supported formats: image/jpeg and image/png, up to 5 MB. See supported media.

Status code Cause
403 OUTSIDE_24H_WINDOW The recipient’s 24-hour window is closed
400 VALIDATION_ERROR image is missing or the wrong shape
422 SEND_FAILED (?sync=true only) WhatsApp rejected the send (unreachable link, unsupported file, invalid media ID)