curl --request POST \
--url https://api.getreply.in/v1/messages/contact-card \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"to": "+9198250*****",
"contacts": [
{
"name": {
"formatted_name": "GetReply Support"
},
"phones": [
{
"phone": "+9198250*****",
"type": "WORK"
}
]
}
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
to: '+9198250*****',
contacts: [
{
name: {formatted_name: 'GetReply Support'},
phones: [{phone: '+9198250*****', type: 'WORK'}]
}
]
})
};
fetch('https://api.getreply.in/v1/messages/contact-card', 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://api.getreply.in/v1/messages/contact-card",
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([
'to' => '+9198250*****',
'contacts' => [
[
'name' => [
'formatted_name' => 'GetReply Support'
],
'phones' => [
[
'phone' => '+9198250*****',
'type' => 'WORK'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.getreply.in/v1/messages/contact-card"
payload = {
"to": "+9198250*****",
"contacts": [
{
"name": { "formatted_name": "GetReply Support" },
"phones": [
{
"phone": "+9198250*****",
"type": "WORK"
}
]
}
]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"status": "<string>",
"to": "<string>",
"customer": {
"phone": "<string>",
"user_id": "<string>",
"username": "<string>"
},
"country": "<string>",
"category": "<string>",
"price": "<string>",
"reference": "<string>"
}Send a contact card
Sends one or more contact cards, inside the 24-hour window. Each card is WhatsApp’s contact object; name.formatted_name is needed. Not switched on for every account yet: not_available until it is.
Permission: A Full or Send only key.
curl --request POST \
--url https://api.getreply.in/v1/messages/contact-card \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"to": "+9198250*****",
"contacts": [
{
"name": {
"formatted_name": "GetReply Support"
},
"phones": [
{
"phone": "+9198250*****",
"type": "WORK"
}
]
}
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
to: '+9198250*****',
contacts: [
{
name: {formatted_name: 'GetReply Support'},
phones: [{phone: '+9198250*****', type: 'WORK'}]
}
]
})
};
fetch('https://api.getreply.in/v1/messages/contact-card', 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://api.getreply.in/v1/messages/contact-card",
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([
'to' => '+9198250*****',
'contacts' => [
[
'name' => [
'formatted_name' => 'GetReply Support'
],
'phones' => [
[
'phone' => '+9198250*****',
'type' => 'WORK'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.getreply.in/v1/messages/contact-card"
payload = {
"to": "+9198250*****",
"contacts": [
{
"name": { "formatted_name": "GetReply Support" },
"phones": [
{
"phone": "+9198250*****",
"type": "WORK"
}
]
}
]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"status": "<string>",
"to": "<string>",
"customer": {
"phone": "<string>",
"user_id": "<string>",
"username": "<string>"
},
"country": "<string>",
"category": "<string>",
"price": "<string>",
"reference": "<string>"
}Authorizations
Your API key, e.g. gr_live_…
Headers
Your own unique id for this request (at most 255 characters). The same id and body within 24 hours answers the first answer again — never a second send or charge.
255Body
The person's WhatsApp number with its country code, e.g. +9198250***** — or their WhatsApp username id (e.g. "IN.1626…"; see Customer).
Show child attributes
Show child attributes
Your own reference for this message (at most 512 characters). It comes back on the message and its webhooks.
512The id of a message to quote.
Response
Accepted for sending.
Who the customer is. phone can be null: a customer who uses a WhatsApp username may not share their number. user_id is WhatsApp's business-scoped user ID (for example "IN.13491208655302741918").
Show child attributes
Show child attributes