curl -X POST "https://app.talkover.ai/api/v1/agents/agent-uuid-1/callback" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"source_agent_ids": ["agent-uuid-2", "agent-uuid-3"]
}'
{
"success": true,
"data": {
"id": "agent-uuid-1",
"name": "Callback Handler",
"direction": "inbound",
"callback_config": {
"source_agent_ids": ["agent-uuid-2", "agent-uuid-3"]
}
}
}
Agentes de Callback
Definir Agente como Callback
Configurar um agente inbound para tratar callbacks de agentes de origem outbound
POST
/
api
/
v1
/
agents
/
{agent_id}
/
callback
curl -X POST "https://app.talkover.ai/api/v1/agents/agent-uuid-1/callback" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"source_agent_ids": ["agent-uuid-2", "agent-uuid-3"]
}'
{
"success": true,
"data": {
"id": "agent-uuid-1",
"name": "Callback Handler",
"direction": "inbound",
"callback_config": {
"source_agent_ids": ["agent-uuid-2", "agent-uuid-3"]
}
}
}
Definir Agente como Callback
Configura um agente inbound para tratar callbacks de um ou mais agentes de origem outbound. Quando um contato previamente chamado por um agente de origem retorna a ligação, a chamada é roteada para este agente (presumindo que o agente seja dono do número discado).Endpoint
POST /api/v1/agents/{agent_id}/callback
Parâmetros de caminho
string
obrigatório
UUID do agente inbound. Deve ter
direction: "inbound".Cabeçalhos da requisição
string
obrigatório
Token Bearer para autenticação. Formato:
Bearer talq_your_environment_token_herestring
obrigatório
Deve ser definido como
application/jsonCorpo da requisição
array
obrigatório
Array de UUIDs de agentes outbound cujos contatos devem ser roteados para este agente de callback nos retornos inbound. Deve conter pelo menos uma entrada.
Exemplos
curl -X POST "https://app.talkover.ai/api/v1/agents/agent-uuid-1/callback" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"source_agent_ids": ["agent-uuid-2", "agent-uuid-3"]
}'
Resposta
{
"success": true,
"data": {
"id": "agent-uuid-1",
"name": "Callback Handler",
"direction": "inbound",
"callback_config": {
"source_agent_ids": ["agent-uuid-2", "agent-uuid-3"]
}
}
}
Respostas de erro
422 — Direção Incorreta
{
"success": false,
"message": "Agent must have direction=inbound to serve as a callback",
"code": "INVALID_AGENT_DIRECTION"
}
Esta página foi útil?