Send Contact Vcard

Send professional contact cards (vCards) to a chat. Supports single or multiple contacts in one bubble.

POST
https://api.wawp.net/v2/send/contact?access_token=YOUR_ACCESS_TOKEN&chatId=201234567890&contacts=%5B%0A++%7B%0A++++%22fullName%22%3A+%22Wawp+Support%22%2C%0A++++%22organization%22%3A+%22Wawp+HQ%22%2C%0A++++%22phoneNumber%22%3A+%22%2B201111111111%22%2C%0A++++%22whatsappId%22%3A+%22201111111111%22%0A++%7D%0A%5D&instance_id=123456789&reply_to=false_111...AAAA

Authentication Required

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

Log In
Test /v2/send/contact endpoint
POST
POST

No query parameters required

This endpoint doesn't expect data in the URL.

Professional Identity: Mastering the Contact Card (vCard) Engine

In a professional ecosystem, sharing contact information shouldn't be about typing out phone numbers. The /v2/send/contact endpoint allows you to share digital business cards (vCards) that are interactive, easy to save, and high-fidelity. By automating the sharing of contact cards, you can streamline the "Agent Handoff" process, provide instant access to emergency helplines, or share specialized technician details with a single API call.

send contact.png


🏗️ The VCard Serialization Pipeline

Sharing a contact via Wawp is more than just sending a name. Our engine manages a sophisticated serialization process to ensure compatibility with both Android and iOS contact managers:

  1. vCard Specification Encoding: Wawp takes your JSON contact array and transcribes it into the standard vCard (VCF) v3.0 format. This format is universally recognized by mobile operating systems, ensuring that when the user clicks "Save," the fields map correctly to their local address book.
  2. Identity Verification: The whatsappId field is critical. Our engine uses this to link the vCard directly to a WhatsApp profile. This allows the recipient to immediately see the contact's profile picture and start a one-click message thread without even saving the number first.
  3. Multi-Contact Batching: Wawp supports sending multiple contacts in a single "Message Bubble." This is handled by concatenating the serialized VCF blocks into a single payload, providing a clean "Team" or "Directory" view for the user.

🛡️ Strategic Best Practices for Digital Identity

1. The "Wholesale Profile" Strategy

A bare-bones contact card looks suspicious to users. To build brand authority:

  • Rich Metadata: Always provide the organization and fullName.

  • Professionalism: If the contact is an agent, include their department (e.g., "Sarah - Senior Consultant").

  • Formatting: Ensure phoneNumber includes the international + prefix. This is distinct from the whatsappId, tips: [ { type: 'info', title: 'Format', content: 'Sends a vCard (VCF) file that can be saved directly to contacts.' }, { type: 'info', title: 'Fields', content: 'Supports multiple phone numbers, emails, and addresses.' } ], recommendations: [ "Include a properly formatted name (N, FN properties) for best compatibility.", "Use this to share support line numbers efficiently." ]

    which is just the numeric digits used for network routing.

2. Streamlining the Agent Handoff

In a bot-to-human transition:

  • Implementation: Instead of the bot saying "Now talking to Mark, his number is 123," have the system automatically trigger a /v2/send/contact call for Mark's vCard.
  • UX Impact: This gives the customer a clear "Professional Point of Contact" bubble that they can refer back to later, increasing the transparency of your support flow.

3. Validation and Filename Integrity

  • Character Limits: Keep the fullName under 40 characters. Longer names can be truncated in the chat preview or result in messy address book entries.
  • Emoji Usage: While emojis are supported in the name field, use them sparingly. Excessive emojis in a vCard name can sometimes interfere with search indexing in a user's local contact app.

🧩 Advanced Use Cases

Corporate Staff Directories

Send a "Support Directory" message containing three distinct contact cards: "Billing Support," "Technical Desk," and "Human Resources." By sending these as a single array, the user receives one clean interactive list rather than three separate messages.

Referral and Loyalty Programs

Automate your referral system. When a user qualifies for a partner offer, send the partner's professional contact card via Wawp. The reply_to parameter can be used to link this contact card to the specific "Reward Earned" text message, making the context immediately clear.


