Maton

Vapi

Access the Vapi API with managed authentication. List and read assistants, calls with their transcripts, recordings, and costs, chats, squads, tools, files, knowledge bases, phone numbers, campaigns, structured outputs, and evals; query call analytics; and create or change assistants, calls, campaigns, and numbers. Outbound calls and campaigns dial real people and bill the organization, and call artifacts hold the voices and words of the people called. All access runs through the Maton gateway and the maton CLI.

Permissions

Suggested read access

In the Console, Read limits the connection to these 59 read-only endpoints, plus deny rules for any write endpoint a broader rule would otherwise match. Endpoints Maton has found to return credentials, start jobs, or spend credits are left out; a few reads that can change state or return a secret depending on their parameters stay in, and their descriptions say how. It is a suggestion: the saved rules are exactly the ones you see, and you can change them with Custom. See Access policy.

Reference

Assistants

An assistant is a voice agent: a model with a system prompt (model.messages), a voice, a transcriber, and call behavior (firstMessage, endCallPhrases, voicemailMessage).

List Assistants

maton api '/vapi/assistant?limit=10'

Query parameters:

  • limit (number, optional): Default 100, maximum 1000
  • createdAtGt / createdAtLt / createdAtGe / createdAtLe (ISO 8601, optional): Filter by creation time; updatedAt* filters the same way

Response:

[
  {
    "id": "{assistant_id}",
    "orgId": "{org_id}",
    "name": "Support Agent",
    "model": {
      "provider": "openai",
      "model": "gpt-4.1",
      "messages": [{"role": "system", "content": "You are a helpful support agent..."}]
    },
    "voice": {"provider": "vapi", "voiceId": "Elliot"},
    "transcriber": {"provider": "soniox", "model": "stt-rt-v4", "language": "en"},
    "firstMessage": "Hi, how can I help?",
    "voicemailMessage": "Please call back when you're available.",
    "endCallMessage": "Goodbye.",
    "isServerUrlSecretSet": false,
    "createdAt": "2026-11-29T21:03:11.402Z",
    "updatedAt": "2026-11-29T21:03:11.402Z"
  }
]

Get Assistant

maton api '/vapi/assistant/{assistant_id}'

Create Assistant

maton api '/vapi/assistant' -X POST -H 'Content-Type: application/json' \
  --input - <<'JSON'
{
  "name": "Support Agent",
  "firstMessage": "Hi, this is the support line. How can I help?",
  "model": {
    "provider": "openai",
    "model": "gpt-4.1",
    "messages": [{"role": "system", "content": "You answer questions about order status."}]
  },
  "voice": {"provider": "vapi", "voiceId": "Elliot"},
  "transcriber": {"provider": "deepgram", "model": "nova-3", "language": "en"}
}
JSON

Update Assistant

maton api '/vapi/assistant/{assistant_id}' -X PATCH -H 'Content-Type: application/json' \
  --input - <<'JSON'
{"firstMessage": "Thanks for calling. How can I help today?"}
JSON

Delete Assistant

maton api '/vapi/assistant/{assistant_id}' -X DELETE

Calls

List Calls

maton api '/vapi/call?limit=10'

Query parameters:

  • assistantId (string, optional): Calls handled by one assistant
  • phoneNumberId (string, optional): Calls on one number
  • id (string, optional): One call
  • limit (number, optional): Default 100, maximum 1000
  • createdAtGt / createdAtLt / createdAtGe / createdAtLe (ISO 8601, optional)

Response:

[
  {
    "id": "{call_id}",
    "orgId": "{org_id}",
    "type": "outboundPhoneCall",
    "status": "ended",
    "endedReason": "customer-ended-call",
    "assistantId": "{assistant_id}",
    "phoneNumberId": "{phone_number_id}",
    "customer": {"number": "+15555550123"},
    "startedAt": "2026-11-29T21:10:02.114Z",
    "endedAt": "2026-11-29T21:12:40.903Z",
    "cost": 0.21,
    "costBreakdown": {"transport": 0.02, "stt": 0.03, "llm": 0.05, "tts": 0.06, "vapi": 0.05, "total": 0.21},
    "analysis": {"summary": "The caller asked about order 1042...", "successEvaluation": "true"},
    "artifact": {"transcript": "AI: Hi... User: ...", "recordingUrl": "https://storage.vapi.ai/..."},
    "createdAt": "2026-11-29T21:09:58.771Z",
    "updatedAt": "2026-11-29T21:12:41.502Z"
  }
]

