cURL
curl --request POST \
--url https://{host}/api/sendContactVcard \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"chatId": "5511999999999@c.us",
"contacts": [
{
"vcard": "BEGIN:VCARD\nVERSION:3.0\nFN:Jane Doe\nORG:Company Name;\nTEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111\nEND:VCARD"
}
],
"session": "my-session",
"reply_to": null
}
'import requests
url = "https://{host}/api/sendContactVcard"
payload = {
"chatId": "5511999999999@c.us",
"contacts": [{ "vcard": "BEGIN:VCARD
VERSION:3.0
FN:Jane Doe
ORG:Company Name;
TEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111
END:VCARD" }],
"session": "my-session",
"reply_to": None
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chatId: '5511999999999@c.us',
contacts: [
{
vcard: 'BEGIN:VCARD\nVERSION:3.0\nFN:Jane Doe\nORG:Company Name;\nTEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111\nEND:VCARD'
}
],
session: 'my-session',
reply_to: null
})
};
fetch('https://{host}/api/sendContactVcard', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/sendContactVcard",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'chatId' => '5511999999999@c.us',
'contacts' => [
[
'vcard' => 'BEGIN:VCARD
VERSION:3.0
FN:Jane Doe
ORG:Company Name;
TEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111
END:VCARD'
]
],
'session' => 'my-session',
'reply_to' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/sendContactVcard"
payload := strings.NewReader("{\n \"chatId\": \"5511999999999@c.us\",\n \"contacts\": [\n {\n \"vcard\": \"BEGIN:VCARD\\nVERSION:3.0\\nFN:Jane Doe\\nORG:Company Name;\\nTEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111\\nEND:VCARD\"\n }\n ],\n \"session\": \"my-session\",\n \"reply_to\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/api/sendContactVcard")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chatId\": \"5511999999999@c.us\",\n \"contacts\": [\n {\n \"vcard\": \"BEGIN:VCARD\\nVERSION:3.0\\nFN:Jane Doe\\nORG:Company Name;\\nTEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111\\nEND:VCARD\"\n }\n ],\n \"session\": \"my-session\",\n \"reply_to\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/sendContactVcard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chatId\": \"5511999999999@c.us\",\n \"contacts\": [\n {\n \"vcard\": \"BEGIN:VCARD\\nVERSION:3.0\\nFN:Jane Doe\\nORG:Company Name;\\nTEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111\\nEND:VCARD\"\n }\n ],\n \"session\": \"my-session\",\n \"reply_to\": null\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"messageId": "3EB0XXXXXX"
}
Mensagens
Enviar Contato (vCard)
Enviar um ou múltiplos contatos no formato vCard
POST
/
api
/
sendContactVcard
cURL
curl --request POST \
--url https://{host}/api/sendContactVcard \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"chatId": "5511999999999@c.us",
"contacts": [
{
"vcard": "BEGIN:VCARD\nVERSION:3.0\nFN:Jane Doe\nORG:Company Name;\nTEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111\nEND:VCARD"
}
],
"session": "my-session",
"reply_to": null
}
'import requests
url = "https://{host}/api/sendContactVcard"
payload = {
"chatId": "5511999999999@c.us",
"contacts": [{ "vcard": "BEGIN:VCARD
VERSION:3.0
FN:Jane Doe
ORG:Company Name;
TEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111
END:VCARD" }],
"session": "my-session",
"reply_to": None
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chatId: '5511999999999@c.us',
contacts: [
{
vcard: 'BEGIN:VCARD\nVERSION:3.0\nFN:Jane Doe\nORG:Company Name;\nTEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111\nEND:VCARD'
}
],
session: 'my-session',
reply_to: null
})
};
fetch('https://{host}/api/sendContactVcard', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/sendContactVcard",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'chatId' => '5511999999999@c.us',
'contacts' => [
[
'vcard' => 'BEGIN:VCARD
VERSION:3.0
FN:Jane Doe
ORG:Company Name;
TEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111
END:VCARD'
]
],
'session' => 'my-session',
'reply_to' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/sendContactVcard"
payload := strings.NewReader("{\n \"chatId\": \"5511999999999@c.us\",\n \"contacts\": [\n {\n \"vcard\": \"BEGIN:VCARD\\nVERSION:3.0\\nFN:Jane Doe\\nORG:Company Name;\\nTEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111\\nEND:VCARD\"\n }\n ],\n \"session\": \"my-session\",\n \"reply_to\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/api/sendContactVcard")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chatId\": \"5511999999999@c.us\",\n \"contacts\": [\n {\n \"vcard\": \"BEGIN:VCARD\\nVERSION:3.0\\nFN:Jane Doe\\nORG:Company Name;\\nTEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111\\nEND:VCARD\"\n }\n ],\n \"session\": \"my-session\",\n \"reply_to\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/sendContactVcard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chatId\": \"5511999999999@c.us\",\n \"contacts\": [\n {\n \"vcard\": \"BEGIN:VCARD\\nVERSION:3.0\\nFN:Jane Doe\\nORG:Company Name;\\nTEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111\\nEND:VCARD\"\n }\n ],\n \"session\": \"my-session\",\n \"reply_to\": null\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"messageId": "3EB0XXXXXX"
}
Descrição
Este endpoint permite enviar um ou mais contatos no formato vCard para contatos individuais ou grupos no WhatsApp. Os contatos são enviados com nome de exibição e informações no padrão vCard.Body
{
"sessionId": "my-session",
"jid": "5511999999999@s.whatsapp.net",
"contacts": [
{
"displayName": "João Silva",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nFN:João Silva\nTEL;type=CELL;type=VOICE;waid=5511988887777:+55 11 98888-7777\nEND:VCARD"
}
]
}
Parâmetros do Body
| Propriedade | Tipo | Obrigatório | Descrição |
|---|---|---|---|
sessionId | string | ✅ Sim | ID da sessão autenticada que enviará os contatos |
jid | string | ✅ Sim | Identificador do destinatário (JID do WhatsApp). Formato: 5511999999999@s.whatsapp.net para contatos ou 120363XXXXX@g.us para grupos |
contacts | array | ✅ Sim | Array de objetos de contato |
contacts[].displayName | string | ✅ Sim | Nome de exibição do contato |
contacts[].vcard | string | ✅ Sim | Dados do contato no formato vCard (versão 3.0) |
{
"success": true,
"messageId": "3EB0XXXXXX"
}
Códigos de Status
200- Contato(s) enviado(s) com sucesso400- Parâmetros inválidos401- Sessão não autorizada404- Sessão não encontrada
Exemplo de Uso
curl -X POST https://api.wappfy.com.br/api/sendContactVcard \
-H "Content-Type: application/json" \
-d '{
"sessionId": "my-session",
"jid": "5511999999999@s.whatsapp.net",
"contacts": [
{
"displayName": "João Silva",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nFN:João Silva\nTEL;type=CELL;type=VOICE;waid=5511988887777:+55 11 98888-7777\nEND:VCARD"
}
]
}'
const response = await fetch('https://api.wappfy.com.br/api/sendContactVcard', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
sessionId: 'my-session',
jid: '5511999999999@s.whatsapp.net',
contacts: [
{
displayName: 'João Silva',
vcard: 'BEGIN:VCARD\nVERSION:3.0\nFN:João Silva\nTEL;type=CELL;type=VOICE;waid=5511988887777:+55 11 98888-7777\nEND:VCARD'
},
{
displayName: 'Maria Santos',
vcard: 'BEGIN:VCARD\nVERSION:3.0\nFN:Maria Santos\nTEL;type=CELL;type=VOICE;waid=5511977776666:+55 11 97777-6666\nEND:VCARD'
}
]
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://api.wappfy.com.br/api/sendContactVcard',
json={
'sessionId': 'my-session',
'jid': '5511999999999@s.whatsapp.net',
'contacts': [
{
'displayName': 'João Silva',
'vcard': 'BEGIN:VCARD\nVERSION:3.0\nFN:João Silva\nTEL;type=CELL;type=VOICE;waid=5511988887777:+55 11 98888-7777\nEND:VCARD'
},
{
'displayName': 'Maria Santos',
'vcard': 'BEGIN:VCARD\nVERSION:3.0\nFN:Maria Santos\nTEL;type=CELL;type=VOICE;waid=5511977776666:+55 11 97777-6666\nEND:VCARD'
}
]
}
)
data = response.json()
print(data)
Authorizations
Sua chave de API do Wappfy (obtenha em dash.wappfy.com.br)
Body
application/json
Identificador do chat (JID do WhatsApp)
Example:
"5511999999999@c.us"
Array de contatos no formato vCard
- Option 1
- Option 2
Show child attributes
Show child attributes
Nome da sessão (instanceName)
Example:
"my-session"
ID da mensagem à qual você deseja responder
Example:
null
Response
201 - undefined
⌘I
