PATCH https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}/followup-settings
Autorización
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
string
default:"2021-07-28"
required
Versión de la API.
Path parameters
string
required
Body
string[]
required
object
required
Show propiedades
Show propiedades
boolean
default:"True"
required
Whether to dynamically switch channels for followups
boolean
default:"True"
Whether to respect working hours for followups
object[]
Working hours configuration for followups
Show cada item
Show cada item
string
Timezone to use for followups, contact or account Posibles valores: ‘contact’, ‘business’
Respuestas
200 - Success
200 - Success
400 - Bad Request
400 - Bad Request
{}
401 - Unauthorized
401 - Unauthorized
{}
422 - Unprocessable Entity
422 - Unprocessable Entity
{}
Ejemplo
curl -X PATCH 'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/followup-settings' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"actionIds": [
"edxcfghbnjkimd"
],
"followupSettings": {
"dynamicChannelSwitching": true,
"followUpHours": true,
"workingHours": [
{
"dayOfTheWeek": 1,
"intervals": []
}
],
"timezoneToUse": "contact"
}
}'
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/followup-settings', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"actionIds": ["edxcfghbnjkimd"], "followupSettings": {"dynamicChannelSwitching": true, "followUpHours": true, "workingHours": [{"dayOfTheWeek": 1, "intervals": []}], "timezoneToUse": "contact"}}),
});
const data = await response.json();
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/followup-settings',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"actionIds": ["edxcfghbnjkimd"], "followupSettings": {"dynamicChannelSwitching": true, "followUpHours": true, "workingHours": [{"dayOfTheWeek": 1, "intervals": []}], "timezoneToUse": "contact"}},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/followup-settings');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'actionIds': ['edxcfghbnjkimd'], 'followupSettings': {'dynamicChannelSwitching': true, 'followUpHours': true, 'workingHours': [{'dayOfTheWeek': 1, 'intervals': []}], 'timezoneToUse': 'contact'}}),
]);
$data = json_decode(curl_exec($ch), true);

