> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryhamsa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

> Receive real-time call events and conversation data from your AI agents

## What are Webhooks?

Webhooks allow your applications to receive real-time notifications about call events, transcriptions, and conversation outcomes. Configure a webhook endpoint to get instant updates when calls start, end, or when your agent completes specific actions, enabling seamless integration with your existing systems.

<Info>
  **Key Features:**

  * **Real-time Events** - Instant notifications as calls progress
  * **Call Transcriptions** - Full conversation text sent to your endpoint
  * **Outcome Data** - Structured data extracted from conversations
  * **Secure Authentication** - Bearer token support for secure webhooks
  * **HTTPS Only** - All webhooks use encrypted connections
</Info>

## How It Works

Webhook integration follows a simple flow:

1. **Configure** - Add webhook URL to your agent settings
2. **Authentication** - Set up Bearer token (optional but recommended)
3. **Call Event** - User calls your agent or agent makes outbound call
4. **Real-time Push** - Hamsa sends POST requests to your webhook
5. **Process** - Your server receives and processes event data

## Event Types

Your webhook receives various events throughout a call's lifecycle:

**Call Events**

* `call.started` - Call begins
* `call.answered` - Call connected
* `call.ended` - Call completes with full transcript and outcome data

**Conversation Events**

* `transcription.update` - Real-time transcription as user/agent speaks
* `tool.executed` - Agent executes a tool (API call, knowledge base query)

**Data Included**

* Caller information and phone numbers
* Full conversation transcripts
* Call duration and timestamps
* Structured outcome data based on your schema
* Tool execution results

## Common Use Cases

**Call Analytics**

* Track call metrics and build dashboards
* Monitor agent performance and resolution rates
* Analyze conversation patterns and trends

**CRM Integration**

* Automatically update customer records
* Create activity logs for each call
* Sync conversation outcomes to customer profiles

**Notification Systems**

* Alert teams about urgent calls
* Send email summaries of conversations
* Post call summaries to Slack or Teams

**Data Warehousing**

* Stream events to your data warehouse
* Build comprehensive analytics pipelines
* Track long-term trends and insights

## Getting Started

Choose your implementation path based on how you want to work with webhooks:

<CardGroup cols={2}>
  <Card title="Configure in Dashboard" href="/agents/webhooks/introduction" icon="browser">
    Set up webhooks using the web interface. Perfect for configuring webhook URLs, authentication, and testing integrations.
  </Card>

  <Card title="Integrate via API" href="/developers/guides/webhook-integration" icon="code">
    Build webhook handlers programmatically. Ideal for processing events, implementing retry logic, and scaling integrations.
  </Card>
</CardGroup>

## Learn More

<CardGroup cols={2}>
  <Card title="Outcomes" href="/overview/features/outcomes">
    Define what data to extract from calls
  </Card>

  <Card title="Telephony" href="/overview/features/telephony">
    Configure phone numbers with webhooks
  </Card>

  <Card title="Single Prompt Agents" href="/agents/single-prompt/configure-settings">
    Set up webhooks in Single Prompt Agents
  </Card>

  <Card title="Flow Agents" href="/agents/flow-agent/global-settings">
    Configure webhooks in Flow Agents
  </Card>
</CardGroup>
