curl -X PATCH \
'https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a/toggle' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a/toggle', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
});
const data = await response.json();
<?php
$client = new \GuzzleHttp\Client();
$response = $client->patch('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a/toggle', [
'headers' => [
'Authorization' => 'Bearer YOUR_TOKEN',
],
]);
$data = json_decode($response->getBody());
{
"success": true,
"message": "Webhook enabled",
"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:50:15.000000Z",
"events_count": 2,
"status": "active"
}
}
Agent Webhooks
Toggle Webhook Status
Enable or disable a webhook
PATCH
/
api
/
v1
/
agents
/
{agent_id}
/
webhooks
/
{webhook_id}
/
toggle
curl -X PATCH \
'https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a/toggle' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a/toggle', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
});
const data = await response.json();
<?php
$client = new \GuzzleHttp\Client();
$response = $client->patch('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a/toggle', [
'headers' => [
'Authorization' => 'Bearer YOUR_TOKEN',
],
]);
$data = json_decode($response->getBody());
{
"success": true,
"message": "Webhook enabled",
"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:50:15.000000Z",
"events_count": 2,
"status": "active"
}
}
Overview
Toggles the enabled/disabled status of a webhook. This is useful for temporarily stopping webhook notifications without deleting the configuration.Endpoint
Request
curl -X PATCH \
'https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a/toggle' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a/toggle', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
});
const data = await response.json();
<?php
$client = new \GuzzleHttp\Client();
$response = $client->patch('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a/toggle', [
'headers' => [
'Authorization' => 'Bearer YOUR_TOKEN',
],
]);
$data = json_decode($response->getBody());
Response
{
"success": true,
"message": "Webhook enabled",
"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:50:15.000000Z",
"events_count": 2,
"status": "active"
}
}
{
"success": true,
"message": "Webhook disabled",
"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": false,
"created_at": "2025-09-03T23:19:51.000000Z",
"updated_at": "2025-09-03T23:50:15.000000Z",
"events_count": 2,
"status": "disabled"
}
}
Error responses
{
"message": "Missing Bearer Token"
}
{
"success": false,
"message": "Agent not found in this environment."
}
{
"success": false,
"message": "Webhook not found."
}
Important notes
- This endpoint toggles the current enabled/disabled status of the webhook
- Disabled webhooks will not receive any events until re-enabled
- Webhook operations automatically clear the agent cache for immediate effect
- Use this endpoint for temporary webhook management without losing configuration
Related endpoints
- List Agent Webhooks - Get all webhooks for an agent
- Create Webhook - Set up a new webhook
- Get Webhook Details - Retrieve specific webhook information
- Update Webhook - Modify webhook configuration
- Delete Webhook - Remove webhook configuration
- Test Webhook - Send test payload to verify connectivity
Was this page helpful?