curl -X PUT \
'https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "Updated Webhook Name",
"webhook_url": "https://newexample.com/webhook",
"webhook_secret": "new_secret",
"events": ["event_phone_call_started", "event_conversation_started"],
"timeout": 45,
"max_retries": 5,
"enabled": false
}'
const response = await fetch('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Updated Webhook Name',
webhook_url: 'https://newexample.com/webhook',
webhook_secret: 'new_secret',
events: ['event_phone_call_started', 'event_conversation_started'],
timeout: 45,
max_retries: 5,
enabled: false
})
});
const data = await response.json();
<?php
$client = new \GuzzleHttp\Client();
$response = $client->put('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a', [
'headers' => [
'Authorization' => 'Bearer YOUR_TOKEN',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'Updated Webhook Name',
'webhook_url' => 'https://newexample.com/webhook',
'webhook_secret' => 'new_secret',
'events' => ['event_phone_call_started', 'event_conversation_started'],
'timeout' => 45,
'max_retries' => 5,
'enabled' => false
],
]);
$data = json_decode($response->getBody());
{
"success": true,
"message": "Webhook updated successfully",
"data": {
"id": "9fcafbf2-7593-44d6-8cd7-1b221beba62a",
"agent_id": "9fbef0b7-8d4e-4a08-9207-66c22155721d",
"name": "Updated Webhook Name",
"webhook_url": "https://newexample.com/webhook",
"events": ["event_phone_call_started", "event_conversation_started"],
"timeout": 45,
"max_retries": 5,
"enabled": false,
"created_at": "2025-09-03T23:19:51.000000Z",
"updated_at": "2025-09-03T23:45:30.000000Z",
"events_count": 2,
"status": "disabled"
}
}
Webhooks de Agente
Atualizar Webhook
Atualizar uma configuração de webhook existente
PUT
/
api
/
v1
/
agents
/
{agent_id}
/
webhooks
/
{webhook_id}
curl -X PUT \
'https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "Updated Webhook Name",
"webhook_url": "https://newexample.com/webhook",
"webhook_secret": "new_secret",
"events": ["event_phone_call_started", "event_conversation_started"],
"timeout": 45,
"max_retries": 5,
"enabled": false
}'
const response = await fetch('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Updated Webhook Name',
webhook_url: 'https://newexample.com/webhook',
webhook_secret: 'new_secret',
events: ['event_phone_call_started', 'event_conversation_started'],
timeout: 45,
max_retries: 5,
enabled: false
})
});
const data = await response.json();
<?php
$client = new \GuzzleHttp\Client();
$response = $client->put('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a', [
'headers' => [
'Authorization' => 'Bearer YOUR_TOKEN',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'Updated Webhook Name',
'webhook_url' => 'https://newexample.com/webhook',
'webhook_secret' => 'new_secret',
'events' => ['event_phone_call_started', 'event_conversation_started'],
'timeout' => 45,
'max_retries' => 5,
'enabled' => false
],
]);
$data = json_decode($response->getBody());
{
"success": true,
"message": "Webhook updated successfully",
"data": {
"id": "9fcafbf2-7593-44d6-8cd7-1b221beba62a",
"agent_id": "9fbef0b7-8d4e-4a08-9207-66c22155721d",
"name": "Updated Webhook Name",
"webhook_url": "https://newexample.com/webhook",
"events": ["event_phone_call_started", "event_conversation_started"],
"timeout": 45,
"max_retries": 5,
"enabled": false,
"created_at": "2025-09-03T23:19:51.000000Z",
"updated_at": "2025-09-03T23:45:30.000000Z",
"events_count": 2,
"status": "disabled"
}
}
Visão Geral
Atualiza uma configuração de webhook existente. Todos os campos são opcionais — apenas os campos fornecidos serão atualizados.Endpoint
Requisição
curl -X PUT \
'https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "Updated Webhook Name",
"webhook_url": "https://newexample.com/webhook",
"webhook_secret": "new_secret",
"events": ["event_phone_call_started", "event_conversation_started"],
"timeout": 45,
"max_retries": 5,
"enabled": false
}'
const response = await fetch('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Updated Webhook Name',
webhook_url: 'https://newexample.com/webhook',
webhook_secret: 'new_secret',
events: ['event_phone_call_started', 'event_conversation_started'],
timeout: 45,
max_retries: 5,
enabled: false
})
});
const data = await response.json();
<?php
$client = new \GuzzleHttp\Client();
$response = $client->put('https://app.talkover.ai/api/v1/agents/9fbef0b7-8d4e-4a08-9207-66c22155721d/webhooks/9fcafbf2-7593-44d6-8cd7-1b221beba62a', [
'headers' => [
'Authorization' => 'Bearer YOUR_TOKEN',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'Updated Webhook Name',
'webhook_url' => 'https://newexample.com/webhook',
'webhook_secret' => 'new_secret',
'events' => ['event_phone_call_started', 'event_conversation_started'],
'timeout' => 45,
'max_retries' => 5,
'enabled' => false
],
]);
$data = json_decode($response->getBody());
Resposta
{
"success": true,
"message": "Webhook updated successfully",
"data": {
"id": "9fcafbf2-7593-44d6-8cd7-1b221beba62a",
"agent_id": "9fbef0b7-8d4e-4a08-9207-66c22155721d",
"name": "Updated Webhook Name",
"webhook_url": "https://newexample.com/webhook",
"events": ["event_phone_call_started", "event_conversation_started"],
"timeout": 45,
"max_retries": 5,
"enabled": false,
"created_at": "2025-09-03T23:19:51.000000Z",
"updated_at": "2025-09-03T23:45:30.000000Z",
"events_count": 2,
"status": "disabled"
}
}
Respostas de erro
{
"message": "Missing Bearer Token"
}
{
"success": false,
"message": "Agent not found in this environment."
}
{
"success": false,
"message": "Webhook not found."
}
{
"message": "The given data was invalid.",
"errors": {
"webhook_url": ["The webhook url must be a valid URL."],
"events": ["The events field must contain at least 1 items."]
}
}
Regras de validação
- name: Opcional, string, máximo de 255 caracteres
- webhook_url: Opcional, URL válida, máximo de 500 caracteres
- webhook_secret: Opcional, string, máximo de 255 caracteres
- events: Opcional, array com mínimo de 1 evento, cada evento deve estar na lista de eventos disponíveis
- timeout: Opcional, inteiro entre 5-120 segundos
- max_retries: Opcional, inteiro entre 0-10
- enabled: Opcional, booleano
Observações importantes
- Todos os campos são opcionais — apenas os campos fornecidos serão atualizados
- Operações de webhook limpam automaticamente o cache do agente para efeito imediato
- Use endpoints HTTPS para URLs de webhook em produção
- Implemente verificação adequada de assinatura usando o webhook secret para segurança
Endpoints relacionados
- Listar Webhooks do Agente - Obter todos os webhooks de um agente
- Criar Webhook - Configurar um novo webhook
- Obter Detalhes do Webhook - Recuperar informações de um webhook específico
- Excluir Webhook - Remover a configuração do webhook
- Alternar Status do Webhook - Habilitar/desabilitar webhook
- Testar Webhook - Enviar payload de teste para verificar conectividade
Esta página foi útil?