🛠️ Common Pitfalls and Solutions

  • Malformed WhatsApp IDs: If the whatsappId doesn't match a real account, the "Message" button on the vCard will be disabled on the recipient's phone. Always verify your agent IDs before sharing.
  • Header Discrepancies: If you provide a vcard string directly (via the legacy fields), ensure it starts with BEGIN:VCARD and ends with END:VCARD. Wawp will return a Serialization Error if the block is malformed.
  • Phone Number Confusion: Users often forget the + in the phoneNumber field. While Wawp attempts to normalize this, provide it explicitly to ensure the user's phone recognizes it as a clickable dialer link.

Summary of Capabilities:

  • Deliver interactive, native-style WhatsApp contact cards (vCards).
  • Support for batching multiple contacts (Staff/Directory) in a single message.
  • One-click "Save Contact" and "Message" functionality for the end-user.
  • Automated VCF v3.0 serialization for universal iOS/Android compatibility.
  • Seamless integration with threading/replies via the reply_to parameter.
  • High-fidelity identity sharing with full support for Organization and Job Title fields.

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

Unique ID of the WhatsApp session

Example:
string

API access token

Example:
string

Recipient's WhatsApp number

Example:
array

Array of contact objects containing name and phone info.

Example:
string

The ID of the message you are replying 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/contact";
3const params = new URLSearchParams({
4 "instance_id": "123456789",
5 "access_token": "YOUR_ACCESS_TOKEN"
6}).toString();
7const body = {
8 "chatId": "201234567890",
9 "contacts": [
10 {
11 "fullName": "Wawp Support",
12 "organization": "Wawp HQ",
13 "phoneNumber": "+201111111111",
14 "whatsappId": "201111111111"
15 }
16 ],
17 "reply_to": "false_111...AAAA"
18};
19
20fetch(`${baseUrl}${endpoint}${params ? '?' + params : ''}`, {
21 method: "POST",
22 headers: { "Content-Type": "application/json" },
23 body: JSON.stringify(body)
24})
25 .then(async (response) => {
26 if (response.ok) {
27 const data = await response.json();
28 console.log("Success:", data);
29 return data;
30 }
31
32 // Error Handling
33 if (response.status === 400) {
34 console.error("Error 400: Bad Request - Missing Required Parameter(s)");
35 }
36 if (response.status === 400) {
37 console.error("Error 400: Bad Request - Invalid Number (Egypt)");
38 }
39 if (response.status === 400) {
40 console.error("Error 400: Bad Request - Invalid Number (Saudi Arabia)");
41 }
42 if (response.status === 400) {
43 console.error("Error 400: Bad Request - Invalid Number (Unknown)");
44 }
45 if (response.status === 400) {
46 console.error("Error 400: Bad Request (XML Format)");
47 }
48 if (response.status === 400) {
49 console.error("Error 400: Bad Request (Plain Text)");
50 }
51 if (response.status === 401) {
52 console.error("Error 401: Unauthorized - Invalid or Missing Access Token");
53 }
54 if (response.status === 401) {
55 console.error("Error 401: Unauthorized (XML Format)");
56 }
57 if (response.status === 404) {
58 console.error("Error 404: Not Found - Session Does Not Exist");
59 }
60 if (response.status === 404) {
61 console.error("Error 404: Not Found (XML Format)");
62 }
63 if (response.status === 429) {
64 console.error("Error 429: Too Many Requests - Rate Limit Exceeded");
65 }
66 if (response.status === 500) {
67 console.error("Error 500: Internal Server Error - Unexpected Failure");
68 }
69 if (response.status === 500) {
70 console.error("Error 500: Internal Server Error (HTML)");
71 }
72 if (response.status === 502) {
73 console.error("Error 502: Bad Gateway - Connection Failed to Upstream");
74 }
75 if (response.status === 502) {
76 console.error("Error 502: Bad Gateway (XML Format)");
77 }
78
79 const errorText = await response.text();
80 console.error(`Error ${response.status}: ${errorText}`);
81 })
82 .catch((error) => console.error("Network Error:", error));
Interactive Samples
Ln 82, 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 Poll Vote
Next TopicMark message(s) as seen

Command Palette

Search for a command to run...