Skip to content

Getting started

MCPDial runs AI phone agents. You create an agent (one company voice in one role), route a number to it for inbound calls, or place outbound calls from the dashboard, the REST API or MCP. Every call ends with a record: transcript, outcome, actions, cost and latency.

Concepts

Agent — role, persona, voice, goals, hours and allowed tools, stored as an AgentSpec. Call — one conversation, inbound, outbound or a browser test. Contact — a person with a consent state and an evidence ledger. Calendar — the native scheduler the booking tools use. MCP server — a tool source registered once and allowed per agent.

Your first call

Create an agent in the dashboard (or with POST /api/v1/agents), try it with the test-call button, set it live, then:

place a callbash
# Auth: a workspace API key (dashboard → Settings → API keys; shown once).
export MCPDIAL_API_KEY="cv_live_…"
AGENT_ID="…"   # a live agent: GET https://mcpdial.com/api/v1/agents

# Dials a real number and uses credits.
curl -s -X POST https://mcpdial.com/api/v1/calls \
  -H "Authorization: Bearer $MCPDIAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{ "agent_id": "$AGENT_ID", "to": "+41441234567", "consent": { "basis": "existing_customer" } }
EOF

# → 201 { "call_id": "…", "status": "dialing" }
#   202 { "call_id": "…", "status": "scheduled", "scheduled_for": "…" }  (outside local hours)

Errors and rate limits

Every error is JSON with a stable machine-readable code and a human message, and the HTTP status matches. Branch on the code, not the message.

errorjson
{ "error": { "code": "agent_not_found", "message": "Agent not found." } }
StatusMeaning
400Invalid body, query or path value (invalid_body, invalid_filter, invalid_spec, invalid_limit, invalid_cursor…). Fix the request; do not retry as is.
401Missing, malformed or revoked API key (missing_api_key, invalid_api_key). Deleting a workspace revokes all of its keys.
402insufficient_credits — not enough credit to reserve the call or buy the number. Top up in Billing.
403The key cannot use this endpoint (session_required: dashboard-only, such as browser test calls), or its workspace was deleted (workspace_deleted). Deleting a workspace is dashboard-only on purpose — no API key can do it.
404No such agent, call, number, booking or campaign in this workspace (agent_not_found, call_not_found, number_not_found…), or no such endpoint (not_found).
409State conflict: agent_not_live, agent_archived (restore it first), agent_in_use, slot_unavailable, slot_taken, needs_documents (error.detail.missing lists what to add), campaign_running, idempotency_conflict (an Idempotency-Key reused with other arguments).
413 / 415Document uploads only: file_too_large (over 5 MB), unsupported_media_type (send multipart/form-data).
422Understood but refused — a call blocked by the compliance gate (the body says why), or a campaign failing its pre-launch checks.
429rate_limited — 120 requests per minute per workspace. Wait for the retry-after header (seconds), then retry.
502The phone carrier failed (provider_error, dispatch_failed). Safe to retry later.

Each workspace can make 120 requests per minute across the REST API and MCP. Over that you get 429 with code rate_limited and a retry-after header in seconds.

Next