Skip to main content
Subscribe to webhook events at app.sawt.sa/webhooks/subscriptions to receive real-time notifications about your calls.

Overview

Webhooks allow you to receive real-time notifications about call events, enabling you to build responsive applications that react to call status changes, analysis results, and other important events.

Event Types

Call Lifecycle Events

Routing Key: call.initializingDescription: Triggered when a call request is received and initialization begins.
{
  "call_id": "call_123",
  "agent_id": "agent_456",
  "to_number": "966500000000",
  "from_number": "966511111111",
  "call_status": "RECEIVED_REQUEST_TO_AGENT",
  "direction": "INBOUND"
}
Routing Key: call.startedDescription: Emitted once the agent joins the room and the call is active.
{
  "call_id": "call_123",
  "agent_id": "agent_456",
  "to_number": "966500000000",
  "from_number": "966511111111",
  "call_status": "IN_CALL",
  "direction": "OUTBOUND",
  "agent_version": "v2"
}
Routing Key: call.updatedDescription: Published whenever the call status transitions (e.g. ringing, in-call).
{
  "call_id": "call_123",
  "agent_id": "agent_456",
  "to_number": "966500000000",
  "from_number": "966511111111",
  "call_status": "IN_CALL",
  "previous_call_status": "CALLING",
  "direction": "OUTBOUND",
  "agent_version": "v2",
  "call_start_timestamp": "2025-05-01T10:00:00.000Z",
  "call_end_timestamp": null,
  "duration_s": 42,
  "call_cost": 1.15
}
Routing Key: call.endedDescription: Sent after post-call cleanup completes for finished calls.
{
  "call_id": "call_123",
  "agent_id": "agent_456",
  "to_number": "966500000000",
  "from_number": "966511111111",
  "call_status": "FINISHED",
  "previous_call_status": "IN_CALL",
  "direction": "INBOUND",
  "agent_version": "v3",
  "call_start_timestamp": "2025-05-01T10:00:00.000Z",
  "call_end_timestamp": "2025-05-01T10:05:15.000Z",
  "duration_s": 315,
  "call_cost": 8.75,
  "transcript_object": [
    {
      "role": "AGENT",
      "text": "Hello, thanks for calling."
    },
    {
      "role": "CUSTOMER", 
      "text": "Hi, I need help with my order."
    }
  ],
  "previously_transferred_to_human": false
}

Tool Failure Events

Routing Key: tool.knowledge_base.failedDescription: Emitted when the knowledge base search tool encounters an error.
This helps you identify missing information in your knowledge base and improve your agent’s responses.
{
  "call_id": "call_123",
  "agent_id": "agent_456",
  "tool_name": "knowledge_base",
  "error_message": "No articles matched query",
  "error_type": "NO_RESULTS",
  "timestamp": "2025-05-01T10:02:05.000Z"
}
Routing Key: tool.function.failedDescription: Triggered whenever a custom function tool throws an error.
{
  "call_id": "call_123",
  "agent_id": "agent_456",
  "tool_name": "send_sms",
  "error_message": "Internal API timeout",
  "timestamp": "2025-05-01T10:03:44.000Z"
}

Post-Call Events

Routing Key: call.analyzedDescription: Emitted after post-call analysis completes with summary, sentiment, evaluation, and structured data.
This enables post-call automation based on AI analysis results.
{
  "call_id": "call_123",
  "call_summary": "Customer called to inquire about their recent order status. Agent provided tracking information and resolved the issue successfully.",
  "user_sentiment": "POSITIVE",
  "call_evaluation": true,
  "structured_data_result": {
    "testData": "1234"
  }
}

Webhook Configuration

Setting Up Webhooks

  1. Navigate to Subscriptions
    Visit app.sawt.sa/webhooks/subscriptions
  2. Create Endpoint
    Add your webhook URL that will receive the events
  3. Select Events
    Choose which event types you want to subscribe to
  4. Configure Settings
    Set up authentication preferences
  5. Test Delivery
    Use the test functionality to verify your endpoint works