Send Link Preview

Send a message with a custom rich link preview card.

POST
https://api.wawp.net/v2/send/link-preview?access_token=123456789&chatId=201234567890&description=The+ultimate+platform+for+WhatsApp+automation.&instance_id=123456789&linkPreviewHighQuality=true&reply_to=null&text=Check+out+our+new+website%21&thumbnail=https%3A%2F%2Fwawp.net%2Fsamples%2Fcat.jpg&title=Wawp+-+Advanced+WhatsApp+API&url=https%3A%2F%2Fwawp.net

Authentication Required

Login to swap the placeholders with your real Instance ID and Access Token.

Log In
Test /v2/send/link-preview endpoint
POSTGET

No query parameters required

This endpoint doesn't expect data in the URL.

Click-Through Authority: Mastering the Rich Link Preview Engine

In a vertical feed of text and media, a "Rich Link Preview" (/v2/send/link-preview) is the most effective way to drive traffic from a WhatsApp chat to an external web property. While standard apps generate previews only when a human slow-types a URL, Wawp allows you to programmatically force a high-fidelity preview card. This is essential for professional broadcasts, product links, and personalized landing pages where you want total control over the visual branding and the narrative.


🏗️ The Link-Card Synthetic Engine

Wawp’s link engine doesn't just "scrape" the destination; it actively constructs a synthetic OpenGraph card:

  1. Metadata Override: Unlike standard link sharing, Wawp allows you to override the title, description, and thumbnail even if the destination website has no metadata or blocked crawlers. This ensures your link always looks professional.
  2. Binary Fetching: The engine retrieves your custom thumbnail and optimizes it for the WhatsApp mobile app. It supports JPEG and PNG, ensuring the thumbnail loads instantly even on poor connections.
  3. The High-Quality Mesh: Setting linkPreviewHighQuality: true triggers a specialized rendering mode. If the recipient's phone supports it, WhatsApp will render a much larger image card (similar to a native image message) instead of the small square icon. This drastically increases the "Visual Real-Estate" your message occupies in the user's thread.

🛡️ Strategic Best Practices for Click-Through Rates (CTR)

1. The "Call-to-Action" Title

Your title should be a directive, not just a label.

  • Example: Instead of "Our Blog," use "🔥 Read Now: 5 Ways to Scale your API."
  • UX Impact: High-action titles combined with a high-quality preview card can increase CTR by up to 400% compared to a raw URL string.

2. Thumbnail Composition

The thumbnail is the visual anchor of the card.

  • Ratio: Use 1:1 (Square) images for standard previews or 1.91:1 (Wide) images if you are using the linkPreviewHighQuality flag.
  • Clarity: Avoid putting small text in the thumbnail. Because thumbnails are compressed and rendered small on mobile screens, use bold icons or clear photography that represents the link's destination.

3. URL Transparency and Hygiene

  • Text Inclusion: The text field allows you to provide a preceding message (e.g., "Check this out:"). We recommend including the URL again at the end of the text field as a fallback for the rare cases where a user's phone has preview rendering disabled.
  • Tracking: Use UTM parameters in your url (e.g., ?utm_source=whatsapp&utm_medium=wawp). This allows you to measure the exact effectiveness of your API campaigns in your analytics dashboard.

🧩 Advanced Use Cases

Dynamic Checkout Previews

When a user adds an item to their cart, send them a link preview of the checkout page. Use a custom thumbnail that shows the exact product they are buying. This creates a deeply personalized and trustworthy path to purchase directly within the chat.

Content Gating and Personalized Reports

If you provide personalized PDF reports or secure dashboard links, use the /v2/send/link-preview to create a "Dashboard Card." Use the description to show a snippet of the user's data (e.g., "Your Q1 Savings: $1,250"), encouraging them to click through to the full site for the detailed breakdown.


🛠️ Common Pitfalls and Solutions

  • Blocked Crawlers: If you rely on auto-previews (not providing a custom thumbnail), the WhatsApp network may fail to scrape sites behind Cloudflare or login screens. Always provide your own Custom Thumbnail URL to ensure 100% reliability.
  • Image Type Errors: Using a thumbnail URL that points to a WebP or SVG file will often result in a generic "Link" icon with no image. Stick to standard JPEG for the highest compatibility.
  • Protocol Requirements: The url and thumbnail must both use the HTTPS protocol. Unsecured HTTP links will frequently be rejected or show security warnings to the recipient.

