Developers
ENPT

Follow-up settings

Read and change how the avatar follows up with customers who stopped answering.

When a customer stops answering, the avatar can write again after a while to resume the conversation. Follow-up settings control when that happens, how many times, and what the avatar should say at each attempt. They are the same settings you see in Follow Up in the platform.

You can also send follow-ups to your own system instead of WhatsApp: turn on the follow-up webhook and Tolky calls your URL with the message the avatar wrote, so your system delivers it.

Read the settings

ReferenceTechnical details

GET /api/externalAPIs/public/followup/getFollowupConfig

Authentication: host token. No body.

curl "https://api.tolky.to/api/externalAPIs/public/followup/getFollowupConfig" \
  -H "Authorization: Bearer $TOLKY_TOKEN"
{
  "code": 200,
  "message": "OK",
  "data": {
    "followup": true,
    "followup_config": {
      "triggers": {
        "idle": {
          "active": true,
          "minutes": 15,
          "max_notifications": 3,
          "hits": [
            {
              "hit": 0,
              "minutes": 15,
              "generalInstructions": "Resume the conversation with the customer",
              "smartDecisionInstructions": "Never send a repeated message.",
              "dialogueInserts": "",
              "agentCalling": []
            }
          ]
        },
        "schedule": { "active": false, "max_notifications": 3, "hits": [] },
        "conditionalAgents": { "active": false, "preCheck": [], "decisions": [] }
      },
      "webhookData": {
        "active": false,
        "url": null,
        "method": "POST",
        "headers": {},
        "includeReasoningResponse": true,
        "includeMessage": true,
        "includeConversationData": true,
        "timeout": 30000,
        "retries": 1
      }
    }
  }
}
FieldDescription
followuptrue when follow-up is on for the account.
followup_config.triggers.idleFollow-up after the customer goes quiet: active, minutes (wait before each attempt), max_notifications (maximum attempts) and hits (one entry per attempt, with its own minutes and instructions).
followup_config.triggers.scheduleScheduled follow-ups.
followup_config.triggers.conditionalAgentsConditions checked before deciding to follow up.
followup_config.webhookDataFollow-up webhook. See below.
followup_config.smartDecisionModel that decides whether to send each follow-up, when set.

404 means the account has no follow-up settings yet.

Change the settings

Send only what you want to change. Each trigger you send (idle, schedule, conditionalAgents) replaces the current one as a whole; webhook fields are changed one by one.

ReferenceTechnical details

POST /api/externalAPIs/public/followup/updateFollowupConfig

Authentication: host token.

ParameterTypeRequiredDescription
followup_activebooleanNoTurns follow-up on or off.
triggersobjectNoTriggers to replace: idle, schedule, conditionalAgents.
webhookDataobjectNoWebhook fields to change.
smartDecisionobject or nullNo{ "model": "...", "provider": "..." } for the send decision. The model must exist in List models. null goes back to the default.

At least one field is required. Limits checked by the server:

FieldRule
idle.minutes, hits[].minutes1 to 10080 (7 days).
idle.max_notifications1 to 50.
webhookData.urlRequired when the webhook is active. Must be a valid URL.
webhookData.methodGET, POST, PUT, PATCH or DELETE.
webhookData.timeout1000 to 300000 milliseconds.
webhookData.retries0 to 5.
curl -X POST "https://api.tolky.to/api/externalAPIs/public/followup/updateFollowupConfig" \
  -H "Authorization: Bearer $TOLKY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "followup_active": true,
    "webhookData": {
      "active": true,
      "url": "https://example.com/tolky/followup",
      "headers": { "X-Api-Key": "your-secret" }
    }
  }'
{
  "code": 200,
  "message": "OK",
  "data": {
    "message": "Configuração de followup atualizada com sucesso",
    "updated_at": "2026-11-16T14:00:00.000Z",
    "config": { "triggers": { }, "webhookData": { } }
  }
}

config is the full saved configuration, returned when you changed triggers, webhook or send decision. 400 describes the rule that failed; 404 means the account has no settings record.

Reset to defaults

ReferenceTechnical details

POST /api/externalAPIs/public/followup/resetFollowupConfig

Authentication: host token. Restores the default settings: idle follow-up active, 15 minutes, 3 attempts, webhook off.

ParameterTypeRequiredDescription
keep_activebooleanNoDefault false. With true, also turns follow-up on. With false, the on/off state is not changed.
custom_minutesnumberNoWait in minutes for the idle trigger and its attempts, 1 to 10080.
custom_max_notificationsnumberNoMaximum attempts, 1 to 50.
reset_webhookbooleanNoDefault true. With false, keeps the current webhook settings.
curl -X POST "https://api.tolky.to/api/externalAPIs/public/followup/resetFollowupConfig" \
  -H "Authorization: Bearer $TOLKY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "custom_minutes": 30, "reset_webhook": false }'

The response carries message, config (the new settings), followup_active, webhook_reset and updated_at.

The follow-up webhook

With the webhook active, the follow-up message is not sent on WhatsApp. Tolky calls your URL instead, and your system delivers the message.

Webhook callTechnical details

Tolky sends the request with the method, headers and timeout you configured, plus Content-Type: application/json and User-Agent: Tolky-FollowupV1/1.0. Use a secret header to check the call comes from Tolky.

Body fieldDescription
messageThe follow-up text. Sent when includeMessage is true.
conversationConversation data (id, hostId, avatarId, leadId, userName, wppId, platform, mainTopic, sentiment and more). Sent when includeConversationData is true.
reasoningResponseThe full avatar response for this follow-up. Sent when includeReasoningResponse is true.
assistantResponse, tokensControl, tickets, askHumanHelp, jsonArraySame fields as in Send a message.
followupDataThe follow-up record: id, hit (attempt number), trigger, notifyAt, leadId, wppId and more.
conversationId, hostId, leadId, sessionId, userIdIDs.
followupTriggeridle or the trigger that fired.
timestampWhen the call was made.

Any 2xx or 3xx answer counts as delivered. Other answers and timeouts are retried with a growing wait (1, 2, 4 seconds, up to 10 seconds). The number of retries is retries, with a minimum of 1.

Previous

Inspect conversation context

Next

Leads