curl -X POST https://api.livchat.ai/v1/messages/send/contact \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "5511999999999",
"name": "John Doe",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Doe;John;;;\nFN:John Doe\nTEL;type=CELL:+1 555 123 4567\nEND:VCARD"
}'
const vcard = `BEGIN:VCARD
VERSION:3.0
N:Doe;John;;;
FN:John Doe
TEL;type=CELL:+1 555 123 4567
END:VCARD`;
const response = await fetch("https://api.livchat.ai/v1/messages/send/contact", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
phone: "5511999999999",
name: "John Doe",
vcard: vcard,
}),
});
{
"success": true,
"code": 200,
"data": {
"details": "Sent",
"id": "3EB04A45DCA355D01DB68C"
}
}
Messages
Send Contact
Send a contact card to a WhatsApp number
POST
/
v1
/
messages
/
send
/
contact
curl -X POST https://api.livchat.ai/v1/messages/send/contact \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "5511999999999",
"name": "John Doe",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Doe;John;;;\nFN:John Doe\nTEL;type=CELL:+1 555 123 4567\nEND:VCARD"
}'
const vcard = `BEGIN:VCARD
VERSION:3.0
N:Doe;John;;;
FN:John Doe
TEL;type=CELL:+1 555 123 4567
END:VCARD`;
const response = await fetch("https://api.livchat.ai/v1/messages/send/contact", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
phone: "5511999999999",
name: "John Doe",
vcard: vcard,
}),
});
{
"success": true,
"code": 200,
"data": {
"details": "Sent",
"id": "3EB04A45DCA355D01DB68C"
}
}
Send a contact card (vCard) to share contact information.
Request Body
string
required
Recipient phone number in international format
string
required
Display name for the contact
string
required
vCard formatted string with contact details
vCard Format
BEGIN:VCARD
VERSION:3.0
N:Doe;John;;;
FN:John Doe
TEL;type=CELL:+1 555 123 4567
EMAIL:john@example.com
END:VCARD
curl -X POST https://api.livchat.ai/v1/messages/send/contact \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "5511999999999",
"name": "John Doe",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Doe;John;;;\nFN:John Doe\nTEL;type=CELL:+1 555 123 4567\nEND:VCARD"
}'
const vcard = `BEGIN:VCARD
VERSION:3.0
N:Doe;John;;;
FN:John Doe
TEL;type=CELL:+1 555 123 4567
END:VCARD`;
const response = await fetch("https://api.livchat.ai/v1/messages/send/contact", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
phone: "5511999999999",
name: "John Doe",
vcard: vcard,
}),
});
{
"success": true,
"code": 200,
"data": {
"details": "Sent",
"id": "3EB04A45DCA355D01DB68C"
}
}
⌘I