type is inboundPhoneCall, outboundPhoneCall, webCall, or vapi.websocketCall; status is scheduled, queued, ringing, in-progress, forwarding, or ended. cost is in USD.

Get Call

maton api '/vapi/call/{call_id}'

Carries the full messages, artifact (transcript, recording URLs, logs), analysis, and costs. While a call is live, monitor.listenUrl and monitor.controlUrl can listen to and steer it, and web calls include the join details; anyone holding them can listen to or steer the call.

Download Call Recordings and Logs

maton api '/vapi/call/{call_id}/stereo-recording'

Each of call/{call_id}/stereo-recording, mono-recording, assistant-recording, customer-recording, video-recording, call-logs, and pcap answers with a 302 redirect to a short-lived download URL for that artifact, or 404 when it wasn't kept.

Create Call

maton api '/vapi/call' -X POST -H 'Content-Type: application/json' \
  --input - <<'JSON'
{
  "assistantId": "{assistant_id}",
  "phoneNumberId": "{phone_number_id}",
  "customer": {"number": "+15555550123", "name": "Ada"}
}
JSON

customers (an array) places a batch of calls instead of one, and schedulePlan (earliestAt, latestAt) schedules it. A squad (squadId) or workflow (workflowId) can take the assistant's place, and assistantOverrides changes settings for this call only. The call starts at once; poll call/{call_id} for status and endedReason.

Update Call

maton api '/vapi/call/{call_id}' -X PATCH -H 'Content-Type: application/json' \
  --input - <<'JSON'
{"name": "Order 1042 follow-up"}
JSON

Only name can change.

Delete Call

maton api '/vapi/call/{call_id}' -X DELETE

Chats

A chat runs an assistant over text instead of voice, and bills for the model.

List Chats

maton api '/vapi/chat?limit=10'

Filters: assistantId, squadId, sessionId, previousChatId, plus page, sortOrder (ASC, DESC), and the createdAt* / updatedAt* filters.

Response:

{
  "results": [
    {
      "id": "{chat_id}",
      "orgId": "{org_id}",
      "assistantId": "{assistant_id}",
      "messages": [{"role": "user", "content": "Where is order 1042?"}],
      "output": [{"role": "assistant", "content": "It shipped yesterday."}],
      "cost": 0.002,
      "createdAt": "2026-11-29T21:20:00.000Z",
      "updatedAt": "2026-11-29T21:20:01.000Z"
    }
  ],
  "metadata": {"totalItems": 1, "itemsPerPage": 10, "currentPage": 1}
}

Get Chat

maton api '/vapi/chat/{chat_id}'

Create Chat

maton api '/vapi/chat' -X POST -H 'Content-Type: application/json' \
  --input - <<'JSON'
{
  "assistantId": "{assistant_id}",
  "input": "Where is order 1042?"
}
JSON

previousChatId continues an earlier chat, and sessionId adds the turn to a session (the two are exclusive). chat/responses takes the same request in the OpenAI Responses format.

Delete Chat

maton api '/vapi/chat/{chat_id}' -X DELETE

Squads

A squad is a set of assistants that hand a call to each other.

List Squads

maton api '/vapi/squad?limit=10'

squad/{squad_id} returns one squad with its members (each an assistantId or inline assistant, with the destinations it may hand off to).

Create Squad

maton api '/vapi/squad' -X POST -H 'Content-Type: application/json' \
  --input - <<'JSON'
{
  "name": "Front desk",
  "members": [
    {"assistantId": "{assistant_id}", "assistantDestinations": [{"type": "assistant", "assistantName": "Billing"}]},
    {"assistantId": "{billing_assistant_id}"}
  ]
}
JSON

squad/{squad_id} with PATCH updates a squad and with DELETE removes it.

Tools

Tools are what an assistant can do during a call: function, apiRequest, mcp, and sipRequest (call a server), transferCall, handoff, endCall, dtmf, sms, voicemail, query (search a knowledge base), Google Calendar and Sheets, Slack, and GoHighLevel actions, and others.

List Tools

maton api '/vapi/tool?limit=10'

tool/{tool_id} returns one tool with its type, function schema, and server (the URL and headers it calls).

Create Tool

maton api '/vapi/tool' -X POST -H 'Content-Type: application/json' \
  --input - <<'JSON'
{
  "type": "function",
  "function": {
    "name": "lookup_order",
    "description": "Look up an order's status by its number",
    "parameters": {"type": "object", "properties": {"order": {"type": "string"}}, "required": ["order"]}
  },
  "server": {"url": "{server_url}"}
}
JSON

