Documentation
API Reference

Integrations API

Subscribe to real-time events and manage connections.

Subscribe to events#

Receive real-time webhook callbacks on events like agent decisions, ticket handoffs, or errors:

POST/v1/webhooks/subscribe

Request

BASH
curl -X POST \
  -H "Authorization: Bearer tc_live_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourserver.com/callback",
    "events": ["agent.action", "agent.handoff"]
  }' \
  https://api.trained.chat/v1/webhooks/subscribe

Response

JSON
{
  "id": "webhook_sub_412",
  "status": "active",
  "created_at": "2026-06-05T10:15:00Z"
}