Add or remove tags
curl --request POST \
--url https://api.getreply.in/v1/contacts/{phone}/tags \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"add": [
"VIP"
],
"remove": [
"New"
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({add: ['VIP'], remove: ['New']})
};
fetch('https://api.getreply.in/v1/contacts/{phone}/tags', 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}/tags",
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([
'add' => [
'VIP'
],
'remove' => [
'New'
]
]),
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/contacts/{phone}/tags"
payload = {
"add": ["VIP"],
"remove": ["New"]
}
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>",
"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
Add or remove tags
Adds and removes tags on one contact.
Permission: A Full or Send only key.
POST
/
v1
/
contacts
/
{phone}
/
tags
Add or remove tags
curl --request POST \
--url https://api.getreply.in/v1/contacts/{phone}/tags \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"add": [
"VIP"
],
"remove": [
"New"
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({add: ['VIP'], remove: ['New']})
};
fetch('https://api.getreply.in/v1/contacts/{phone}/tags', 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}/tags",
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([
'add' => [
'VIP'
],
'remove' => [
'New'
]
]),
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/contacts/{phone}/tags"
payload = {
"add": ["VIP"],
"remove": ["New"]
}
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>",
"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_…
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.
Maximum string length:
255Path Parameters
The number with its country code, e.g. +9198250*****.