Pular para o conteúdo principal
GET
/
api
/
v1
/
agents
/
{agent_id}
/
active-call
/
{phone}
curl "https://app.talkover.ai/api/v1/agents/agent-uuid/active-call/%2B15551234567" \
  -H "Authorization: Bearer talq_your_environment_token_here"
{
  "success": true,
  "data": [
    {
      "id": "call-uuid-1",
      "agent_id": "agent-uuid",
      "to": "+15551234567",
      "status": "answered",
      "started_at": "2024-01-15T11:00:00Z",
      "duration_seconds": 42
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.talkover.ai/llms.txt

Use this file to discover all available pages before exploring further.

Obter Chamada Ativa por Telefone

Encontra a chamada ativa (se houver) entre um agente e um número de telefone específico. Útil para verificações de deduplicação antes de realizar uma nova chamada, ou para localizar o ID da chamada associado a um chamador de entrada.

Endpoint

GET /api/v1/agents/{agent_id}/active-call/{phone}

Parâmetros de Caminho

agent_id
string
obrigatório
UUID do agente.
phone
string
obrigatório
Número de telefone no formato E.164 (ex: +15551234567). Codifique em URL o sinal + como %2B.

Cabeçalhos da Requisição

Authorization
string
obrigatório
Token Bearer. Formato: Bearer talq_your_environment_token_here

Exemplos

curl "https://app.talkover.ai/api/v1/agents/agent-uuid/active-call/%2B15551234567" \
  -H "Authorization: Bearer talq_your_environment_token_here"

Resposta

Chamada Ativa Encontrada

{
  "success": true,
  "data": [
    {
      "id": "call-uuid-1",
      "agent_id": "agent-uuid",
      "to": "+15551234567",
      "status": "answered",
      "started_at": "2024-01-15T11:00:00Z",
      "duration_seconds": 42
    }
  ]
}

Nenhuma Chamada Ativa

Retorna 404 Not Found.
{
  "success": false,
  "message": "No active call found for this phone number"
}

Observações

  • Apenas chamadas com status initiated, ringing ou answered são consideradas ativas.
  • Se múltiplas chamadas ativas existirem (raro — tipicamente apenas uma), todas são retornadas no array.
  • Para buscas históricas, use Listar Chamadas com filtro to.