Messages

Send Message with Link Preview

Send a text message with a custom link preview card.

Home/Docs/Send Message with Link Preview

Endpoint

Send a text message with a custom link preview card.

Request
POST /sendLinkCustomPreview

Authentication

Every request must include a Bearer token in the Authorization header. Missing or invalid API keys return 401 Unauthorized.

Header
Authorization: Bearer YOUR_API_KEY

Request Body

FieldTypeRequiredDescription
sessionstringYesSession ID
tostringYesRecipient phone number
textstringYesMessage text containing the URL
previewLinkPreviewYesCustom link preview object

Response

FieldTypeDescription
idstringUnique message identifier
tostringRecipient phone number or group JID
contentstringMessage content, media reference, or caption
typestringMessage type: text, image, video, document, or ptt
timestampstringISO 8601 timestamp of when the message was sent
statusstringDelivery status such as sent, delivered, or read
fromMebooleanTrue when sent by the current session
senderstringSender phone number
recipientstringRecipient identifier

Examples

cURL
curl -X POST "https://api.example.com/sendLinkCustomPreview" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "id": "msg_128",
  "to": "+1234567890",
  "content": "https://example.com",
  "type": "text",
  "timestamp": "2026-04-15T10:00:00.000Z",
  "status": "sent",
  "fromMe": true,
  "sender": "+1234567890",
  "recipient": "+1234567890"
}

Notes

  • The text field must contain the URL being previewed.
  • preview.title is required; description and thumbnailUrl are optional.