tool/{tool_id} with PATCH updates a tool and with DELETE removes it.

Files and Knowledge Bases

List Files

maton api '/vapi/file'

Each file carries id, name, mimetype, bytes, status, and url. file/{file_id} returns one.

Upload File

maton api '/vapi/file' -X POST -F 'file=@faq.pdf'

file/{file_id} with PATCH renames a file and with DELETE removes it.

List Knowledge Bases

maton api '/vapi/v2/knowledge-base'

v2/knowledge-base/{kb_id} returns one, and v2/knowledge-base/{kb_id}/file lists its files with their indexing status.

Create a Knowledge Base and Attach a File

maton api '/vapi/v2/knowledge-base' -X POST -H 'Content-Type: application/json' \
  --input - <<'JSON'
{"name": "Support FAQ", "description": "Answers to common order questions"}
JSON
maton api '/vapi/v2/knowledge-base/{kb_id}/file' -X POST -H 'Content-Type: application/json' \
  --input - <<'JSON'
{"fileId": "{file_id}"}
JSON

Indexing runs in the background; v2/knowledge-base/{kb_id}/file/{file_id}/retry retries a failed file, and v2/knowledge-base/{kb_id}/file/{file_id} with DELETE detaches one. v2/knowledge-base/{kb_id} with PATCH renames the knowledge base and with DELETE removes it.

Phone Numbers

List Phone Numbers

maton api '/vapi/v2/phone-number?limit=10'

Response:

{
  "results": [
    {
      "id": "{phone_number_id}",
      "orgId": "{org_id}",
      "provider": "vapi",
      "number": "+15555550100",
      "name": "Support line",
      "assistantId": "{assistant_id}",
      "status": "active",
      "createdAt": "2026-11-29T21:00:00.000Z",
      "updatedAt": "2026-11-29T21:00:00.000Z"
    }
  ],
  "metadata": {"totalItems": 1, "itemsPerPage": 10, "currentPage": 1}
}

phone-number (the older unpaginated list) and phone-number/{phone_number_id} return the same objects. A number imported from Twilio returns its twilioAccountSid, twilioAuthToken, and twilioApiSecret.

Create Phone Number

maton api '/vapi/phone-number' -X POST -H 'Content-Type: application/json' \
  --input - <<'JSON'
{
  "provider": "vapi",
  "numberDesiredAreaCode": "415",
  "name": "Support line",
  "assistantId": "{assistant_id}"
}
JSON

provider is vapi (a free US number from Vapi), twilio, vonage, telnyx, or byo-phone-number (a SIP trunk). Importing a carrier's number takes that carrier's credentials, which are entered in the Vapi dashboard.

phone-number/{phone_number_id} with PATCH changes what answers the number (assistantId, squadId, workflowId, fallbackDestination) and with DELETE releases it; a released Vapi number cannot be recovered.

Campaigns

A campaign dials a list of customers with one assistant and number.

List Campaigns

maton api '/vapi/v2/campaign?limit=10'

Filters: status (scheduled, in-progress, ended, cancelled, archived), page, sortOrder, and createdAt*. v2/campaign/{campaign_id} returns one campaign with its counters, and v2/campaign/{campaign_id}/contacts lists its customers and their call outcomes. The older campaign and campaign/{campaign_id} endpoints remain.

Create Campaign

maton api '/vapi/v2/campaign' -X POST -H 'Content-Type: application/json' \
  --input - <<'JSON'
{
  "name": "Renewal reminders",
  "assistantId": "{assistant_id}",
  "phoneNumberId": "{phone_number_id}",
  "customers": [{"number": "+15555550123", "name": "Ada"}],
  "schedulePlan": {"earliestAt": "2026-12-01T16:00:00Z", "latestAt": "2026-12-01T22:00:00Z"}
}
JSON

v2/campaign/{campaign_id} with PATCH changes a campaign (setting status to ended or cancelled stops it) and with DELETE removes it.

Structured Outputs

A structured output extracts typed data from a call (a JSON schema, a regex, or a boolean condition) after it ends.

List Structured Outputs

maton api '/vapi/structured-output?limit=10'

structured-output/{id} returns one with its schema. structured-output with POST creates one (name, schema, optional assistantIds), structured-output/{id} with PATCH updates it and with DELETE removes it.

