Agent/AI-Bot will call this when they are typing a message in live chat message
POST https://services.leadconnectorhq.com/conversations/providers/live-chat/typing
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.
Body
locationId
string
default:"ve9EPM428h8vShlRW1KT"
required
Account Id
isTyping
string
default:"True"
required
Typing status
visitorId
string
default:"ve9EPM428h8vShlRW1KT"
required
visitorId is the Unique ID assigned to each Live chat visitor. visitorId will be added soon in GET Contact API
conversationId
string
default:"ve9EPM428h8vShlRW1KT"
required
Conversation Id
Respuestas
201 - Show typing indicator for live chat
422 - Unprocessable Entity
Ejemplo
curl -X POST 'https://services.leadconnectorhq.com/conversations/providers/live-chat/typing' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "ve9EPM428h8vShlRW1KT",
"isTyping": true,
"visitorId": "ve9EPM428h8vShlRW1KT",
"conversationId": "ve9EPM428h8vShlRW1KT"
}'
const response = await fetch('https://services.leadconnectorhq.com/conversations/providers/live-chat/typing', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "ve9EPM428h8vShlRW1KT", "isTyping": true, "visitorId": "ve9EPM428h8vShlRW1KT", "conversationId": "ve9EPM428h8vShlRW1KT"}),
});
const data = await response.json();
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversations/providers/live-chat/typing',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "ve9EPM428h8vShlRW1KT", "isTyping": true, "visitorId": "ve9EPM428h8vShlRW1KT", "conversationId": "ve9EPM428h8vShlRW1KT"},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/conversations/providers/live-chat/typing');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 've9EPM428h8vShlRW1KT', 'isTyping': true, 'visitorId': 've9EPM428h8vShlRW1KT', 'conversationId': 've9EPM428h8vShlRW1KT'}),
]);
$data = json_decode(curl_exec($ch), true);