# Outbound with multiple phone numbers
curl -X PUT "https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/calling" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"direction": "outbound",
"phone_number_ids": ["phone-uuid-1", "phone-uuid-2"]
}'
const response = await fetch('https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/calling', {
method: 'PUT',
headers: {
'Authorization': 'Bearer talq_your_environment_token_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
direction: "outbound",
phone_number_ids: ["phone-uuid-1", "phone-uuid-2"]
})
});
const result = await response.json();
import requests
url = "https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/calling"
headers = {
"Authorization": "Bearer talq_your_environment_token_here",
"Content-Type": "application/json"
}
data = {
"direction": "outbound",
"phone_number_ids": ["phone-uuid-1", "phone-uuid-2"]
}
response = requests.put(url, headers=headers, json=data)
result = response.json()
{
"success": true,
"message": "Agent calling settings updated successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "SupportBot",
"direction": "outbound",
"current_status": "draft",
"phone_numbers": [
{
"id": "phone-uuid-1",
"number": "+5511987654321",
"country_code": "US",
"formatted_number": "(123) 456-7890",
"current_status": "active"
},
{
"id": "phone-uuid-2",
"number": "+5511976543210",
"country_code": "US",
"formatted_number": "(987) 654-3210",
"current_status": "active"
}
],
"updated_at": "2024-01-15T10:45:00Z"
}
}
Agentes
Atualizar Configurações de Chamada do Agente
Atualizar a direção de chamada e os números de telefone atribuídos a um agente
PUT
/
api
/
v1
/
agents
/
{agent_id}
/
calling
# Outbound with multiple phone numbers
curl -X PUT "https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/calling" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"direction": "outbound",
"phone_number_ids": ["phone-uuid-1", "phone-uuid-2"]
}'
const response = await fetch('https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/calling', {
method: 'PUT',
headers: {
'Authorization': 'Bearer talq_your_environment_token_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
direction: "outbound",
phone_number_ids: ["phone-uuid-1", "phone-uuid-2"]
})
});
const result = await response.json();
import requests
url = "https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/calling"
headers = {
"Authorization": "Bearer talq_your_environment_token_here",
"Content-Type": "application/json"
}
data = {
"direction": "outbound",
"phone_number_ids": ["phone-uuid-1", "phone-uuid-2"]
}
response = requests.put(url, headers=headers, json=data)
result = response.json()
{
"success": true,
"message": "Agent calling settings updated successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "SupportBot",
"direction": "outbound",
"current_status": "draft",
"phone_numbers": [
{
"id": "phone-uuid-1",
"number": "+5511987654321",
"country_code": "US",
"formatted_number": "(123) 456-7890",
"current_status": "active"
},
{
"id": "phone-uuid-2",
"number": "+5511976543210",
"country_code": "US",
"formatted_number": "(987) 654-3210",
"current_status": "active"
}
],
"updated_at": "2024-01-15T10:45:00Z"
}
}
Atualizar Configurações de Chamada do Agente
Atualiza a direção da chamada (entrada/saída) e os números de telefone atribuídos ao agente.Endpoint
PUT /api/v1/agents/{agent_id}/calling
Parâmetros de caminho
string
obrigatório
O identificador único do agente de voz a ser atualizado.
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/jsonParâmetros do Corpo da requisição
string
obrigatório
Direção da chamada. Opções:
inbound, outbound.array
Array de UUIDs de números de telefone a atribuir ao agente.
Exemplos
# Outbound with multiple phone numbers
curl -X PUT "https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/calling" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"direction": "outbound",
"phone_number_ids": ["phone-uuid-1", "phone-uuid-2"]
}'
const response = await fetch('https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/calling', {
method: 'PUT',
headers: {
'Authorization': 'Bearer talq_your_environment_token_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
direction: "outbound",
phone_number_ids: ["phone-uuid-1", "phone-uuid-2"]
})
});
const result = await response.json();
import requests
url = "https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/calling"
headers = {
"Authorization": "Bearer talq_your_environment_token_here",
"Content-Type": "application/json"
}
data = {
"direction": "outbound",
"phone_number_ids": ["phone-uuid-1", "phone-uuid-2"]
}
response = requests.put(url, headers=headers, json=data)
result = response.json()
Resposta
{
"success": true,
"message": "Agent calling settings updated successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "SupportBot",
"direction": "outbound",
"current_status": "draft",
"phone_numbers": [
{
"id": "phone-uuid-1",
"number": "+5511987654321",
"country_code": "US",
"formatted_number": "(123) 456-7890",
"current_status": "active"
},
{
"id": "phone-uuid-2",
"number": "+5511976543210",
"country_code": "US",
"formatted_number": "(987) 654-3210",
"current_status": "active"
}
],
"updated_at": "2024-01-15T10:45:00Z"
}
}
Observações
- Definir
direction: "inbound"configura o agente para receber chamadas nos números atribuídos. - Definir
direction: "outbound"configura o agente para realizar chamadas a partir dos números atribuídos. - Os números de telefone já devem existir em seu ambiente. Use o endpoint Listar Números de Telefone para recuperar os IDs disponíveis.
Esta página foi útil?