Skip to main content
POST
/
api
/
send
/
link-custom-preview
Send a text message with CUSTOM link preview
curl --request POST \
  --url https://{host}/api/send/link-custom-preview \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "chatId": "5511999999999@c.us",
  "text": "Check this out! https://github.com/",
  "reply_to": null,
  "linkPreviewHighQuality": true,
  "preview": {
    "image": {
      "url": "https://github.com/devlikeapro/waha/raw/core/examples/waha.jpg"
    },
    "url": "https://github.com/",
    "title": "Your Title",
    "description": "Check this out, amazing!"
  },
  "session": "my-session"
}'
{
  "success": true,
  "messageId": "3EB0XXXXXX"
}

Description

This endpoint allows you to send messages with links that include custom previews. You can define the title, description and image that will appear in the link preview, instead of using WhatsApp’s automatic preview.

Body

{
  "sessionId": "my-session",
  "jid": "5511999999999@s.whatsapp.net",
  "text": "Hello, how are you?",
  "preview": {
    "url": "https://example.com",
    "title": "Title",
    "description": "Description",
    "image": "value"
  }
}

Body Parameters

PropertyTypeRequiredDescription
sessionIdstring✅ YesAuthenticated session ID that will send the message
jidstring✅ YesRecipient identifier (WhatsApp JID). Format: 5511999999999@s.whatsapp.net for contacts or 120363XXXXX@g.us for groups
textstring✅ YesMessage text accompanying the link
previewobject✅ YesObject containing the custom preview information
preview.urlstring✅ YesLink URL
preview.titlestring✅ YesTitle that will appear in the preview
preview.descriptionstring✅ YesDescription that will appear in the preview
preview.imagestring❌ NoPreview image encoded in base64
{
  "success": true,
  "messageId": "3EB0XXXXXX"
}

Status Codes

  • 200 - Link with custom preview sent successfully
  • 400 - Invalid parameters
  • 401 - Unauthorized session
  • 404 - Session not found

Usage Example

curl -X POST https://api.wappfy.com.br/api/send/link-custom-preview \
  -H "Content-Type: application/json" \
  -d '{
    "sessionId": "my-session",
    "jid": "5511999999999@s.whatsapp.net",
    "text": "Confira nossa promoção especial!",
    "preview": {
      "url": "https://exemplo.com/promocao",
      "title": "Promoção Especial - 50% OFF",
      "description": "Aproveite descontos incríveis em todos os produtos",
      "image": "iVBORw0KGgoAAAANSUhEUgA..."
    }
  }'

Authorizations

apikey
string
header
required

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

Body

application/json
chatId
string
required
Example:

"5511999999999@c.us"

text
string
default:Check this out! https://github.com/
required

Message text. MUST include the URL provided in preview.url

preview
object
required
session
string
required

Session name (instanceName)

Example:

"my-session"

reply_to
string

Message ID you want to reply to

Example:

null

Response

201 - application/json

The response is of type object.

I