Request the call. Get the outcome.
Contacts, messages, calls driven by a mission and the summary of each conversation, with a key and scopes per company. Signed webhooks back to you, and an MCP server so your own AI agent can operate the platform.
Get started in three requests
Check the key, request a call, read what was agreed. Every route starts at https://ai.voicespeak.app/api/v1.
curl https://ai.voicespeak.app/api/v1/credenciais/quem-sou-eu \
-H "Authorization: Bearer $KEY"
{
"papel": "api",
"empresa_id": "e5f0...",
"empresas": ["e5f0...", "ecfa..."],
"escopos": ["missoes:read", "ligacoes:write", "interacoes:read"]
}curl -X POST https://ai.voicespeak.app/api/v1/missoes/02e87a6c.../ligar \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"numero": "5511988887777",
"nome_destinatario": "Carla",
"valores": { "nome_empresa": "Example Inc" },
"referencia_externa": "oportunidade-8841",
"contexto_previo": {
"canal": "whatsapp",
"persona": "Ana",
"resumo": "Asked to see automated billing working."
}
}'
{ "acao_id": "ac46662c...", "status": "executando", "repetida": false }curl https://ai.voicespeak.app/api/v1/interacoes/b31c... \
-H "Authorization: Bearer $KEY"
{
"acertado": {
"pontos": ["presentation on Monday at 2pm"],
"proximo_passo": "confirm the time on Monday",
"interesse": "alto",
"recusou": false
},
"dados_coletados": { "cargo": "director" },
"compromissos": [
{ "tipo": "retorno", "quando": "2026-08-04T12:00:00Z", "status": "pendente" }
]
}curl -X POST https://ai.voicespeak.app/api/v1/mensagens \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"telefone": "5511999990000",
"texto": "Your order is out for delivery."
}'
# takes contato_id or telefone; without canal_id it goes out
# through the company's active WhatsApp, subject to the agent policyAll in the OpenAPI specification, generated from the code itself.
Waiting 1, 4, 9, 16 and 25 minutes, then resending through the API.
With only the scopes it uses, and every action audited under its prefix.
It's HTTP with JSON. Generate a client from the OpenAPI if you like.
The endpoints that matter
Paths start at https://ai.voicespeak.app/api/v1. Companies, voice numbers, channels, agents, agent policy, the embedded dialer and voice in the browser are in the full reference.
| Endpoint | What it does | Scope |
|---|---|---|
GET /credenciais/quem-sou-eu | Confirms the key and shows the companies it reaches | any key |
PUT /contatos | Creates or updates a contact, by your external id or by phone | contatos:write |
POST /contatos/{id}/contexto | Teaches the agent a fact about the contact | contatos:write |
POST /mensagens | Sends a message through the company WhatsApp, subject to the agent policy | mensagens:write |
GET /missoes | Lists the missions and what each one needs to receive | missoes:read |
POST /missoes/{missao_id}/ligar | The AI calls, driven by the mission, now or scheduled | ligacoes:write |
GET /missoes/pedidos/{acao_id} | Status of the request, answered or not (also by ?referencia_externa=) | ligacoes:write |
GET /ligacoes/{id} | Call record and transcript; the audio is at /gravacao | conversas:read |
GET /interacoes/{id} | The file: summary, what was agreed, commitments and payment | interacoes:read |
POST /webhooks | Registers the endpoint that receives the events | webhooks:write |
POST /webhooks/entregas/{id}/reenviar | Resends a delivery that gave up | webhooks:write |
GET /uso | Usage for the period and the plan's credit and conversation balance | uso:read |
Full reference: narrated guide and OpenAPI specification, with all 72 operations.
Scopes: ask only for what the integration uses
A key that syncs contacts shouldn't be able to trigger calls. With scopes, a leak costs a piece, not everything.
| Scope | Allows |
|---|---|
contatos:read · contatos:write | Read and write contacts and their context |
mensagens:write | Send a message on the agent's behalf |
conversas:read | Read conversations and calls: record, transcript and audio |
interacoes:read | The material of each conversation: summary, agreement, commitments and payment |
missoes:read · ligacoes:write | List the missions and trigger AI calls (each request is a real call) |
ligacoes:ao_vivo | Watch the call as it happens and send cards to whoever is on it |
politica:read · politica:write | Check and change where the agent acts |
canais:read · canais:write · agentes:read · agentes:write | Connect channels, and create and track agents |
webhooks:read · webhooks:write | Subscribe to events and audit deliveries |
uso:read | How much the company has used |
discador:embed · voz_web:sessao · treino:embed | Embedded dialer, voice in the browser and training room inside your system |
empresas:* · recursos:* · usuarios:* · numeros:* | Provision your customers: companies, features, team members and voice lines (each in :read and :write) |
whatsapp:compat | Use the key as the apikey on the Evolution compatible routes |
Errors, and what to do about each one
The HTTP code says what happened. The body gives the reason, in Portuguese, in the detail field.
| Code | Example reason | What to do |
|---|---|---|
| 400 | informe contato_id ou telefone | The body is incomplete. The message says which field |
| 401 | credencial inválida ou revogada | The key is missing, wrong or revoked. Issue a new one in the dashboard |
| 403 | credencial sem escopo: ligacoes:write | The key is valid but lacks the scope for that route |
| 403 | a integração por API não está liberada para esta empresa | The company's plan doesn't include the API (Operação, Equipe or Corporativo) |
| 404 | missão não encontrada | It doesn't exist, or belongs to another company: both answers are the same on purpose |
| 409 | bloqueado pela política de atuação | Conflict with the current state (policy, mission not approved, channel disconnected). The reason says what to change |
| 422 | informe `quando` com fuso | The body is right, but it can't be done: missing mission input, line not paired, plan ceiling |
| 429 | todas as linhas de voz deste widget estão ocupadas | A business answer: show it to your user and offer again |
There are no named error codes: handle the HTTP code and show the detail. Every write made with a key goes into the audit trail under its prefix, and the agent policy applies to the API just as it does in the dashboard. See Safeguards and audit.
The events you can subscribe to
A JSON POST, signed with HMAC-SHA256 of <timestamp>.<body>. Up to 6 attempts, waiting 1, 4, 9, 16 and 25 minutes.
| Event | When it fires |
|---|---|
mensagem.recebida · mensagem.enviada | The contact sent a message, or one went out to them (from the AI, the team, the phone or the API) |
mensagem.entregue_ao_provedor · mensagem.entregue · mensagem.lida | Official WhatsApp: Meta accepted it, it reached the device, the contact opened it |
conversa.encerrada | The conversation closed, with the measured outcome and the data collected |
interacao.resumida | The summary, the agreement and the next step are ready, minutes later |
ligacao.atendida · ligacao.encerrada · transcricao.pronta | The call was answered, ended, and the transcript is ready |
acao.finalizada | A call request finished, answered or not |
handoff.solicitado | The agent asked for a person |
contato.optout | The contact asked not to be contacted again |
cobranca.pendente · .paga · .vencida · .estornada · .cancelada | The status of a charge issued by the agent changed |
agendamento.criado · .remarcado · .cancelado · .pago · .confirmado · .condicao_cumprida | An appointment in the calendar changed |
Headers: X-VoiceSpeak-Evento, X-VoiceSpeak-Timestamp, X-VoiceSpeak-Assinatura (sha256=<hex>) and X-VoiceSpeak-Entrega; the older X-Arena-* ones are still sent, for compatibility. Test a destination with POST /webhooks/{id}/testar. Sample payload and signature check in Integrations.
Your agent operating the platform
For teams that already have an internal assistant and don't want to write an HTTP client for it.
It is the same API key. The tools follow its scopes: without the scope, the tool returns a readable error and the agent stops trying. The first call is quem_sou_eu. Tool list at ai.voicespeak.app/docs/mcp.
Frequently asked questions
How does authentication work?
Authorization: Bearer sk_live_<prefix>_<secret>. The key is issued in the dashboard, under Tools › Credentials, with the scopes you choose, and is shown only once: we keep just the hash. A key can't create another key. It reaches your company and its child companies, never a company outside that tree (the attempt returns 403).Which plans include the API?
Where is the documentation?
What is the MCP server?
https://ai.voicespeak.app/api/v1/mcp and with the same key. Your internal assistant can save contacts, teach the agent facts, send messages, look up conversations and switch the agent on or off, without you writing an HTTP client. Requesting a call goes through the REST API.Can I request a call with context?
POST /missoes/{missao_id}/ligar with the number, the mission inputs and contexto_previo (summary, interest and up to 20 messages from the previous conversation). The agent calls already knowing what it's about. With referencia_externa, repeating the request doesn't call again.How do I handle a failed webhook?
desistiu (gave up), shows up in GET /webhooks/entregas and can be resent with POST /webhooks/entregas/{id}/reenviar. Use the X-VoiceSpeak-Entrega header to drop duplicates.Are there usage limits?
GET /uso.Keep reading
Test the API with your own environment
In the demo we issue a key with the scopes you'll use, point a webhook at your endpoint and trigger the first call through the API, while you watch.
Full reference at ai.voicespeak.app/docs/api. Need specific scopes or a contract? Talk to our team.