Agents
Crie e gerencie agentes de voz com IA — o recurso central da plataforma Vendor.
Listar Agentes
GET
/api/agentsRetorna todos os agentes do usuário autenticado
Request
curl -X GET https://api.vendoria.com.br/api/agents \
-H "X-Api-Key: vk_sua_api_key"Response
[
{
"id": "clxyz...",
"name": "Atendente Virtual",
"description": "Agente de atendimento ao cliente",
"systemPrompt": "Você é um assistente...",
"voiceId": "alloy",
"isActive": true,
"direction": "inbound",
"language": "pt-BR",
"ttsProvider": "elevenlabs",
"createdAt": "2026-03-01T00:00:00Z",
"updatedAt": "2026-03-06T00:00:00Z"
}
]Obter Agente
GET
/api/agents/:idRetorna um agente específico pelo ID
Criar Agente
POST
/api/agentsCria um novo agente de voz
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Required | Nome do agente |
systemPrompt | string | Required | Prompt do sistema que define o comportamento |
description | string | Optional | Descrição do agente |
voiceId | string | Optional | ID da voz (depende do ttsProvider) |
ttsProvider | string | Optional | "elevenlabs", "murf" ou "inworld" |
language | string | Optional | Idioma (padrão: "pt-BR") |
direction | string | Optional | "inbound", "outbound" ou "both" |
initialSpeech | string | Optional | Frase inicial ao atender |
groqConfig | object | Optional | Configuração LLM (model, temperature, etc) |
elevenlabsConfig | object | Optional | Config ElevenLabs (model_id, voice_settings) |
Request
curl -X POST https://api.vendoria.com.br/api/agents \
-H "X-Api-Key: vk_sua_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Suporte Premium",
"systemPrompt": "Você é um agente de suporte premium...",
"voiceId": "21m00Tcm4TlvDq8ikWAM",
"ttsProvider": "elevenlabs",
"language": "pt-BR",
"initialSpeech": "Olá! Como posso ajudá-lo?"
}'Atualizar Agente
PATCH
/api/agents/:idAtualiza campos de um agente. Envie apenas os campos a alterar.
Request
curl -X PATCH https://api.vendoria.com.br/api/agents/clxyz... \
-H "X-Api-Key: vk_sua_api_key" \
-H "Content-Type: application/json" \
-d '{ "name": "Novo Nome", "isActive": false }'Ativar / Desativar
PATCH
/api/agents/toggle/:idAlterna o estado ativo/inativo do agente
Deletar Agente
DELETE
/api/agents/:idRemove permanentemente um agente e seus dados
Warning
A exclusão é permanente e remove conversas, mensagens e configurações vinculadas.
Vincular / Desvincular Trunk
POST
/api/agents/:id/link-trunkVincula um trunk SIP ao agente
| Parameter | Type | Required | Description |
|---|---|---|---|
trunkId | string | Required | ID do trunk SIP |
trunkType | string | Required | "inbound" ou "outbound" |
phoneNumber | string | Optional | Número para criar DID automaticamente |
DELETE
/api/agents/:id/link-trunk/:trunkIdRemove vinculação do trunk
GET
/api/agents/:id/linked-trunksLista trunks vinculados
Tools do Agente
GET
/api/agents/:id/toolsLista ferramentas associadas ao agente