Run a Structured Output on Past Calls

maton api '/vapi/structured-output/run' -X POST -H 'Content-Type: application/json' \
  --input - <<'JSON'
{"structuredOutputId": "{structured_output_id}", "callIds": ["{call_id}"], "previewEnabled": true}
JSON

With previewEnabled the results come back without being saved to the calls.

Analytics and Reporting

Query Call Analytics

maton api '/vapi/analytics' -X POST -H 'Content-Type: application/json' \
  --input - <<'JSON'
{
  "queries": [
    {
      "table": "call",
      "name": "cost_by_assistant",
      "groupBy": ["assistantId"],
      "timeRange": {"start": "2026-11-01T00:00:00Z", "end": "2026-12-01T00:00:00Z", "step": "day"},
      "operations": [{"operation": "sum", "column": "cost"}, {"operation": "count", "column": "id"}]
    }
  ]
}
JSON

A read despite the POST. operation is sum, avg, count, min, max, or history; column is id, cost, a costBreakdown.* field, or duration; groupBy takes type, assistantId, endedReason, analysis.successEvaluation, or status.

Reporting boards and insights (reporting/board, reporting/insight, reporting/insight/{id}/run) and scorecards (observability/scorecard) build saved dashboards on the same data; reporting/insight/preview computes an insight without saving it.

Evals and Simulations

Evals replay a scripted conversation against an assistant and grade the replies; simulations have a simulated caller (a personality and a scenario) talk to the assistant.

maton api '/vapi/eval?limit=10'
maton api '/vapi/eval/run?limit=10'
maton api '/vapi/eval/simulation/suite'
maton api '/vapi/eval/simulation/concurrency'

Also readable: eval/{id}, eval/run/{id}, eval/simulation, eval/simulation/{id}, eval/simulation/run, eval/simulation/run/{id} and its item list, eval/simulation/scenario, and eval/simulation/personality. Creating evals, scenarios, personalities, and suites, and starting runs (eval/run or eval/simulation/run with POST), bill the model for every simulated turn.

Sessions

A session groups chat turns with one customer and assistant so later turns share context. session lists them (filter by assistantId, customerNumberAny, phoneNumberId, name, and the time filters), session/{id} returns one, session with POST creates one, session/{id} with PATCH updates it and with DELETE removes it. A session that names a phone number returns that number's configuration, including an imported Twilio number's credentials; report sessions without the phoneNumber object.

Pagination

Assistants, calls, squads, tools, files, and the older phone-number list return a plain array: narrow them with limit (maximum 1000) and the createdAtLt / createdAtGt filters, paging back by passing the oldest createdAt seen as createdAtLt:

maton api '/vapi/call?limit=100&createdAtLt={oldest_created_at}'

Chats, campaigns, sessions, the v2 phone-number list, structured outputs, evals, scorecards, and reporting return {"results": [...], "metadata": {"totalItems", "itemsPerPage", "currentPage"}} and take page and limit.

Notes

  • Region. An EU organization's key only works on api.eu.vapi.ai, and a US key only on api.vapi.ai. A key that works in the Vapi dashboard but returns 401 here usually means the connection has the other region: the user can reauthorize the connection with the right one.
  • Public key. A 401 "Invalid Key. Hot tip, you may be using the private key instead of the public key, or vice versa." on every call means the connection holds the public key; the user should reconnect with a private key.
  • Kept out of the read-only policy. The console's Read access policy leaves out call and call/{id}, because a live call returns its monitor listen and control URLs, which can listen to and steer the call; and phone-number, phone-number/{id}, v2/phone-number, and the session reads, because Twilio-imported numbers return the Twilio auth token and API secret. The recording and call-log downloads stay in.
  • Configured server headers. Assistants, squads, tools, and calls return any server.headers the user configured, which can carry an Authorization value for the user's own server.
  • Secrets that are not returned. Provider credentials added in the dashboard, and the credentials inline on an assistant, are write-only; isServerUrlSecretSet only says whether a server secret exists.
  • Calls, chats, structured-output runs, evals, and simulations bill the organization's Vapi balance; cost and costBreakdown on each call and chat show what it spent. Read-only calls are free.
  • Timestamps are ISO 8601 in UTC. Errors are {"message": "...", "error": "...", "statusCode": 400}.
  • Workflows, provider resources (such as voice pronunciation dictionaries), traffic allocations, and the OpenAI-compatible chat endpoint exist in the API but are out of scope for this reference.

Resources

On this page