curl --request POST \
--url https://api.getreply.in/v1/chats/{customer}/{action} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"member_id": "cm8a1b2c3d4e5f60718293a4b"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({member_id: 'cm8a1b2c3d4e5f60718293a4b'})
};
fetch('https://api.getreply.in/v1/chats/{customer}/{action}', 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/chats/{customer}/{action}",
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([
'member_id' => 'cm8a1b2c3d4e5f60718293a4b'
]),
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/chats/{customer}/{action}"
payload = { "member_id": "cm8a1b2c3d4e5f60718293a4b" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"customer": {
"phone": "<string>",
"user_id": "<string>",
"username": "<string>"
},
"status": "open",
"assignee": {
"id": "<string>",
"name": "<string>"
},
"last_message_at": "<string>"
}Assign, close or reopen a chat
action is assign, close or reopen — the app’s Inbox rules. assign needs member_id (an id from GET /v1/team). close marks the chat Done; the customer writing again reopens it, or reopen does.
Permission: A Full key.
curl --request POST \
--url https://api.getreply.in/v1/chats/{customer}/{action} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"member_id": "cm8a1b2c3d4e5f60718293a4b"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({member_id: 'cm8a1b2c3d4e5f60718293a4b'})
};
fetch('https://api.getreply.in/v1/chats/{customer}/{action}', 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/chats/{customer}/{action}",
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([
'member_id' => 'cm8a1b2c3d4e5f60718293a4b'
]),
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/chats/{customer}/{action}"
payload = { "member_id": "cm8a1b2c3d4e5f60718293a4b" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"customer": {
"phone": "<string>",
"user_id": "<string>",
"username": "<string>"
},
"status": "open",
"assignee": {
"id": "<string>",
"name": "<string>"
},
"last_message_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.
255Path Parameters
The number with its country code, e.g. +9198250*****, or the WhatsApp username id.
The action.
Body
Only for assign: the team member's id.
Response
The chat.
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
open, closed Show child attributes
Show child attributes