{"components":{"schemas":{"CallInitiated":{"properties":{"call_id":{"type":"string"},"message":{"type":"string"},"status":{"enum":["ringing"],"type":"string"},"to":{"type":"string"}},"type":"object"},"CallRequest":{"properties":{"callback_url":{"description":"Webhook URL to POST results to when call completes","type":"string"},"context":{"description":"Additional context for the AI","type":"string"},"greeting":{"description":"Opening line when callee picks up","type":"string"},"objective":{"description":"What the AI should accomplish on the call","type":"string"},"persona":{"description":"Who the AI should act as (default: professional assistant)","type":"string"},"to":{"description":"Phone number in E.164 format (+17045551234)","type":"string"},"voice":{"description":"TTS voice ID (default: Polly.Joanna-Neural)","type":"string"}},"required":["to","objective"],"type":"object"},"CallResult":{"properties":{"call_id":{"type":"string"},"completed_at":{"format":"date-time","type":"string"},"duration_seconds":{"type":"integer"},"status":{"enum":["ringing","in-progress","completed","failed","no-answer","busy"],"type":"string"},"summary":{"type":"string"},"to":{"type":"string"},"transcript":{"items":{"properties":{"speaker":{"enum":["ai","them"],"type":"string"},"text":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}},"securitySchemes":{"bearerAuth":{"description":"API key from tols.dev","scheme":"bearer","type":"http"}}},"info":{"contact":{"email":"john@tols.dev","url":"https://tols.dev"},"description":"Make real phone calls via API. Your AI agent sends an objective, we handle the call, and return a full transcript + summary. Perfect for making reservations, getting quotes, scheduling appointments, or gathering information by phone.","title":"Tols Phone Agent API","version":"1.0.0"},"openapi":"3.0.3","paths":{"/api/v1/call":{"post":{"description":"Initiate a phone call to any US number. The AI will converse naturally to accomplish your stated objective, then return a transcript and summary.","operationId":"makeCall","requestBody":{"content":{"application/json":{"example":{"greeting":"Hi, I'm calling to inquire about your roofing services.","objective":"Call Smith Roofing and ask for a quote on replacing a 2000 sq ft roof","persona":"A friendly assistant calling on behalf of a homeowner","to":"+17045551234"},"schema":{"$ref":"#/components/schemas/CallRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInitiated"}}},"description":"Call initiated"},"400":{"description":"Invalid request"},"401":{"description":"Invalid or missing API key"},"403":{"description":"Objective rejected by content filter"},"429":{"description":"Rate limit exceeded"}},"summary":"Make an outbound phone call"}},"/api/v1/call/{call_id}":{"get":{"description":"Poll this endpoint to get the transcript, summary, and status of a call.","operationId":"getCallResult","parameters":[{"in":"path","name":"call_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallResult"}}},"description":"Call result"},"404":{"description":"Call not found"}},"summary":"Get call status and results"}},"/api/v1/usage":{"get":{"operationId":"getUsage","responses":{"200":{"description":"Usage stats"}},"summary":"Get your usage statistics"}},"/api/v1/voices":{"get":{"operationId":"listVoices","responses":{"200":{"description":"Available voices"}},"security":[],"summary":"List available TTS voices"}}},"security":[{"bearerAuth":[]}],"servers":[{"description":"Production","url":"https://api.tols.dev"}]}
