{"openapi":"3.1.0","info":{"title":"Agent Phone","version":"0.1.0","description":"Connect to Agent Phone using native MCP with browser OAuth, or the separate HTTP device authorization protocol documented at /llms.txt. The human signs in and approves access; the client stores the resulting credential. Device credentials last 30 days, are revocable, and work with these HTTP endpoints, not /mcp. Verify device setup with GET /agent/connection without placing a call. Vapi funds calls within usage limits. Never ask the user for bearer tokens, API keys, passwords, or client secrets. Do not use api.vapi.ai or the Vapi SDK for this task. No customer phone-number setup is required."},"servers":[{"url":"https://phone.vapi.ai"}],"security":[{"bearerAuth":[]}],"paths":{"/phone":{"post":{"operationId":"phone","summary":"Queue one goal-driven call","description":"Requests that appear fraudulent may be blocked before dialing. A blocked request consumes one call from the free allowance even though no call is placed. Relay the returned message; never automatically rewrite or resubmit a blocked request. Submitting a request or receiving queued status does not establish that keypad tones were sent. A native send result and remote menu acceptance are separate evidence; never infer either from the input.","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Reuse this key after a lost response. A different payload with the same key returns 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneInput"}}}},"responses":{"200":{"description":"Idempotent replay"},"202":{"description":"Durably queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneResult"}}}},"400":{"description":"Invalid input, voicemail_details_required, or invalid_callback_number"},"401":{"description":"Sign in to Agent Phone"},"403":{"description":"User, permission or destination not allowed"},"409":{"description":"Busy or request key conflict"},"429":{"description":"Allowance exhausted"},"503":{"description":"Calling paused or unconfigured"}}}},"/phone/{id}":{"get":{"operationId":"phone_status","summary":"Read an owned call result","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Status and available result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneResult"}}}},"401":{"description":"Sign in to Agent Phone"},"403":{"description":"Permission denied"},"404":{"description":"No owned call found"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"For integration developers: your OAuth client obtains and stores credentials; never ask the user to paste a bearer token or Vapi API key. Prefer connecting the agent to the MCP URL. Alternatively, agents with HTTP and secure credential storage can use device authorization documented at /llms.txt; its opaque credential is accepted by the /phone endpoints, not /mcp. For the OAuth alternative, obtain an access token from https://auth.phone.vapi.ai with resource https://phone.vapi.ai/mcp and the openid profile email offline_access scopes using authorization code with PKCE. Connecting grants both phone tools subject to ownership and call limits. Discover OAuth through https://phone.vapi.ai/.well-known/oauth-protected-resource/mcp."}},"schemas":{"PhoneInput":{"type":"object","additionalProperties":false,"required":["to","goal"],"allOf":[{"if":{"not":{"properties":{"voicemail":{"const":"off"}},"required":["voicemail"]}},"then":{"required":["callerName","callbackNumber"]}}],"description":"New-call contract. Legacy same-key retries must preserve their original payload, including omitted voicemail details.","properties":{"to":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"goal":{"type":"string","minLength":1,"maxLength":2000,"description":"Describe the user-authorized outcome to obtain. Do not claim transport actions are already completed, such as a key having been pressed or a transfer having succeeded."},"context":{"type":"string","maxLength":4000},"information":{"type":"string","maxLength":4000},"callerName":{"type":"string","minLength":1,"maxLength":120,"description":"Name of the person or organization the automated assistant is calling on behalf of (1–120 characters). Required for new calls when voicemail is on or omitted. Ask the user if missing; never invent or impersonate this identity."},"callbackNumber":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$","description":"User-supplied return number in E.164 format. Required for new calls when voicemail is on or omitted. Ask the user if missing and confirm it is a number where they can receive a callback; do not use the outbound caller ID or destination as a fallback. This field does not configure inbound routing."},"voicemail":{"type":"string","enum":["on","off"],"description":"Before submitting a new call, ask the user whether to leave a voicemail if they have not specified a preference. On leaves a brief message identifying an automated assistant, the callerName it represents, the general purpose and callbackNumber; off hangs up silently on a mailbox. New calls default to on and require callerName and callbackNumber: ask the user for missing details before submitting. Never substitute outbound caller ID or infer permission to include private background details. Previously queued calls keep their prior policy. Reuse the original input unchanged on retries."},"dtmf":{"type":"string","pattern":"^(?:auto|[0-9*#]{1,64})$","description":"Omit or use auto (recommended) for announced task-related keypad options. An exact sequence such as \"1\" constrains the allowed native keypad sequence for the whole call; it does not schedule tones on connection or mean they were already sent. Exact sequences use 1–64 digits, * or #; w/W pauses are unsupported. SIP RTP keypad events may not be audible in recordings; check native tool results and remote acceptance separately."}}},"PhoneResult":{"type":"object","required":["id","status","transcript","recordingUrl","cost","endedReason","message","pollAfterSeconds","remainingCalls"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"enum":["queued","dispatching","dispatch-uncertain","active","finalizing","ended","failed","deleted"]},"transcript":{"type":["string","null"]},"cost":{"type":["number","null"]},"endedReason":{"type":["string","null"]},"recordingUrl":{"type":["string","null"],"format":"uri","description":"Private Vapi-generated recording link. Signed links expire; read this result again to refresh an expired link. Null until available, when a recording was not produced, and for existing unrecorded calls. Treat this URL as a bearer capability: keep it private and do not publish it."},"message":{"type":["string","null"],"description":"A fixed explanation for pre-call fraud screening failure, a failed connection or clearly repeating phone menu observed in ended call artifacts. Relay it, including when a failed pre-call check has no transcript; a repeating-menu observation does not independently grade the task or prove tone delivery, and a destination not found is not evidence that the service is down. Null when no supported explanation is available. Screening failures are pre-call; other explanations analyze ended call artifacts."},"pollAfterSeconds":{"type":["integer","null"]},"remainingCalls":{"type":"integer","minimum":0,"maximum":1000}}}}}}