API

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.

Bearersk_live_ key with scopes
HMACwebhook signature
MCPsame key, same scopes
Events going out to your systemoportunidade-8841
mensagem.recebidaarrived on the company WhatsAppwaiting
ligacao.encerradawith your referencia_externawaiting
interacao.resumidasummary, what was agreed and the next stepwaiting
HMAC-SHA256up to 6 attempts, 1 to 25 min apart
First steps

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 policy
72
Documented operations

All in the OpenAPI specification, generated from the code itself.

6
Attempts per webhook

Waiting 1, 4, 9, 16 and 25 minutes, then resending through the API.

1
Key per integration

With only the scopes it uses, and every action audited under its prefix.

0
Required SDKs

It's HTTP with JSON. Generate a client from the OpenAPI if you like.

Quick reference

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.

EndpointWhat it doesScope
GET /credenciais/quem-sou-euConfirms the key and shows the companies it reachesany key
PUT /contatosCreates or updates a contact, by your external id or by phonecontatos:write
POST /contatos/{id}/contextoTeaches the agent a fact about the contactcontatos:write
POST /mensagensSends a message through the company WhatsApp, subject to the agent policymensagens:write
GET /missoesLists the missions and what each one needs to receivemissoes:read
POST /missoes/{missao_id}/ligarThe AI calls, driven by the mission, now or scheduledligacoes: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 /gravacaoconversas:read
GET /interacoes/{id}The file: summary, what was agreed, commitments and paymentinteracoes:read
POST /webhooksRegisters the endpoint that receives the eventswebhooks:write
POST /webhooks/entregas/{id}/reenviarResends a delivery that gave upwebhooks:write
GET /usoUsage for the period and the plan's credit and conversation balanceuso:read

Full reference: narrated guide and OpenAPI specification, with all 72 operations.

Permissions

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.

ScopeAllows
contatos:read · contatos:writeRead and write contacts and their context
mensagens:writeSend a message on the agent's behalf
conversas:readRead conversations and calls: record, transcript and audio
interacoes:readThe material of each conversation: summary, agreement, commitments and payment
missoes:read · ligacoes:writeList the missions and trigger AI calls (each request is a real call)
ligacoes:ao_vivoWatch the call as it happens and send cards to whoever is on it
politica:read · politica:writeCheck and change where the agent acts
canais:read · canais:write · agentes:read · agentes:writeConnect channels, and create and track agents
webhooks:read · webhooks:writeSubscribe to events and audit deliveries
uso:readHow much the company has used
discador:embed · voz_web:sessao · treino:embedEmbedded 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:compatUse the key as the apikey on the Evolution compatible routes
Responses

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.

CodeExample reasonWhat to do
400informe contato_id ou telefoneThe body is incomplete. The message says which field
401credencial inválida ou revogadaThe key is missing, wrong or revoked. Issue a new one in the dashboard
403credencial sem escopo: ligacoes:writeThe key is valid but lacks the scope for that route
403a integração por API não está liberada para esta empresaThe company's plan doesn't include the API (Operação, Equipe or Corporativo)
404missão não encontradaIt doesn't exist, or belongs to another company: both answers are the same on purpose
409bloqueado pela política de atuaçãoConflict with the current state (policy, mission not approved, channel disconnected). The reason says what to change
422informe `quando` com fusoThe body is right, but it can't be done: missing mission input, line not paired, plan ceiling
429todas as linhas de voz deste widget estão ocupadasA 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.

Webhooks

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.

EventWhen it fires
mensagem.recebida · mensagem.enviadaThe 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.lidaOfficial WhatsApp: Meta accepted it, it reached the device, the contact opened it
conversa.encerradaThe conversation closed, with the measured outcome and the data collected
interacao.resumidaThe summary, the agreement and the next step are ready, minutes later
ligacao.atendida · ligacao.encerrada · transcricao.prontaThe call was answered, ended, and the transcript is ready
acao.finalizadaA call request finished, answered or not
handoff.solicitadoThe agent asked for a person
contato.optoutThe contact asked not to be contacted again
cobranca.pendente · .paga · .vencida · .estornada · .canceladaThe status of a charge issued by the agent changed
agendamento.criado · .remarcado · .cancelado · .pago · .confirmado · .condicao_cumpridaAn 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.

MCP server

Your agent operating the platform

For teams that already have an internal assistant and don't want to write an HTTP client for it.

{
  "mcpServers": {
    "voicespeak": {
      "url": "https://ai.voicespeak.app/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer sk_live_..."
      }
    }
  }
}

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?
Every request carries 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?
API integration is included in the Operação, Equipe and Corporativo plans. For a company without it, issuing a key returns 403 with the reason.
Where is the documentation?
The narrated guide is at ai.voicespeak.app/docs/api, and the OpenAPI specification, generated from the code itself, at /api/v1/openapi.json. When a route changes, both change with it. The MCP tools are at /docs/mcp. The guide is in Portuguese.
What is the MCP server?
A server that exposes the platform as tools for your own AI agents, at 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?
That's the main use case. You pick the mission and call 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?
Reply 2xx within 10 seconds. Otherwise we try again after 1, 4, 9, 16 and 25 minutes, up to 6 attempts; after that the delivery is marked 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?
Yes. Calls use the plan’s credits and follow the simultaneous call limit of the plan and of each line. When every line is busy, the answer is 429. Usage for the period and the plan's credit and conversation balance are at GET /uso.

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.