Summary of Capabilities:

  • Programmatically force high-fidelity interactive link cards with or without OpenGraph support.
  • Full control over Title, Description, and Thumbnail metadata overrides.
  • "High Quality" mode for large-format visual cards with extreme visibility.
  • Seamless conversion from raw URLs to "App-like" interactive elements.
  • Integrated threading support via the reply_to parameter for contextual sharing.
  • Reliable delivery tracking with integrated message_id generation.

Request Parameters

Configure the parameters required to interact with this endpoint. All query and body arguments are listed below with their details.

Request Body

Sent as a JSON object
string

Your unique WhatsApp Instance ID

Example:
string

Your API Access Token

Example:
string

Target phone number with country code

Example:
string

The URL to preview

Example:
string

Optional text message accompanying the link.

Example:
string

URL for a custom thumbnail image (JPEG/PNG)

Example:
string

Custom title for the preview card

Example:
string

Custom description for the preview card

Example:
boolean

Try to generate a larger, high-quality preview

Example:
string

The ID of a message to reply to

Example:

Request Samples

Use these ready-to-go code snippets to integrate our API into your project quickly and efficiently. Choose your preferred language and library.

1const baseUrl = "https://api.wawp.net";
2const endpoint = "/v2/send/link-preview";
3const params = new URLSearchParams({
4 "instance_id": "123456789",
5 "access_token": "123456789"
6}).toString();
7const body = {
8 "chatId": "201234567890",
9 "url": "https://wawp.net",
10 "text": "Check out our new website!",
11 "thumbnail": "https://wawp.net/samples/cat.jpg",
12 "title": "Wawp - Advanced WhatsApp API",
13 "description": "The ultimate platform for WhatsApp automation.",
14 "linkPreviewHighQuality": "true",
15 "reply_to": "null"
16};
17
18fetch(`${baseUrl}${endpoint}${params ? '?' + params : ''}`, {
19 method: "POST",
20 headers: { "Content-Type": "application/json" },
21 body: JSON.stringify(body)
22})
23 .then(async (response) => {
24 if (response.ok) {
25 const data = await response.json();
26 console.log("Success:", data);
27 return data;
28 }
29
30 // Error Handling
31 if (response.status === 400) {
32 console.error("Error 400: Bad Request - Missing Required Parameter(s)");
33 }
34 if (response.status === 400) {
35 console.error("Error 400: Bad Request - Invalid Number (Egypt)");
36 }
37 if (response.status === 400) {
38 console.error("Error 400: Bad Request - Invalid Number (Saudi Arabia)");
39 }
40 if (response.status === 400) {
41 console.error("Error 400: Bad Request - Invalid Number (Unknown)");
42 }
43 if (response.status === 400) {
44 console.error("Error 400: Bad Request (XML Format)");
45 }
46 if (response.status === 400) {
47 console.error("Error 400: Bad Request (Plain Text)");
48 }
49 if (response.status === 401) {
50 console.error("Error 401: Unauthorized - Invalid or Missing Access Token");
51 }
52 if (response.status === 401) {
53 console.error("Error 401: Unauthorized (XML Format)");
54 }
55 if (response.status === 404) {
56 console.error("Error 404: Not Found - Session Does Not Exist");
57 }
58 if (response.status === 404) {
59 console.error("Error 404: Not Found (XML Format)");
60 }
61 if (response.status === 429) {
62 console.error("Error 429: Too Many Requests - Rate Limit Exceeded");
63 }
64 if (response.status === 500) {
65 console.error("Error 500: Internal Server Error - Unexpected Failure");
66 }
67 if (response.status === 500) {
68 console.error("Error 500: Internal Server Error (HTML)");
69 }
70 if (response.status === 502) {
71 console.error("Error 502: Bad Gateway - Connection Failed to Upstream");
72 }
73 if (response.status === 502) {
74 console.error("Error 502: Bad Gateway (XML Format)");
75 }
76
77 const errorText = await response.text();
78 console.error(`Error ${response.status}: ${errorText}`);
79 })
80 .catch((error) => console.error("Network Error:", error));
Interactive Samples
Ln 80, Col 1javascript

Expected Responses

Explore all possible responses and outcomes from the server. We have documented each status code with data examples to make success and error handling easier.

Message Sent Successfully
Type:
application/json
object *
string *
object *
number *
boolean *
string *
string *
number *
string *
string *
string *
boolean *
number *
boolean *
boolean *
boolean *
boolean *
boolean *
array *
array *
array *
boolean *
array *

