Conversation inactivity automation
Configure a channel to send one contextual follow-up after a visitor stops replying, close the session after a longer idle period, or use either action alone. The Agent uses the channel's knowledge workspace for these messages. The channel Agent must be enabled and have a workspace/model configured.
Both times are total minutes since the latest visitor message. Each eligible inbound visitor message starts a new idle period. For example, follow-up at 1 and closure at 2 mean the closure is due two minutes after that visitor message, not two minutes after the follow-up. When both actions are enabled, the closure value must be at least one minute greater than the follow-up value. Delivery can occur shortly after a deadline while the background check and message generation run. An expired or already closed session receives no inactivity message.
Use the application API key to update a channel owned by that application. The workspace must belong to the same application. Selecting a workspace alone does not enable a feature or incur a charge.
curl -X PUT 'https://app.chatt2.me/v1/agent/channels/APPLICATION_CHANNEL_UUID/ai' \
-H 'x-api-key: YOUR_APPLICATION_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"enabled": true,
"workspaceId": "5b633cc4-a43f-4b58-9502-941335bc8661",
"inactivity": {
"followUpEnabled": true,
"followUpAfterMinutes": 1,
"closeEnabled": true,
"closeAfterMinutes": 2
}
}'
enabled: true is required for both Agent replies and inactivity automation. The inactivity.followUpEnabled and inactivity.closeEnabled switches are independent of each other, so either action can run alone. Setting enabled: false disables both inactivity actions even if their switches remain true. Obtain workspaceId by listing workspaces. Send GET to the same URL to read the saved settings and inactivityMaxMinutes. The maximum is 1435 minutes for WhatsApp, Instagram, Messenger, SMS, and Web Chatt2me; Telegram allows 43195 minutes. An API key cannot configure a channel or workspace from another application.
The Agent generates each message from the conversation context. A follow-up is sent at most once per idle period. A new inbound visitor message other than a reaction or read receipt resets the times and permits a later follow-up. Outbound messages, reactions and read receipts do not reset the period. Only active sessions are eligible; awaiting_human, transferred, closed and expired sessions are excluded. Enabling inactivity or toggling the channel Agent while inactivity is enabled clears the previous timer; the next eligible inbound message starts the clock. Web Chatt2me follow-ups wait for a connected visitor; if the visitor remains offline at the closure deadline, the session can close without a delivered notice.
Delivery to your webhook requires an active, verified endpoint, the applicable channel subscription, and a transfer policy that permits the event. An allowed outbound message event has payload.message.is_bot: true. With transferMode: "summary_on_transfer", messages and their statuses from a session still handled by the Agent are suppressed, including inactivity follow-ups. Only messages created at or after transfer in a transferred session pass that filter; the Agent transfer notice and its statuses remain suppressed. Closure emits the distinct end_chat event with payload.message.reason: "inactivity", subject to its subscription and endpoint delivery policy. Operational closure events bypass the Agent message filter; subscribing to message alone does not enable end_chat. The Agent's AI service charge is applied once per session when needed, alongside applicable channel charges. See the API reference and webhook events.