PATCH https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}/followup-settings
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación.
Versión de la API.
Path parameters
Body
Show propiedades
Show propiedades
Whether to dynamically switch channels for followups
Whether to respect working hours for followups
Working hours configuration for followups
Show cada item
Show cada item
Day of the week (0=Sunday, 1=Monday, etc.)
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);

