Skip to main content
Update the followup settings for an action
PATCH https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}/followup-settings

Autorización

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.

Path parameters

agentId
string
required

Body

actionIds
string[]
required
followupSettings
object
required

Respuestas

data
object
required
Updated action details
success
boolean
default:"True"
required
Success status of the request
{
  "success": true
}
{}
{}
{}

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);