curl "https://app.talkover.ai/api/v1/agents/agent-uuid/webhooks/webhook-uuid/logs?per_page=50" \
-H "Authorization: Bearer talq_your_environment_token_here"
{
"success": true,
"data": [
{
"id": "log-uuid-1",
"webhook_id": "webhook-uuid",
"event": "event_phone_call_ended",
"attempt": 1,
"status": "success",
"http_status": 200,
"request_payload": {"call_id": "call-uuid", "duration": 45},
"response_body": "{\"received\":true}",
"response_headers": {"content-type": "application/json"},
"duration_ms": 142,
"delivered_at": "2024-01-15T11:00:01Z",
"created_at": "2024-01-15T11:00:00Z"
},
{
"id": "log-uuid-2",
"webhook_id": "webhook-uuid",
"event": "event_phone_call_started",
"attempt": 3,
"status": "failed",
"http_status": 500,
"error": "Internal Server Error",
"duration_ms": 8021,
"created_at": "2024-01-15T10:55:00Z"
}
],
"pagination": {
"current_page": 1,
"per_page": 50,
"total": 247,
"last_page": 5
}
}
Webhooks de Agente
Listar Logs de Entrega de Webhook
Recuperar tentativas de entrega e respostas para um webhook do agente
GET
/
api
/
v1
/
agents
/
{agent_id}
/
webhooks
/
{webhook_id}
/
logs
curl "https://app.talkover.ai/api/v1/agents/agent-uuid/webhooks/webhook-uuid/logs?per_page=50" \
-H "Authorization: Bearer talq_your_environment_token_here"
{
"success": true,
"data": [
{
"id": "log-uuid-1",
"webhook_id": "webhook-uuid",
"event": "event_phone_call_ended",
"attempt": 1,
"status": "success",
"http_status": 200,
"request_payload": {"call_id": "call-uuid", "duration": 45},
"response_body": "{\"received\":true}",
"response_headers": {"content-type": "application/json"},
"duration_ms": 142,
"delivered_at": "2024-01-15T11:00:01Z",
"created_at": "2024-01-15T11:00:00Z"
},
{
"id": "log-uuid-2",
"webhook_id": "webhook-uuid",
"event": "event_phone_call_started",
"attempt": 3,
"status": "failed",
"http_status": 500,
"error": "Internal Server Error",
"duration_ms": 8021,
"created_at": "2024-01-15T10:55:00Z"
}
],
"pagination": {
"current_page": 1,
"per_page": 50,
"total": 247,
"last_page": 5
}
}
Listar Logs de Entrega de Webhook
Recupera uma lista paginada de tentativas de entrega para um webhook específico, incluindo status HTTP, corpo da resposta, número da tentativa e tempo. Use estes logs para depurar problemas de entrega de webhook.Endpoint
GET /api/v1/agents/{agent_id}/webhooks/{webhook_id}/logs
Parâmetros de caminho
string
obrigatório
UUID do agente.
string
obrigatório
UUID do webhook.
Parâmetros de consulta
integer
Itens por página. Faixa:
1–100. Padrão: 25.integer
Número da página. Padrão:
1.Cabeçalhos da requisição
string
obrigatório
Token Bearer. Formato:
Bearer talq_your_environment_token_hereExemplos
curl "https://app.talkover.ai/api/v1/agents/agent-uuid/webhooks/webhook-uuid/logs?per_page=50" \
-H "Authorization: Bearer talq_your_environment_token_here"
Resposta
{
"success": true,
"data": [
{
"id": "log-uuid-1",
"webhook_id": "webhook-uuid",
"event": "event_phone_call_ended",
"attempt": 1,
"status": "success",
"http_status": 200,
"request_payload": {"call_id": "call-uuid", "duration": 45},
"response_body": "{\"received\":true}",
"response_headers": {"content-type": "application/json"},
"duration_ms": 142,
"delivered_at": "2024-01-15T11:00:01Z",
"created_at": "2024-01-15T11:00:00Z"
},
{
"id": "log-uuid-2",
"webhook_id": "webhook-uuid",
"event": "event_phone_call_started",
"attempt": 3,
"status": "failed",
"http_status": 500,
"error": "Internal Server Error",
"duration_ms": 8021,
"created_at": "2024-01-15T10:55:00Z"
}
],
"pagination": {
"current_page": 1,
"per_page": 50,
"total": 247,
"last_page": 5
}
}
Valores de Status do Log
pending— enfileirado para entregasuccess— entregue, alvo respondeu com 2xxfailed— entregue mas o alvo respondeu com não-2xx, ou conexão falhouretrying— falhou, será retentado de acordo commax_retries
Observações
- Os logs são retidos por 30 dias.
- Entregas com falha podem ser retentadas manualmente via Retentar Log de Webhook.
- Cada tentativa de retry cria uma nova entrada de log com
attemptincrementado.
Esta página foi útil?