Sending
Send a contact card
POST
/v1/messagesShare someone's details as a tappable card. This is an official WhatsApp feature and shows the same on every phone.
Request
POST https://api.api-supp.com/v1/messages with type: "contact"
| Field | Type | Notes |
|---|---|---|
recipient | string | Required |
type | string | "contact" |
contact | object | One card: {name, phone, waid?, organization?, email?} |
contacts | array | Several cards, each the same shape (sent as a contact list) |
json
{
"recipient": "14155550132",
"type": "contact",
"contact": { "name": "Dana Levi", "phone": "+1 415 555 0187", "organization": "Northwind" }
}- Each card needs at least
nameandphone. - Tapping Message on the card opens a chat only if the number is on WhatsApp. If the phone you display isn't the WhatsApp number, pass that number's digits as
waid. - You can also pass a complete vCard:
{ "vcard": "BEGIN:VCARD\nVERSION:3.0\nFN:...\nEND:VCARD", "name": "..." }. It is sent as is.
Response
json
{
"ok": true,
"recipient": "14155550132@s.whatsapp.net",
"wa_message_id": "3EB0CB97F37F91F563B060",
"contact": {
"display_name": "Dana Levi",
"contacts": [{ "name": "Dana Levi", "phone": "+1 415 555 0187" }]
}
}