curl -X POST \
'https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "My Webhook",
"webhook_url": "https://example.com/webhook",
"webhook_secret": "optional_secret_for_hmac",
"events": ["event_phone_call_started", "event_phone_call_ended"],
"timeout": 30,
"max_retries": 3,
"enabled": true
}'
const response = await fetch('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My Webhook',
webhook_url: 'https://example.com/webhook',
webhook_secret: 'optional_secret_for_hmac',
events: ['event_phone_call_started', 'event_phone_call_ended'],
timeout: 30,
max_retries: 3,
enabled: true
})
});
const data = await response.json();
<?php
$client = new \GuzzleHttp\Client();
$response = $client->post('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks', [
'headers' => [
'Authorization' => 'Bearer YOUR_TOKEN',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'My Webhook',
'webhook_url' => 'https://example.com/webhook',
'webhook_secret' => 'optional_secret_for_hmac',
'events' => ['event_phone_call_started', 'event_phone_call_ended'],
'timeout' => 30,
'max_retries' => 3,
'enabled' => true
],
]);
$data = json_decode($response->getBody());
{
"success": true,
"message": "Webhook created successfully",
"data": {
"id": "9fcafbf2-7593-44d6-8cd7-1b221beba62a",
"agent_id": "9fbef0b7-8d4e-4a08-9207-66c22155721d",
"name": "My Webhook",
"webhook_url": "https://example.com/webhook",
"events": ["event_phone_call_started", "event_phone_call_ended"],
"timeout": 30,
"max_retries": 3,
"enabled": true,
"created_at": "2025-09-03T23:19:51.000000Z",
"updated_at": "2025-09-03T23:19:51.000000Z",
"events_count": 2,
"status": "active"
}
}
Agent Webhooks
Create Webhook
Create a new webhook configuration for an agent
POST
/
api
/
v1
/
agents
/
{agent_id}
/
webhooks
curl -X POST \
'https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "My Webhook",
"webhook_url": "https://example.com/webhook",
"webhook_secret": "optional_secret_for_hmac",
"events": ["event_phone_call_started", "event_phone_call_ended"],
"timeout": 30,
"max_retries": 3,
"enabled": true
}'
const response = await fetch('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My Webhook',
webhook_url: 'https://example.com/webhook',
webhook_secret: 'optional_secret_for_hmac',
events: ['event_phone_call_started', 'event_phone_call_ended'],
timeout: 30,
max_retries: 3,
enabled: true
})
});
const data = await response.json();
<?php
$client = new \GuzzleHttp\Client();
$response = $client->post('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks', [
'headers' => [
'Authorization' => 'Bearer YOUR_TOKEN',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'My Webhook',
'webhook_url' => 'https://example.com/webhook',
'webhook_secret' => 'optional_secret_for_hmac',
'events' => ['event_phone_call_started', 'event_phone_call_ended'],
'timeout' => 30,
'max_retries' => 3,
'enabled' => true
],
]);
$data = json_decode($response->getBody());
{
"success": true,
"message": "Webhook created successfully",
"data": {
"id": "9fcafbf2-7593-44d6-8cd7-1b221beba62a",
"agent_id": "9fbef0b7-8d4e-4a08-9207-66c22155721d",
"name": "My Webhook",
"webhook_url": "https://example.com/webhook",
"events": ["event_phone_call_started", "event_phone_call_ended"],
"timeout": 30,
"max_retries": 3,
"enabled": true,
"created_at": "2025-09-03T23:19:51.000000Z",
"updated_at": "2025-09-03T23:19:51.000000Z",
"events_count": 2,
"status": "active"
}
}
Overview
Creates a new webhook configuration for an agent. Webhooks allow you to receive real-time notifications when specific events occur during calls.Endpoint
Request
curl -X POST \
'https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "My Webhook",
"webhook_url": "https://example.com/webhook",
"webhook_secret": "optional_secret_for_hmac",
"events": ["event_phone_call_started", "event_phone_call_ended"],
"timeout": 30,
"max_retries": 3,
"enabled": true
}'
const response = await fetch('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My Webhook',
webhook_url: 'https://example.com/webhook',
webhook_secret: 'optional_secret_for_hmac',
events: ['event_phone_call_started', 'event_phone_call_ended'],
timeout: 30,
max_retries: 3,
enabled: true
})
});
const data = await response.json();
<?php
$client = new \GuzzleHttp\Client();
$response = $client->post('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks', [
'headers' => [
'Authorization' => 'Bearer YOUR_TOKEN',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'My Webhook',
'webhook_url' => 'https://example.com/webhook',
'webhook_secret' => 'optional_secret_for_hmac',
'events' => ['event_phone_call_started', 'event_phone_call_ended'],
'timeout' => 30,
'max_retries' => 3,
'enabled' => true
],
]);
$data = json_decode($response->getBody());
Response
{
"success": true,
"message": "Webhook created successfully",
"data": {
"id": "9fcafbf2-7593-44d6-8cd7-1b221beba62a",
"agent_id": "9fbef0b7-8d4e-4a08-9207-66c22155721d",
"name": "My Webhook",
"webhook_url": "https://example.com/webhook",
"events": ["event_phone_call_started", "event_phone_call_ended"],
"timeout": 30,
"max_retries": 3,
"enabled": true,
"created_at": "2025-09-03T23:19:51.000000Z",
"updated_at": "2025-09-03T23:19:51.000000Z",
"events_count": 2,
"status": "active"
}
}
Error responses
{
"message": "Missing Bearer Token"
}
{
"success": false,
"message": "Agent not found in this environment."
}
{
"message": "The given data was invalid.",
"errors": {
"webhook_url": ["The webhook url field is required."],
"events": ["The events field must contain at least 1 items."]
}
}
Validation rules
- name: Required, string, maximum 255 characters
- webhook_url: Required, valid URL, maximum 500 characters
- webhook_secret: Optional, string, maximum 255 characters
- events: Required, array with minimum 1 event, each event must be from available events list
- timeout: Optional, integer between 5-120 seconds (default: 30)
- max_retries: Optional, integer between 0-10 (default: 3)
- enabled: Optional, boolean (default: true)
Important notes
- Webhook operations automatically clear the agent cache for immediate effect
- Use HTTPS endpoints for webhook URLs in production
- Implement proper signature verification using the webhook secret for security
- Test your webhook endpoint before going live using the test endpoint
Related endpoints
- List Agent Webhooks - Get all webhooks for an agent
- Get Webhook Details - Retrieve specific webhook information
- Update Webhook - Modify webhook configuration
- Delete Webhook - Remove webhook configuration
- Toggle Webhook Status - Enable/disable webhook
- Test Webhook - Send test payload to verify connectivity
Was this page helpful?