Edit a contact
curl --request PATCH \
--url https://api.getreply.in/v1/contacts/{phone} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"fields": {}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', fields: {}})
};
fetch('https://api.getreply.in/v1/contacts/{phone}', 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/contacts/{phone}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'fields' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/contacts/{phone}"
payload = {
"name": "<string>",
"fields": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"phone": "<string>",
"country": "<string>",
"name": "<string>",
"whatsapp_name": "<string>",
"email": "<string>",
"company": "<string>",
"city": "<string>",
"fields": {},
"tags": [
"<string>"
],
"source": "<string>",
"opted_in": true,
"stopped_marketing": true,
"last_message_at": "<string>",
"created_at": "<string>"
}Contacts
Edit a contact
Changes the name or your own fields.
Permission: A Full or Send only key.
PATCH
/
v1
/
contacts
/
{phone}
Edit a contact
curl --request PATCH \
--url https://api.getreply.in/v1/contacts/{phone} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"fields": {}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', fields: {}})
};
fetch('https://api.getreply.in/v1/contacts/{phone}', 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/contacts/{phone}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'fields' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/contacts/{phone}"
payload = {
"name": "<string>",
"fields": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"phone": "<string>",
"country": "<string>",
"name": "<string>",
"whatsapp_name": "<string>",
"email": "<string>",
"company": "<string>",
"city": "<string>",
"fields": {},
"tags": [
"<string>"
],
"source": "<string>",
"opted_in": true,
"stopped_marketing": true,
"last_message_at": "<string>",
"created_at": "<string>"
}Authorizations
Your API key, e.g. gr_live_…
Path Parameters
The number with its country code, e.g. +9198250*****, or the WhatsApp username id.
Response
The contact.
null for a contact who uses a WhatsApp username and shared no number.