Example

{
"_data": {
  "id": {
    "fromMe": true,
    "remote": "000000000000@c.us",
    "id": "MSG_ID_123456",
    "_serialized": "true_000000000000@c.us_MSG_ID_123456"
    },
  "viewed": false,
  "body": "BASE64_IMAGE_DATA",
  "type": "image",
  "t": 1759108866,
  "from": {
    "server": "c.us",
    "user": "111111111111",
    "_serialized": "111111111111@c.us"
    },
  "to": {
    "server": "c.us",
    "user": "000000000000",
    "_serialized": "000000000000@c.us"
    },
  "ack": 0,
  "isNewMsg": true,
  "star": false,
  "kicNotified": false,
  "caption": "Here's your requested image.",
  "deprecatedMms3Url": "https://example.com/media-url",
  "directPath": "/media/direct/path/example",
  "mimetype": "image/jpeg",
  "filehash": "FILE_HASH_PLACEHOLDER",
  "encFilehash": "ENC_FILE_HASH_PLACEHOLDER",
  "size": 192487,
  "mediaKey": "MEDIA_KEY_PLACEHOLDER",
  "mediaKeyTimestamp": 1759108865,
  "streamable": false,
  "mediaHandle": null,
  "isFromTemplate": false,
  "pollInvalidated": false,
  "isSentCagPollCreation": false,
  "latestEditMsgKey": null,
  "latestEditSenderTimestampMs": null,
  "mentionedJidList": {
    },
  "groupMentions": {
    },
  "isEventCanceled": false,
  "eventInvalidated": false,
  "isVcardOverMmsDocument": false,
  "isForwarded": false,
  "isQuestion": false,
  "questionReplyQuotedMessage": null,
  "questionResponsesCount": 0,
  "readQuestionResponsesCount": 0,
  "labels": {
    },
  "hasReaction": false,
  "disappearingModeInitiator": "chat",
  "disappearingModeTrigger": "chat_settings",
  "productHeaderImageRejected": false,
  "lastPlaybackProgress": 0,
  "isDynamicReplyButtonsMsg": false,
  "isCarouselCard": false,
  "parentMsgId": null,
  "callSilenceReason": null,
  "isVideoCall": false,
  "callDuration": null,
  "callCreator": null,
  "callParticipants": null,
  "isCallLink": null,
  "callLinkToken": null,
  "isMdHistoryMsg": false,
  "stickerSentTs": 0,
  "lastUpdateFromServerTs": 0,
  "invokedBotWid": null,
  "bizBotType": null,
  "botResponseTargetId": null,
  "botPluginType": null,
  "botPluginReferenceIndex": null,
  "botPluginSearchProvider": null,
  "botPluginSearchUrl": null,
  "botPluginSearchQuery": null,
  "botPluginMaybeParent": false,
  "botReelPluginThumbnailCdnUrl": null,
  "botMessageDisclaimerText": null,
  "botMsgBodyType": null,
  "requiresDirectConnection": false,
  "bizContentPlaceholderType": null,
  "hostedBizEncStateMismatch": false,
  "senderOrRecipientAccountTypeHosted": false,
  "placeholderCreatedWhenAccountIsHosted": false,
  "galaxyFlowDisabled": false,
  "links": {
    }
  },
"mediaKey": "MEDIA_KEY_PLACEHOLDER",
"id": {
  "fromMe": true,
  "remote": "000000000000@c.us",
  "id": "MSG_ID_123456",
  "_serialized": "true_000000000000@c.us_MSG_ID_123456"
  },
"ack": 0,
"hasMedia": true,
"body": "Here's your requested image.",
"type": "image",
"timestamp": 1759108866,
"from": "111111111111@c.us",
"to": "000000000000@c.us",
"deviceType": "android",
"isForwarded": false,
"forwardingScore": 0,
"isStatus": false,
"isStarred": false,
"fromMe": true,
"hasQuotedMsg": false,
"hasReaction": false,
"vCards": {
  },
"mentionedIds": {
  },
"groupMentions": {
  },
"isGif": false,
"links": {
  }
}
Bad Request - Missing Required Parameter(s)
Unauthorized - Invalid or Missing Access Token
Not Found - Session Does Not Exist
Too Many Requests - Rate Limit Exceeded
Internal Server Error - Unexpected Failure
Bad Gateway - Connection Failed to Upstream
Previous TopicSend Video
Next TopicSend Location

Command Palette

Search for a command to run...