curl -X PATCH "https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/advanced-settings" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"enable_initial_message_cache": true
}'
const response = await fetch('https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/advanced-settings', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer talq_your_environment_token_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
enable_initial_message_cache: true
})
});
const result = await response.json();
{
"success": true,
"message": "Advanced settings updated successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "SupportBot",
"advanced_settings": {
"enable_initial_message_cache": true
},
"updated_at": "2024-01-15T11:00:00Z"
}
}
Agentes
Atualizar Configurações Avançadas
Alternar recursos do agente, como cache de custos otimizados
PATCH
/
api
/
v1
/
agents
/
{agent_id}
/
advanced-settings
curl -X PATCH "https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/advanced-settings" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"enable_initial_message_cache": true
}'
const response = await fetch('https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/advanced-settings', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer talq_your_environment_token_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
enable_initial_message_cache: true
})
});
const result = await response.json();
{
"success": true,
"message": "Advanced settings updated successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "SupportBot",
"advanced_settings": {
"enable_initial_message_cache": true
},
"updated_at": "2024-01-15T11:00:00Z"
}
}
Atualizar Configurações Avançadas
Alterna recursos avançados do agente. Atualmente, a única configuração éenable_initial_message_cache, que ativa a precificação com custos otimizados assim que o agente atinge o limite de elegibilidade.
Endpoint
PATCH /api/v1/agents/{agent_id}/advanced-settings
Parâmetros de caminho
string
obrigatório
UUID do agente.
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
boolean
Quando
true, habilita o cache do áudio da mensagem inicial do agente para chamadas de saída repetidas. Reduz o custo de síntese de voz por chamada. Requer que o agente seja elegível — veja Verificar Elegibilidade para Custos Otimizados.Exemplos
curl -X PATCH "https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/advanced-settings" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"enable_initial_message_cache": true
}'
const response = await fetch('https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/advanced-settings', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer talq_your_environment_token_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
enable_initial_message_cache: true
})
});
const result = await response.json();
Resposta
{
"success": true,
"message": "Advanced settings updated successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "SupportBot",
"advanced_settings": {
"enable_initial_message_cache": true
},
"updated_at": "2024-01-15T11:00:00Z"
}
}
Respostas de erro
422 Não Elegível
{
"success": false,
"message": "Agent does not meet the call volume threshold for optimized costs",
"code": "OPTIMIZED_COSTS_NOT_ELIGIBLE",
"details": {
"current_calls": 312,
"required_calls": 700,
"threshold_days": 7
}
}
Observações
- A elegibilidade é aplicada no servidor. Alternar
enable_initial_message_cache: trueem um agente não elegível falha com422. - Desabilitar o cache (
false) é sempre permitido.
Esta página foi útil?