Skip to main content
POST
/
api
/
sendImage
Send an image
curl --request POST \
  --url https://{host}/api/sendImage \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "session": "session",
  "chatId": "5511999999999@c.us",
  "url": "https://example.com/image.jpg",
  "caption": "Image caption"
}
'
{
  "success": true,
  "messageId": "3EB0XXXXXX"
}

Documentation Index

Fetch the complete documentation index at: https://docs.wappfy.com.br/llms.txt

Use this file to discover all available pages before exploring further.

Description

This endpoint allows you to send images to individual contacts or groups on WhatsApp. The image must be sent in base64 format. Optionally, you can add a caption to the image.

Body

{
  "sessionId": "my-session",
  "jid": "5511999999999@s.whatsapp.net",
  "image": {
    "content": "iVBORw0KGgoAAAANSUhEUgAAAA...",
    "mimetype": "image/png",
    "filename": "my_image.png"
  },
  "caption": "Image caption"
}

Body Parameters

PropertyTypeRequiredDescription
sessionIdstring✅ YesAuthenticated session ID that will send the image
jidstring✅ YesRecipient identifier (WhatsApp JID). Format: 5511999999999@s.whatsapp.net for contacts or 120363XXXXX@g.us for groups
imageobject✅ YesObject containing the image data
image.contentstring✅ YesImage content encoded in base64
image.mimetypestring❌ NoImage MIME type (e.g., image/png, image/jpeg). If not specified, will be detected automatically
image.filenamestring❌ NoImage file name
captionstring❌ NoCaption/text accompanying the image
{
  "success": true,
  "messageId": "3EB0XXXXXX"
}

Status Codes

  • 200 - Image sent successfully
  • 400 - Invalid parameters or image corrupted
  • 401 - Unauthorized session
  • 404 - Session not found
  • 413 - Image too large

Usage Example

curl -X POST https://api.wappfy.com.br/api/sendImage \
  -H "Content-Type: application/json" \
  -d '{
    "sessionId": "my-session",
    "jid": "5511999999999@s.whatsapp.net",
    "image": {
      "content": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
      "mimetype": "image/png",
      "filename": "image.png"
    },
    "caption": "Check out this image!"
  }'

Authorizations

apikey
string
header
required

Your Wappfy API key (get it at dash.wappfy.com.br)

Body

application/json
chatId
string
required

Chat ID (WhatsApp JID)

Example:

"5511999999999@c.us"

file
object
required

Image file (remote URL or base64 data)

session
string
required

Session name (instanceName)

Example:

"my-session"

reply_to
string

Message ID you want to reply to

Example:

null

caption
string

Caption/text that accompanies the image

Response

201 - application/json

The response is of type object.