{"openapi":"3.1.0","info":{"title":"Orvoca API","version":"1"},"servers":[{"url":"https://api.orvoca.com"}],"components":{"schemas":{"Me":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"email_verified":{"type":"boolean"},"phone_number":{"type":["string","null"]},"phone_number_verified":{"type":"boolean"}},"required":["id","name","email","email_verified","phone_number","phone_number_verified"]},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","viewer"]},"plan":{"type":"string"},"onboarding_step":{"type":"string","enum":["business","template","customize","number","wallet","done"]},"agency_id":{"type":["string","null"],"description":"Set on an agency's client workspace: the agency that manages it"}},"required":["id","name","role","plan","onboarding_step","agency_id"]}}},"required":["user","workspaces"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","request_id"]}},"required":["error"]},"Workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":["string","null"]},"city":{"type":["string","null"]},"timezone":{"type":"string"},"plan":{"type":"string","enum":["trial","starter","growth","business","agency"]},"balance":{"type":"object","properties":{"amount":{"type":"integer"},"currency":{"type":"string","enum":["INR"]}},"required":["amount","currency"]},"onboarding_step":{"type":"string","enum":["business","template","customize","number","wallet","done"]},"default_language":{"type":"string"},"call_languages":{"type":"array","items":{"type":"string"},"description":"Languages this workspace can use for calls"},"features":{"type":"array","items":{"type":"string"},"description":"Beta voices and features turned on for this workspace, e.g. `voice.amelia`, `beta.sms_tool`"},"retention_days":{"type":"integer"},"business_hours":{"$ref":"#/components/schemas/BusinessHours"},"gstin":{"type":["string","null"]},"legal_name":{"type":["string","null"],"description":"Name printed on invoices; the workspace name when unset"},"billing_address":{"type":["string","null"]},"billing_state_code":{"type":["string","null"],"description":"GST state code, e.g. 29 for Karnataka; taken from the GSTIN when one is set"},"billing_email":{"type":["string","null"],"description":"Receives payment emails and invoices instead of the owners"},"role":{"type":"string","enum":["owner","admin","viewer"]},"agency_id":{"type":["string","null"],"description":"The agency managing this workspace, if any"},"created_at":{"type":"string"}},"required":["id","name","category","city","timezone","plan","balance","onboarding_step","default_language","call_languages","features","retention_days","business_hours","gstin","legal_name","billing_address","billing_state_code","billing_email","role","agency_id","created_at"]},"BusinessHours":{"type":["array","null"],"items":{"type":"object","properties":{"day":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]},"open":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"close":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["day","open","close"]},"maxItems":14},"WorkspaceCreate":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"category":{"type":"string","enum":["clinic","dental","car_dealer","real_estate","restaurant","salon","gym","education","retail","hotel","home_services","agency","other"]},"city":{"type":"string","minLength":2,"maxLength":60}},"required":["name","category","city"]},"WorkspacePatch":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"category":{"type":"string","enum":["clinic","dental","car_dealer","real_estate","restaurant","salon","gym","education","retail","hotel","home_services","agency","other"]},"city":{"type":"string","minLength":2,"maxLength":60},"timezone":{"type":"string","minLength":3,"maxLength":64},"default_language":{"type":"string","enum":["hi-IN","en-IN","kn-IN","ta-IN","te-IN","ml-IN","mr-IN","bn-IN","gu-IN","pa-IN","od-IN"]},"retention_days":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[30]},{"type":"number","enum":[90]},{"type":"number","enum":[365]}]},"business_hours":{"$ref":"#/components/schemas/BusinessHours"},"gstin":{"type":["string","null"]},"legal_name":{"type":["string","null"],"minLength":2,"maxLength":120},"billing_address":{"type":["string","null"],"minLength":5,"maxLength":300},"billing_state_code":{"type":["string","null"]},"billing_email":{"type":["string","null"],"maxLength":254,"format":"email"},"onboarding_step":{"type":"string","enum":["business","template","customize","number","wallet","done"]}}},"Member":{"type":"object","properties":{"user_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","viewer"]}},"required":["user_id","name","email","role"]},"Invite":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["admin","viewer"]},"expires_at":{"type":"string"},"created_at":{"type":"string"}},"required":["id","email","role","expires_at","created_at"]},"AgentList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Agent"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]},"Agent":{"type":"object","properties":{"id":{"type":"string","example":"agt_01JF8Z6Q3X7K9M2N4P6R8T0V2W"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","live","paused"]},"template":{"type":["string","null"]},"draft":{"$ref":"#/components/schemas/AgentDraft"},"has_unpublished_changes":{"type":"boolean"},"published_version_id":{"type":["string","null"]},"outbound_number_id":{"type":["string","null"],"description":"Default number for outbound calls"},"created_at":{"type":"string"},"updated_at":{"type":["string","null"]}},"required":["id","name","status","template","draft","has_unpublished_changes","published_version_id","outbound_number_id","created_at","updated_at"]},"AgentDraft":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":40},"greeting":{"type":"string","minLength":1,"maxLength":300},"instructions":{"type":"string","minLength":1,"maxLength":8000},"language":{"type":"string","enum":["hi-IN","en-IN","kn-IN","ta-IN","te-IN","ml-IN","mr-IN","bn-IN","gu-IN","pa-IN","od-IN"],"description":"Marathi, Bengali, Gujarati, Punjabi and Odia only where `call_languages` on the workspace lists them"},"auto_switch":{"type":"boolean"},"voice_id":{"type":"string","enum":["priya","ritu","neha","pooja","simran","kavya","ishita","shreya","roopa","amelia","sophia","aditya","rahul","rohan","amit","dev","ratan","varun","manan","sumit","kabir","aayan","shubh","ashutosh","advait"]},"speed":{"type":"number","minimum":0.8,"maximum":1.3},"settings":{"$ref":"#/components/schemas/AgentSettings"},"tool_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"default":[],"description":"Tools from /v1/tools the agent may use"}},"required":["name","greeting","instructions","language","auto_switch","voice_id","speed","settings"]},"AgentSettings":{"type":"object","properties":{"interruptions":{"type":"boolean"},"max_call_minutes":{"type":"integer","minimum":1,"maximum":30},"silence_timeout_s":{"type":"integer","minimum":5,"maximum":30},"transfer_number":{"type":["string","null"],"pattern":"^\\+91\\d{10}$"},"record_calls":{"type":"boolean"},"ai_disclosure":{"type":"boolean"},"ai_disclosure_text":{"type":"string","minLength":1,"maxLength":200},"end_call_phrases":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":10},"voicemail_message":{"type":["string","null"],"minLength":1,"maxLength":300}},"required":["interruptions","max_call_minutes","silence_timeout_s","transfer_number","record_calls","ai_disclosure","ai_disclosure_text","end_call_phrases"]},"AgentCreate":{"allOf":[{"$ref":"#/components/schemas/AgentDraftPatch"},{"type":"object","properties":{"template":{"type":"string","enum":["receptionist","appointment_booking","lead_qualifier","order_status","payment_reminder","appointment_reminder","custom"],"default":"receptionist"}},"required":["name"]}]},"AgentDraftPatch":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":40},"greeting":{"type":"string","minLength":1,"maxLength":300},"instructions":{"type":"string","minLength":1,"maxLength":8000},"language":{"type":"string","enum":["hi-IN","en-IN","kn-IN","ta-IN","te-IN","ml-IN","mr-IN","bn-IN","gu-IN","pa-IN","od-IN"],"description":"Marathi, Bengali, Gujarati, Punjabi and Odia only where `call_languages` on the workspace lists them"},"auto_switch":{"type":"boolean"},"voice_id":{"type":"string","enum":["priya","ritu","neha","pooja","simran","kavya","ishita","shreya","roopa","amelia","sophia","aditya","rahul","rohan","amit","dev","ratan","varun","manan","sumit","kabir","aayan","shubh","ashutosh","advait"]},"speed":{"type":"number","minimum":0.8,"maximum":1.3},"settings":{"type":"object","properties":{"interruptions":{"type":"boolean"},"max_call_minutes":{"type":"integer","minimum":1,"maximum":30},"silence_timeout_s":{"type":"integer","minimum":5,"maximum":30},"transfer_number":{"type":["string","null"],"pattern":"^\\+91\\d{10}$"},"record_calls":{"type":"boolean"},"ai_disclosure":{"type":"boolean"},"ai_disclosure_text":{"type":"string","minLength":1,"maxLength":200},"end_call_phrases":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":10},"voicemail_message":{"type":["string","null"],"minLength":1,"maxLength":300}}},"tool_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"default":[],"description":"Tools from /v1/tools the agent may use"}}},"ImprovedInstructions":{"type":"object","properties":{"instructions":{"type":"string"},"changes":{"type":"array","items":{"type":"string"}}},"required":["instructions","changes"]},"WrittenAgent":{"type":"object","properties":{"greeting":{"type":"string"},"instructions":{"type":"string"}},"required":["greeting","instructions"]},"ApiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"display_prefix":{"type":"string"},"last_used_at":{"type":["string","null"]},"last_used_ip":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","name","mode","display_prefix","last_used_at","last_used_ip","created_at"]},"TelephonyConnection":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","enum":["plivo","vobiz","sip"]},"owner":{"type":"string","enum":["orvoca","customer"]},"name":{"type":"string"},"status":{"type":"string","enum":["pending","active","error"]},"credentials_hint":{"type":["string","null"]},"last_error":{"type":["string","null"]},"last_tested_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","provider","owner","name","status","credentials_hint","last_error","last_tested_at","created_at"]},"TelephonyConnectionCreate":{"type":"object","properties":{"provider":{"type":"string","enum":["plivo","vobiz","sip"]},"owner":{"type":"string","enum":["orvoca","customer"],"default":"customer"},"name":{"type":"string","minLength":1,"maxLength":60},"credentials":{"type":"object","additionalProperties":{}}},"required":["provider"]},"SharedNumber":{"type":"object","properties":{"number":{"type":["string","null"]},"callers":{"type":"array","items":{"type":"string"},"description":"Verified mobiles of this workspace's members: calls from these reach your agent"}},"required":["number","callers"]},"PhoneNumber":{"type":"object","properties":{"id":{"type":"string"},"e164":{"type":"string"},"city":{"type":["string","null"]},"connection":{"type":["object","null"],"properties":{"id":{"type":"string"},"provider":{"type":"string","enum":["plivo","vobiz","sip"]},"owner":{"type":"string","enum":["orvoca","customer"]},"name":{"type":"string"}},"required":["id","provider","owner","name"]},"agent_id":{"type":["string","null"]},"inbound_enabled":{"type":"boolean"},"outbound_enabled":{"type":"boolean"},"monthly":{"type":"object","properties":{"amount":{"type":"integer"},"currency":{"type":"string","enum":["INR"]}},"required":["amount","currency"]},"renews_at":{"type":["string","null"]},"paused":{"type":"boolean","description":"Outside the plan after a downgrade or cancellation: takes no calls and costs nothing. Switch it back on with POST /v1/numbers/{id}/resume."},"release_at":{"type":["string","null"],"description":"When a paused number is released, unless switched back on"},"forwarding":{"type":"object","properties":{"testing_since":{"type":["string","null"],"description":"A forwarding test is waiting for the call to come back"},"verified_at":{"type":["string","null"],"description":"Last time a forwarding test reached this number"}},"required":["testing_since","verified_at"],"description":"Call forwarding from the business’s own number (POST /v1/numbers/{id}/forwarding-test)"}},"required":["id","e164","city","connection","agent_id","inbound_enabled","outbound_enabled","monthly","renews_at","paused","release_at","forwarding"]},"AvailableNumber":{"type":"object","properties":{"e164":{"type":"string"},"city":{"type":["string","null"]},"region":{"type":["string","null"]},"type":{"type":["string","null"],"description":"local, mobile or tollfree, where the provider says"},"restriction":{"type":["string","null"],"description":"The provider's note on what renting it needs, e.g. business address proof"},"monthly":{"type":["object","null"],"properties":{"amount":{"type":"integer"},"currency":{"type":"string","enum":["INR"]}},"required":["amount","currency"],"description":"What Orvoca charges for it (0 inside the plan); null on your own account, where your provider bills you"}},"required":["e164","city","region","type","restriction","monthly"]},"CallLog":{"type":"object","properties":{"id":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"from":{"type":"string"},"to":{"type":"string"},"status":{"type":"string","enum":["queued","ringing","live","ended","failed"]},"outcome":{"type":["string","null"],"enum":["booked","lead","answered","transferred","message","missed","voicemail","not_interested",null]},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","name"]},"provider":{"type":["string","null"],"enum":["plivo","vobiz","sip",null],"description":"Which provider carried the call"},"provider_label":{"type":["string","null"]},"connection":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","name"]},"started_at":{"type":"string"},"ended_at":{"type":["string","null"]},"duration_s":{"type":["number","null"]},"billed_blocks":{"type":["number","null"],"description":"30-second blocks billed"},"cost":{"type":["object","null"],"properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["INR"]}},"required":["amount","currency"],"description":"Paise"},"hangup_cause":{"type":["string","null"]},"language":{"type":["string","null"]},"sentiment":{"type":["string","null"]},"campaign_id":{"type":["string","null"]},"summary":{"type":["string","null"],"description":"One or two sentences, once the call is written up"},"test":{"type":"boolean","description":"Placed with a test API key. Test keys see only test calls; everyone else never sees them"},"channel":{"type":"string","enum":["phone","browser"],"description":"browser: a free test call from the dashboard's microphone"}},"required":["id","direction","from","to","status","outcome","agent","provider","provider_label","connection","started_at","ended_at","duration_s","billed_blocks","cost","hangup_cause","language","sentiment","campaign_id","summary","test","channel"]},"CallDetail":{"allOf":[{"$ref":"#/components/schemas/CallLog"},{"type":"object","properties":{"summary":{"type":["string","null"]},"provider_call_id":{"type":["string","null"]},"extracted":{},"actions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"ok":{"type":"boolean"},"at":{"type":["string","null"]}},"required":["name","ok","at"]},"description":"Tools the agent used during the call, in order"},"has_recording":{"type":"boolean"},"has_returned_recording":{"type":"boolean","description":"The caller came back to the agent after an unanswered transfer, and that part was recorded too."},"payment_links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amount_paise":{"type":"integer"},"amount_paid_paise":{"type":"integer"},"purpose":{"type":"string"},"status":{"type":"string","enum":["created","partially_paid","paid","expired","cancelled"]},"url":{"type":"string"},"created_at":{"type":"string"},"paid_at":{"type":["string","null"]}},"required":["id","amount_paise","amount_paid_paise","purpose","status","url","created_at","paid_at"]},"description":"Razorpay payment links the agent sent during the call"},"transcript":{"type":"array","items":{"type":"object","properties":{"seq":{"type":"number"},"speaker":{"type":"string","enum":["caller","agent","tool"]},"text":{"type":"string"},"at_ms":{"type":"number","description":"From the start of the call"},"latency_ms":{"type":["number","null"]}},"required":["seq","speaker","text","at_ms","latency_ms"]}}},"required":["provider_call_id","actions","has_recording","has_returned_recording","payment_links","transcript"]}]},"CallTranslation":{"type":"object","properties":{"turns":{"type":"array","items":{"type":"object","properties":{"seq":{"type":"integer"},"text":{"type":"string"}},"required":["seq","text"]}}},"required":["turns"]},"RecordingLink":{"type":"object","properties":{"url":{"type":"string"},"expires_at":{"type":"string"}},"required":["url","expires_at"]},"ShareLink":{"type":"object","properties":{"url":{"type":"string"},"expires_at":{"type":"string"}},"required":["url","expires_at"]},"CampaignWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"minItems":1,"maxItems":7}},"required":["start","end","days"]},"Campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"agent_id":{"type":"string"},"from_number_id":{"type":"string"},"type":{"type":"string","enum":["service","promotional"]},"window":{"$ref":"#/components/schemas/CampaignWindow"},"concurrency":{"type":"number"},"max_retries":{"type":"number"},"retry_gap_hours":{"type":"number"},"status":{"type":"string","enum":["review","running","paused","completed","cancelled"]},"paused_reason":{"type":["string","null"]},"counts":{"type":"object","properties":{"total":{"type":"number"},"pending":{"type":"number"},"calling":{"type":"number"},"done":{"type":"number"},"failed":{"type":"number"},"skipped":{"type":"number"},"booked":{"type":"number"}},"required":["total","pending","calling","done","failed","skipped","booked"]},"created_at":{"type":"string"},"completed_at":{"type":["string","null"]}},"required":["id","name","agent_id","from_number_id","type","window","concurrency","max_retries","retry_gap_hours","status","paused_reason","counts","created_at","completed_at"]},"CampaignContact":{"type":"object","properties":{"id":{"type":"string"},"row":{"type":"number"},"phone":{"type":"string"},"variables":{"type":["object","null"],"additionalProperties":{"type":"string"}},"status":{"type":"string","enum":["pending","calling","done","failed","skipped"]},"attempts":{"type":"number"},"result":{"type":["string","null"]},"call_id":{"type":["string","null"]},"next_attempt_at":{"type":["string","null"]}},"required":["id","row","phone","variables","status","attempts","result","call_id","next_attempt_at"]},"DoNotCallEntry":{"type":"object","properties":{"id":{"type":"string"},"phone":{"type":"string"},"reason":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","phone","reason","created_at"]},"OutboundRegistration":{"type":"object","properties":{"number_140":{"type":["string","null"]},"number_1600":{"type":["string","null"]},"dlt_entity_id":{"type":["string","null"]},"status":{"type":"string","enum":["none","pending","verified","rejected"]},"note":{"type":["string","null"],"description":"Why it was rejected"},"verified_at":{"type":["string","null"]}},"required":["number_140","number_1600","dlt_entity_id","status","note","verified_at"]},"PrivacyRequest":{"type":"object","properties":{"id":{"type":"string"},"phone":{"type":"string"},"type":{"type":"string","enum":["export","delete"]},"status":{"type":"string","enum":["pending","done"]},"calls":{"type":"number","description":"Calls found for the number"},"due_at":{"type":"string"},"created_at":{"type":"string"},"completed_at":{"type":["string","null"]}},"required":["id","phone","type","status","calls","due_at","created_at","completed_at"]},"Wallet":{"type":"object","properties":{"balance":{"$ref":"#/components/schemas/Money"},"low_balance":{"type":"boolean","description":"Below ₹200"},"can_take_calls":{"type":"boolean","description":"False when plan minutes and wallet are both used up"},"paid_by_agency":{"type":"boolean","description":"An agency's client: calls and numbers are paid from the agency's wallet"},"plan":{"type":"object","properties":{"id":{"type":"string","enum":["trial","starter","growth","business","agency"]},"fee":{"allOf":[{"$ref":"#/components/schemas/Money"},{"description":"Monthly fee, taken from the wallet on each renewal (excl. GST)"}]},"included_minutes":{"type":"number"},"used_minutes":{"type":"number"},"left_minutes":{"type":"number"},"extra_minute":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"],"description":"Rate after the included minutes; null on the trial"}]},"period_start":{"type":["string","null"]},"renews_at":{"type":["string","null"]},"pending_change":{"type":["object","null"],"properties":{"plan":{"type":"string","enum":["trial","starter","growth","business","agency"]},"on":{"type":"string"}},"required":["plan","on"],"description":"A downgrade, or 'trial' for a cancellation, taking effect on the renewal date"},"fee_due_since":{"type":["string","null"],"description":"The renewal fee couldn't be taken; the plan is cancelled 7 days later unless the wallet is topped up"}},"required":["id","fee","included_minutes","used_minutes","left_minutes","extra_minute","period_start","renews_at","pending_change","fee_due_since"]},"auto_topup":{"$ref":"#/components/schemas/AutoTopup"},"recent":{"type":"array","items":{"$ref":"#/components/schemas/LedgerEntry"}}},"required":["balance","low_balance","can_take_calls","paid_by_agency","plan","auto_topup","recent"]},"Money":{"type":"object","properties":{"amount":{"type":"integer"},"currency":{"type":"string","enum":["INR"]}},"required":["amount","currency"]},"AutoTopup":{"type":"object","properties":{"status":{"type":"string","enum":["off","pending","active","paused"],"description":"pending: waiting for the first payment to authorise the mandate. paused: paused from the bank or UPI app"},"amount":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"],"description":"Added each time, plus 18% GST"}]},"below":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"],"description":"Charges when the balance drops below this"}]},"method":{"type":["string","null"],"enum":["card","upi",null]}},"required":["status","amount","below","method"]},"LedgerEntry":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["topup","plan_fee","plan_credit","call_charge","number_fee","refund","adjustment"]},"amount":{"allOf":[{"$ref":"#/components/schemas/Money"},{"description":"Credits positive, charges negative"}]},"description":{"type":["string","null"]},"ref_id":{"type":["string","null"],"description":"The call, top-up or number it was for"},"created_at":{"type":"string"}},"required":["id","type","amount","description","ref_id","created_at"]},"PlanChange":{"type":"object","properties":{"kind":{"type":"string","enum":["upgrade","downgrade","cancel","keep"],"description":"upgrade: now, fee charged in full and the unused part of the current plan credited. downgrade and cancel: on the renewal date. keep: undoes a scheduled change"},"plan":{"type":"string","enum":["trial","starter","growth","business","agency"]},"charge":{"allOf":[{"$ref":"#/components/schemas/Money"},{"description":"Taken from the wallet now"}]},"credit":{"allOf":[{"$ref":"#/components/schemas/Money"},{"description":"Unused part of the current plan, credited now"}]},"effective_at":{"type":"string"}},"required":["kind","plan","charge","credit","effective_at"]},"Statement":{"type":"object","properties":{"month":{"type":"string"},"opening_balance":{"$ref":"#/components/schemas/Money"},"closing_balance":{"$ref":"#/components/schemas/Money"},"totals":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["topup","plan_fee","plan_credit","call_charge","number_fee","refund","adjustment"]},"amount":{"$ref":"#/components/schemas/Money"},"entries":{"type":"integer"}},"required":["type","amount","entries"]}},"entries":{"type":"integer"}},"required":["month","opening_balance","closing_balance","totals","entries"]},"Topup":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["created","paid","failed"]},"amount":{"allOf":[{"$ref":"#/components/schemas/Money"},{"description":"Credited to the wallet"}]},"gst":{"allOf":[{"$ref":"#/components/schemas/Money"},{"description":"18% GST, paid on top"}]},"total":{"allOf":[{"$ref":"#/components/schemas/Money"},{"description":"What the customer pays"}]},"razorpay":{"type":"object","properties":{"key_id":{"type":"string"},"order_id":{"type":"string"}},"required":["key_id","order_id"],"description":"Pass to Razorpay Checkout"},"failure_reason":{"type":["string","null"]},"created_at":{"type":"string"},"paid_at":{"type":["string","null"]}},"required":["id","status","amount","gst","total","razorpay","failure_reason","created_at","paid_at"]},"Invoice":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string","example":"ORV/26-27/000042"},"topup_id":{"type":"string"},"issued_at":{"type":"string"},"place_of_supply":{"type":"string","description":"GST state, e.g. \"Karnataka (29)\""},"taxable_paise":{"type":"integer"},"cgst_paise":{"type":"integer"},"sgst_paise":{"type":"integer"},"igst_paise":{"type":"integer"},"total_paise":{"type":"integer"}},"required":["id","number","topup_id","issued_at","place_of_supply","taxable_paise","cgst_paise","sgst_paise","igst_paise","total_paise"]},"CreditNote":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string","example":"ORV-CN/26-27/000004"},"invoice_number":{"type":"string"},"issued_at":{"type":"string"},"taxable_paise":{"type":"integer"},"cgst_paise":{"type":"integer"},"sgst_paise":{"type":"integer"},"igst_paise":{"type":"integer"},"total_paise":{"type":"integer"},"reason":{"type":"string"}},"required":["id","number","invoice_number","issued_at","taxable_paise","cgst_paise","sgst_paise","igst_paise","total_paise","reason"]},"KnowledgeSource":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["file","url","qa"]},"title":{"type":"string"},"answer":{"type":["string","null"]},"url":{"type":["string","null"]},"agent_id":{"type":["string","null"],"description":"null = every agent in the workspace"},"status":{"type":"string","enum":["processing","ready","failed"]},"error":{"type":["string","null"]},"pages_done":{"type":["number","null"],"description":"Websites: pages read so far (of at most 50)"},"chunk_count":{"type":"number"},"size_bytes":{"type":["number","null"]},"refreshed_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","type","title","answer","url","agent_id","status","error","pages_done","chunk_count","size_bytes","refreshed_at","created_at"]},"NewKnowledgeSource":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string","maxLength":2000},"agent_id":{"type":["string","null"],"description":"Limit to one agent; omit or null for every agent"}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["qa"]},"question":{"type":"string","minLength":1,"maxLength":300},"answer":{"type":"string","minLength":1,"maxLength":2000},"agent_id":{"type":["string","null"],"description":"Limit to one agent; omit or null for every agent"}},"required":["type","question","answer"]}]},"Tool":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["calendar","whatsapp","sms","transfer","email","webhook","http","razorpay","zoho","hubspot"]},"name":{"type":"string","description":"Function name the agent calls, e.g. check_order"},"description":{"type":["string","null"]},"config":{},"secret_headers":{"type":"array","items":{"type":"string"},"description":"Names of the stored headers; values are never returned"},"webhook_url":{"type":["string","null"],"description":"Razorpay tools: add this webhook in your Razorpay dashboard (payment_link events) with the same secret"},"status":{"type":"string","enum":["active","disconnected"]},"tested_at":{"type":["string","null"]},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]}},"required":["id","kind","name","description","secret_headers","webhook_url","status","tested_at","created_at","updated_at"]},"EmbeddedSignup":{"type":"object","properties":{"code":{"type":"string","minLength":10,"maxLength":2000},"phone_number_id":{"type":"string","pattern":"^\\d{5,30}$"},"waba_id":{"type":"string","pattern":"^\\d{5,30}$"}},"required":["code","phone_number_id","waba_id"]},"NewTool":{"type":"object","properties":{"kind":{"type":"string","enum":["http"]},"name":{"type":"string"},"description":{"type":"string","minLength":10,"maxLength":500,"description":"When the agent should use it, in plain words"},"config":{"type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"url":{"type":"string","maxLength":2000},"body":{},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string","minLength":1,"maxLength":200},"required":{"type":"boolean","default":true}},"required":["name","type","description"]},"maxItems":10,"default":[]}},"required":["method","url"]},"secrets":{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string","maxLength":2000},"default":{}}}}},"required":["kind","name","description","config"]},"NewEmailSummary":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/EmailSummaryConfig"}},"required":["config"]},"EmailSummaryConfig":{"type":"object","properties":{"recipients":{"type":"array","items":{"type":"string","format":"email"},"minItems":1,"maxItems":5},"only_actionable":{"type":"boolean","default":false}},"required":["recipients"]},"NewWhatsApp":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/WhatsAppConfig"}}},"WhatsAppConfig":{"type":"object","properties":{"sender":{"type":"string","enum":["shared","own"],"default":"shared"},"phone_number_id":{"type":["string","null"],"maxLength":100,"default":null},"booking_confirmations":{"type":"boolean","default":true}}},"NewRazorpay":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/RazorpayConfig"},"secrets":{"$ref":"#/components/schemas/RazorpaySecrets"}},"required":["config","secrets"]},"RazorpayConfig":{"type":"object","properties":{"key_id":{"type":"string","pattern":"^rzp_(test|live)_[A-Za-z0-9]{6,40}$"},"max_amount":{"type":"integer","minimum":1,"maximum":500000,"default":50000},"expire_hours":{"type":"integer","minimum":1,"maximum":720,"default":48},"send_on":{"type":"string","enum":["whatsapp","sms"],"default":"whatsapp"}},"required":["key_id"]},"RazorpaySecrets":{"type":"object","properties":{"key_secret":{"type":"string","minLength":10,"maxLength":100},"webhook_secret":{"type":"string","minLength":8,"maxLength":200}},"required":["key_secret"]},"RazorpayKeys":{"type":"object","properties":{"key_id":{"type":"string","pattern":"^rzp_(test|live)_[A-Za-z0-9]{6,40}$"},"key_secret":{"type":"string","minLength":10,"maxLength":100},"webhook_secret":{"type":["string","null"],"minLength":8,"maxLength":200}}},"ToolPatch":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","minLength":10,"maxLength":500,"description":"When the agent should use it, in plain words"},"config":{"type":"object","additionalProperties":{},"description":"HttpActionConfig for `http` tools, CalendarConfig for `calendar`"},"secrets":{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string","maxLength":2000},"default":{}}}}}},"ToolTestResult":{"type":"object","properties":{"ok":{"type":"boolean"},"result":{},"error":{"type":"string"},"duration_ms":{"type":"number"}},"required":["ok","duration_ms"]},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["call.started","call.ended","call.transferred","booking.created","booking.changed","campaign.completed","wallet.low_balance","wallet.empty"]}},"status":{"type":"string","enum":["active","disabled"]},"created_at":{"type":"string"}},"required":["id","url","events","status","created_at"]},"WebhookWithSecret":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","properties":{"secret":{"type":"string","description":"Shown only now. Verify `Orvoca-Signature` with it."}},"required":["secret"]}]},"NewWebhook":{"type":"object","properties":{"url":{"type":"string","maxLength":2000},"events":{"type":"array","items":{"type":"string","enum":["call.started","call.ended","call.transferred","booking.created","booking.changed","campaign.completed","wallet.low_balance","wallet.empty"]},"minItems":1,"maxItems":8}},"required":["url","events"]},"WebhookPatch":{"type":"object","properties":{"url":{"type":"string","maxLength":2000},"events":{"type":"array","items":{"type":"string","enum":["call.started","call.ended","call.transferred","booking.created","booking.changed","campaign.completed","wallet.low_balance","wallet.empty"]},"minItems":1,"maxItems":8},"status":{"type":"string","enum":["active","disabled"]}}},"WebhookTestResult":{"type":"object","properties":{"ok":{"type":"boolean"},"response_code":{"type":["number","null"]},"error":{"type":["string","null"]}},"required":["ok","response_code","error"]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","delivered","failed"]},"attempts":{"type":"number"},"response_code":{"type":["number","null"]},"error":{"type":["string","null"]},"next_attempt_at":{"type":["string","null"]},"created_at":{"type":"string"},"delivered_at":{"type":["string","null"]}},"required":["id","event_id","event_type","status","attempts","response_code","error","next_attempt_at","created_at","delivered_at"]},"Message":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string","enum":["whatsapp","sms","email"]},"call_id":{"type":["string","null"]},"to":{"type":"string"},"template":{"type":"string"},"language":{"type":"string"},"text":{"type":"string","description":"The message as sent (English form of the template)"},"status":{"type":"string","enum":["queued","sent","delivered","read","failed"]},"error":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","channel","call_id","to","template","language","text","status","error","created_at"]},"Notification":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"path":{"type":["string","null"],"description":"Where in the dashboard it points, e.g. /billing"},"created_at":{"type":"string"},"read_at":{"type":["string","null"]}},"required":["id","kind","title","body","path","created_at","read_at"]},"NotificationSetting":{"type":"object","properties":{"kind":{"type":"string"},"label":{"type":"string"},"channels":{"type":"array","items":{"type":"string","enum":["email","whatsapp","sms","in_app"]},"description":"Where it goes now"},"available":{"type":"array","items":{"type":"string","enum":["email","whatsapp","sms","in_app"]},"description":"Channels this kind can use"}},"required":["kind","label","channels","available"]},"CallStats":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"timezone":{"type":"string"},"totals":{"type":"object","properties":{"calls":{"type":"integer"},"answered":{"type":"integer","description":"Calls with any outcome except missed"},"missed":{"type":"integer"},"bookings":{"type":"integer"},"talk_s":{"type":"integer"},"cost":{"type":"object","properties":{"amount":{"type":"integer"},"currency":{"type":"string","enum":["INR"]}},"required":["amount","currency"]}},"required":["calls","answered","missed","bookings","talk_s","cost"]},"outcomes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"calls":{"type":"integer"}},"required":["key","calls"]},"description":"Ended calls by outcome; \"pending\" until written up"},"languages":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"calls":{"type":"integer"}},"required":["key","calls"]}},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"calls":{"type":"integer"},"bookings":{"type":"integer"}},"required":["date","calls","bookings"]}},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer"},"hour":{"type":"integer"},"calls":{"type":"integer"}},"required":["weekday","hour","calls"]},"description":"weekday 0 = Sunday; local hour 0–23. Only buckets with calls."}},"required":["from","to","timezone","totals","outcomes","languages","days","hours"]},"Brand":{"type":"object","properties":{"product_name":{"type":["string","null"],"description":"Shown instead of \"Orvoca\", e.g. \"VoiceDesk\""},"primary_color":{"type":["string","null"],"description":"Hex colour for buttons and links, e.g. #1d4ed8"},"logo_url":{"type":["string","null"]},"hide_powered_by":{"type":"boolean"},"support_email":{"type":["string","null"],"description":"Where clients write for help"}},"required":["product_name","primary_color","logo_url","hide_powered_by","support_email"]},"BrandInput":{"type":"object","properties":{"product_name":{"type":["string","null"],"minLength":2,"maxLength":40},"primary_color":{"type":["string","null"],"pattern":"^#[0-9a-fA-F]{6}$"},"hide_powered_by":{"type":"boolean"},"support_email":{"type":["string","null"],"maxLength":120,"format":"email"}}},"CustomDomain":{"type":"object","properties":{"domain":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["pending","active","failed",null]},"cname_target":{"type":"string","description":"Point a CNAME record for the domain here"},"errors":{"type":"array","items":{"type":"string"}}},"required":["domain","status","cname_target","errors"]},"CustomDomainInput":{"type":"object","properties":{"domain":{"type":"string","maxLength":253}},"required":["domain"]},"AgencyOverview":{"type":"object","properties":{"month":{"type":"string","example":"2026-12"},"clients":{"type":"array","items":{"$ref":"#/components/schemas/AgencyClient"}},"totals":{"type":"object","properties":{"price":{"$ref":"#/components/schemas/Money"},"cost":{"$ref":"#/components/schemas/Money"},"margin":{"$ref":"#/components/schemas/Money"},"minutes":{"type":"number"},"calls":{"type":"integer"}},"required":["price","cost","margin","minutes","calls"]}},"required":["month","clients","totals"]},"AgencyClient":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":["string","null"]},"city":{"type":["string","null"]},"status":{"type":"string","enum":["active","suspended"]},"onboarding_step":{"type":"string"},"plan_name":{"type":["string","null"],"description":"The agency's own name for what this client buys"},"price":{"allOf":[{"$ref":"#/components/schemas/Money"},{"description":"What the agency charges this client a month (excl. GST)"}]},"usage":{"type":"object","properties":{"calls":{"type":"integer"},"minutes":{"type":"number","description":"Billed minutes (30-second blocks)"},"numbers":{"type":"integer"},"cost":{"allOf":[{"$ref":"#/components/schemas/Money"},{"description":"What Orvoca charged the agency's wallet for this client this month"}]}},"required":["calls","minutes","numbers","cost"]},"margin":{"allOf":[{"$ref":"#/components/schemas/Money"},{"description":"price − cost"}]},"created_at":{"type":"string"}},"required":["id","name","category","city","status","onboarding_step","plan_name","price","usage","margin","created_at"]},"AgencyClientCreate":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"category":{"type":"string","enum":["clinic","dental","car_dealer","real_estate","restaurant","salon","gym","education","retail","hotel","home_services","agency","other"]},"city":{"type":"string","minLength":2,"maxLength":60},"price":{"type":"integer","minimum":0,"maximum":100000000,"default":0,"description":"Paise a month, excl. GST"},"plan_name":{"type":["string","null"],"maxLength":40}},"required":["name","category","city"]},"AgencyClientPatch":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"price":{"type":"integer","minimum":0,"maximum":100000000},"plan_name":{"type":["string","null"],"maxLength":40}}}},"parameters":{},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key from Settings → API keys: `Authorization: Bearer orv_live_…`"}}},"paths":{"/v1/support":{"post":{"summary":"Ask Orvoca support for help","description":"From a signed-in person in the dashboard; API keys are refused. Answered by email.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":4000},"phone":{"anyOf":[{"type":"string","maxLength":20,"pattern":"^[+\\d][\\d\\s-]*$"},{"type":"string","enum":[""]}]}},"required":["message"]}}}},"responses":{"202":{"description":"Request received","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"type":"boolean","enum":[true]}},"required":["received"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Support"]}},"/v1/workspace":{"get":{"summary":"The current workspace","responses":{"200":{"description":"Workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Workspace"]},"patch":{"summary":"Update workspace settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspacePatch"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Workspace"]}},"/v1/workspace/members":{"get":{"summary":"Team members","responses":{"200":{"description":"Members","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Workspace"]}},"/v1/workspace/members/{userId}":{"patch":{"summary":"Change a member's role (owner only)","parameters":[{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","viewer"]}},"required":["role"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string"},"role":{"type":"string","enum":["owner","admin","viewer"]}},"required":["user_id","role"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Workspace"]},"delete":{"summary":"Remove a member (owner only)","parameters":[{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"Removed"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Workspace"]}},"/v1/workspace/invites":{"get":{"summary":"Pending invites","responses":{"200":{"description":"Invites","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invite"}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Workspace"]},"post":{"summary":"Invite a teammate","description":"Emails a link valid for 7 days. Inviting the same email again replaces the earlier link.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"role":{"type":"string","enum":["admin","viewer"]}},"required":["email","role"]}}}},"responses":{"201":{"description":"Sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invite"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already a member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Workspace"]}},"/v1/workspace/invites/{id}":{"delete":{"summary":"Cancel an invite","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Cancelled"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Workspace"]}},"/v1/agents/{id}/test-transfer":{"post":{"summary":"Ring the transfer number","description":"Places a short test call to the agent’s transfer number (from its draft, or `to`), so you can check it rings the right phone. The phone hears a recorded line, not the agent. Counts against the daily test-call limit.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","maxLength":20}}}}}},"responses":{"202":{"description":"Ringing","content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"},"from":{"type":"string"}},"required":["to","from"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/agents/voice-preview":{"post":{"summary":"Hear a voice sample","description":"An MP3 of `text` (the greeting, say) in a voice, language and speed, exactly as a call would sound. Without `text`, a short sample line in the language. Samples already made replay free; up to 100 new ones a day.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"voice_id":{"type":"string","enum":["priya","ritu","neha","pooja","simran","kavya","ishita","shreya","roopa","amelia","sophia","aditya","rahul","rohan","amit","dev","ratan","varun","manan","sumit","kabir","aayan","shubh","ashutosh","advait"]},"language":{"type":"string","enum":["hi-IN","en-IN","kn-IN","ta-IN","te-IN","ml-IN","mr-IN","bn-IN","gu-IN","pa-IN","od-IN"]},"speed":{"type":"number","minimum":0.8,"maximum":1.3,"default":1},"text":{"type":"string","maxLength":300}},"required":["voice_id","language"]}}}},"responses":{"200":{"description":"The sample","content":{"audio/mpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/agents":{"get":{"summary":"List agents","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Agents, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]},"post":{"summary":"Create an agent from a template","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/agents/{id}":{"get":{"summary":"Get an agent","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]},"patch":{"summary":"Update the draft","description":"Changes stay in the draft until the agent is published.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDraftPatch"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]},"delete":{"summary":"Delete an agent","description":"Recoverable for 30 days. Numbers assigned to it stop answering with it.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/agents/{id}/improve":{"post":{"summary":"Improve the instructions with AI","description":"Claude rewrites the instructions (the draft's, or the text sent) so they are clear and complete on a phone call, keeping every fact. Nothing is saved: update the draft with the result if you like it. Up to 50 a day per workspace.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instructions":{"type":"string","minLength":1,"maxLength":8000},"goal":{"type":"string","maxLength":500,"description":"What to improve, e.g. \"Handle Hindi callers better\""}}}}}},"responses":{"200":{"description":"The suggested instructions and what changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImprovedInstructions"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/agents/{id}/write":{"post":{"summary":"Write the agent from a description","description":"For the Custom template: Claude writes a greeting and instructions from a paragraph about what the agent should do. Nothing is saved: update the draft with the result. Counts towards the 50 AI requests a day per workspace.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":20,"maxLength":1500,"description":"One paragraph: what the agent should do, for whom, and what to avoid"}},"required":["description"]}}}},"responses":{"200":{"description":"The suggested greeting and instructions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WrittenAgent"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/agents/{id}/publish":{"post":{"summary":"Publish the draft as a new version","description":"Live calls keep the version they started on.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Published","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/agents/{id}/pause":{"post":{"summary":"Pause an agent","description":"It stops answering new calls at once; calls in progress finish. Its numbers ring out unanswered.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Paused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/agents/{id}/resume":{"post":{"summary":"Resume a paused agent","description":"It answers again with its published version.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Live","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/agents/{id}/duplicate":{"post":{"summary":"Duplicate an agent","description":"A new draft with the same settings, named \"… (copy)\". Numbers are not copied.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/agents/{id}/outbound-number":{"put":{"summary":"Set the agent's outbound number","description":"The number the agent calls from when `POST /v1/calls` gives no `from_number_id`. Takes effect at once (not part of the draft). `null` clears it.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number_id":{"type":["string","null"]}},"required":["number_id"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/api-keys":{"get":{"summary":"List API keys","responses":{"200":{"description":"Keys","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["API keys"]},"post":{"summary":"Create an API key","description":"The `key` is shown only in this response; store it safely.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"mode":{"type":"string","enum":["live","test"],"default":"test"}},"required":["name"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiKey"},{"type":"object","properties":{"key":{"type":"string"}},"required":["key"]}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["API keys"]}},"/v1/api-keys/{id}":{"delete":{"summary":"Revoke an API key","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoked"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["API keys"]}},"/v1/telephony/connections":{"get":{"summary":"List telephony connections","responses":{"200":{"description":"Connections","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TelephonyConnection"}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Telephony"]},"post":{"summary":"Connect a telephony provider","description":"`owner: customer` connects the workspace's own provider account: credentials are checked with the provider, then stored encrypted and never returned. `owner: orvoca` uses numbers rented from Orvoca.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelephonyConnectionCreate"}}}},"responses":{"201":{"description":"Connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelephonyConnection"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Telephony"]}},"/v1/telephony/connections/{id}":{"patch":{"summary":"Rename a connection or replace its credentials","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"credentials":{"type":"object","additionalProperties":{}}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelephonyConnection"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Telephony"]},"delete":{"summary":"Disconnect a provider","description":"Refused while numbers still use the connection: release or move them first.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Disconnected"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Numbers still attached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Telephony"]}},"/v1/telephony/connections/{id}/test":{"post":{"summary":"Test a connection","description":"Checks the credentials with the provider. With `to`, also places a short test call from `from_number_id` (or the first outbound-enabled number on this connection).","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"from_number_id":{"type":"string"}}}}}},"responses":{"200":{"description":"Test result (status and last_error say how it went)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TelephonyConnection"},{"type":"object","properties":{"test_call":{"type":["object","null"],"properties":{"request_id":{"type":"string"}},"required":["request_id"]}},"required":["test_call"]}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Telephony"]}},"/v1/numbers/shared":{"get":{"summary":"The shared demo number for free-trial workspaces","description":"Free-trial workspaces have no number of their own (Detailed specs section 2). Call the shared demo number from a team member's verified mobile and your latest published agent answers, on the trial's minutes. `number` is null outside the trial or when there is no shared number.","responses":{"200":{"description":"Shared number","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedNumber"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Numbers"]}},"/v1/numbers":{"get":{"summary":"List phone numbers across all providers","responses":{"200":{"description":"Numbers","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumber"}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Numbers"]},"post":{"summary":"Rent a number","description":"Buys `e164` on the connection's provider account and points it at Orvoca. On an Orvoca connection it costs ₹200/month from the wallet; on your own account your provider bills you.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connection_id":{"type":"string"},"e164":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"agent_id":{"type":"string"}},"required":["connection_id","e164"]}}}},"responses":{"201":{"description":"Rented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Number already in use","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Numbers"]}},"/v1/numbers/import":{"post":{"summary":"Import numbers already on a customer's provider account","description":"Adds every voice number on the account that Orvoca does not have yet, and points its inbound calls at Orvoca.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connection_id":{"type":"string"}},"required":["connection_id"]}}}},"responses":{"200":{"description":"Import result","content":{"application/json":{"schema":{"type":"object","properties":{"imported":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumber"}},"skipped":{"type":"array","items":{"type":"object","properties":{"e164":{"type":"string"},"reason":{"type":"string"}},"required":["e164","reason"]}}},"required":["imported","skipped"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Numbers"]}},"/v1/numbers/available":{"get":{"summary":"Search numbers to rent","description":"Numbers in the connection's provider stock, ready to rent with POST /v1/numbers. Indian numbers on Plivo need an approved KYC (compliance) application on the account.","parameters":[{"schema":{"type":"string"},"required":true,"name":"connection_id","in":"query"},{"schema":{"type":"string","enum":["local","mobile","tollfree"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,8}$","description":"Digits right after +91, e.g. 80 for Bengaluru landlines"},"required":false,"description":"Digits right after +91, e.g. 80 for Bengaluru landlines","name":"starts_with","in":"query"},{"schema":{"type":"string","minLength":2,"maxLength":60},"required":false,"name":"city","in":"query"}],"responses":{"200":{"description":"Available numbers","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AvailableNumber"}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Numbers"]}},"/v1/numbers/{id}/resume":{"post":{"summary":"Switch a paused number back on","description":"A number paused by a downgrade or cancellation goes back to taking calls at ₹200/month from the wallet (the first month now). Choose a plan first if the workspace has none.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Back on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Numbers"]}},"/v1/numbers/{id}":{"patch":{"summary":"Assign a number to an agent, or switch inbound/outbound","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":["string","null"]},"inbound_enabled":{"type":"boolean"},"outbound_enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Numbers"]},"delete":{"summary":"Remove a number","description":"Orvoca numbers are released back to the provider. Numbers on your own account are only removed from Orvoca unless `release=true`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"release","in":"query"}],"responses":{"204":{"description":"Removed"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Numbers"]}},"/v1/numbers/{id}/forwarding-test":{"post":{"summary":"Test call forwarding to this number","description":"Rings `business_number` from this number. Don't answer it: if forwarding is on, the call comes back to this number within a minute or two and `forwarding.verified_at` is set. Counts against the daily test-call limit.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"business_number":{"type":"string","minLength":8,"maxLength":20}},"required":["business_number"]}}}},"responses":{"202":{"description":"Test started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Numbers"]}},"/v1/calls":{"post":{"summary":"Place an outbound call","description":"Dials `to` from `from_number_id`, or the agent's outbound number. Calls to Indian numbers are refused outside 09:00–21:00 IST.\n\nWith a test API key nothing is dialled or charged: the call is simulated, ends a few seconds later with a sample transcript, and sends the usual webhooks with `data.test: true`. A number to call from is optional in test mode.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string"},"to":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"from_number_id":{"type":"string"},"variables":{"type":"object","additionalProperties":{"type":"string","maxLength":200},"description":"Details the agent can use on this call, e.g. `{\"name\": \"Rahul\"}`"}},"required":["agent_id","to"]}}}},"responses":{"201":{"description":"Dialling","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","ringing","live","ended","failed"]},"direction":{"type":"string","enum":["outbound"]},"from":{"type":"string"},"to":{"type":"string"},"provider":{"type":["string","null"],"enum":["plivo","vobiz","sip",null],"description":"`null` for test calls"},"test":{"type":"boolean","description":"Placed with a test API key: simulated, never dialled or charged"}},"required":["id","status","direction","from","to","provider","test"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"No plan minutes or wallet balance left","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Outside calling hours, or the provider refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily outbound limit reached (new workspaces: 50 a day for 14 days)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Calls"]},"get":{"summary":"List call logs","description":"Newest first. Every call shows which provider and connection carried it.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["inbound","outbound"]},"required":false,"name":"direction","in":"query"},{"schema":{"type":"string","enum":["queued","ringing","live","ended","failed"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["booked","lead","answered","transferred","message","missed","voicemail","not_interested"]},"required":false,"name":"outcome","in":"query"},{"schema":{"type":"string","enum":["plivo","vobiz","sip"]},"required":false,"name":"provider","in":"query"},{"schema":{"type":"string"},"required":false,"name":"connection_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"agent_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"campaign_id","in":"query"},{"schema":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$","description":"Calls from or to this number"},"required":false,"description":"Calls from or to this number","name":"phone","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"started_after","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"started_before","in":"query"}],"responses":{"200":{"description":"Calls","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CallLog"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Calls"]}},"/v1/calls/browser":{"post":{"summary":"Talk to an agent from the browser","description":"A free test call through the microphone, no phone needed: up to 300 minutes a month, 10 minutes per call. Open `url` as a WebSocket within 2 minutes and stream PCM16LE mono 16 kHz both ways (see the guide). The call is written up like any other, marked `channel: browser`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string"}},"required":["agent_id"]}}}},"responses":{"201":{"description":"Ready to connect","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","description":"wss:// URL with a one-time token"},"expires_at":{"type":"string"},"minutes_left":{"type":"number","description":"Free browser minutes left this month, before this call"}},"required":["id","url","expires_at","minutes_left"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Calls"]}},"/v1/calls/{id}":{"get":{"summary":"Get a call","description":"One call with its transcript (redacted before storage), summary and extracted fields.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetail"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Calls"]},"patch":{"summary":"Correct a call's outcome","description":"When the summary got it wrong, e.g. a call marked \"answered\" that was really a booking. Analytics follow the new outcome.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["booked","lead","answered","transferred","message","missed","voicemail","not_interested"]}},"required":["outcome"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"outcome":{"type":"string","enum":["booked","lead","answered","transferred","message","missed","voicemail","not_interested"]}},"required":["id","outcome"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Calls"]}},"/v1/calls/{id}/translation":{"post":{"summary":"Translate a transcript into English","description":"The call’s transcript in English, one entry per spoken turn (by `seq`). Made once on first request and kept with the call; later requests return the same translation.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The translation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallTranslation"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Calls"]}},"/v1/calls/{id}/recording":{"get":{"summary":"Get a recording link","description":"A signed link to play the call recording (Ogg Opus, or WAV for older calls; supports Range). Expires in 15 minutes; each link is audit-logged.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["main","returned"],"default":"main","description":"`returned`: the part after an unanswered transfer, when the caller was back with the agent."},"required":false,"description":"`returned`: the part after an unanswered transfer, when the caller was back with the agent.","name":"part","in":"query"}],"responses":{"200":{"description":"The link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingLink"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Calls"]}},"/v1/calls/{id}/share":{"post":{"summary":"Get a share link","description":"A read-only page with the summary and redacted transcript, for someone without a login. Expires in 7 days. The recording is never shared.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLink"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Calls"]}},"/v1/campaigns":{"post":{"summary":"Create a campaign","description":"Calls each contact with the agent, inside the calling window (09:00–21:00 IST at most), a few at a time, retrying no-answer and busy. Up to 10,000 contacts; `phone` is required, `variables` (up to 20) reach the agent as details for that call. Rows with a number that isn't an Indian phone number, and repeats, are skipped and listed in `skipped`. Lists over 500 contacts start in `review` until Orvoca approves them. Promotional campaigns need a verified 140-series registration and DND scrubbing.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"agent_id":{"type":"string"},"from_number_id":{"type":"string"},"type":{"type":"string","enum":["service","promotional"],"default":"service"},"window":{"$ref":"#/components/schemas/CampaignWindow"},"concurrency":{"type":"integer","minimum":1,"maximum":25,"default":1},"max_retries":{"type":"integer","minimum":0,"maximum":3,"default":1},"retry_gap_hours":{"type":"integer","minimum":1,"maximum":24,"default":2},"contacts":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","maxLength":40},"variables":{"type":"object","additionalProperties":{"type":"string","maxLength":500}}},"required":["phone"]},"minItems":1,"maxItems":10000}},"required":["name","agent_id","from_number_id","contacts"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Campaign"},{"type":"object","properties":{"skipped":{"type":"array","items":{"type":"object","properties":{"row":{"type":"number"},"phone":{"type":"string"},"reason":{"type":"string"}},"required":["row","phone","reason"]}}},"required":["skipped"]}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Campaigns"]},"get":{"summary":"List campaigns","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Campaigns","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Campaigns"]}},"/v1/campaigns/{id}":{"get":{"summary":"Get a campaign","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Campaigns"]}},"/v1/campaigns/{id}/contacts":{"get":{"summary":"List a campaign's contacts","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["pending","calling","done","failed","skipped"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"description":"Row number to continue after"},"required":false,"description":"Row number to continue after","name":"cursor","in":"query"}],"responses":{"200":{"description":"Contacts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CampaignContact"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Campaigns"]}},"/v1/campaigns/{id}/pause":{"post":{"summary":"Pause a campaign","description":"No new calls until resumed. Calls already ringing finish.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Campaigns"]}},"/v1/campaigns/{id}/resume":{"post":{"summary":"Resume a campaign","description":"Dialling starts again on the next minute, inside the calling window.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Campaigns"]}},"/v1/campaigns/{id}/cancel":{"post":{"summary":"Cancel a campaign","description":"Stops for good: contacts not yet called are left uncalled. Calls already ringing finish.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Campaigns"]}},"/v1/outbound/do-not-call":{"get":{"summary":"List the do-not-call list","description":"Numbers this workspace never calls, from the API or campaigns. Newest first, up to 500.","responses":{"200":{"description":"The list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DoNotCallEntry"}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Outbound rules"]},"post":{"summary":"Add a number to the do-not-call list","description":"For callers who asked not to be called again. Takes effect on the next dial.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","maxLength":40},"reason":{"type":"string","maxLength":200}},"required":["phone"]}}}},"responses":{"201":{"description":"Added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoNotCallEntry"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Outbound rules"]}},"/v1/outbound/do-not-call/{id}":{"delete":{"summary":"Remove a number from the do-not-call list","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Removed"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Outbound rules"]}},"/v1/outbound/registration":{"get":{"summary":"Get the 140 / 1600 registration","responses":{"200":{"description":"The registration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundRegistration"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Outbound rules"]},"put":{"summary":"Send the 140 / 1600 registration for checking","description":"Promotional campaigns need a 140-series number; banks, NBFCs and insurers need a 1600-series number for outbound calls. Orvoca checks it against the operator record before it is used; changing it sends it for checking again.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number_140":{"type":["string","null"],"pattern":"^140\\d{4,8}$"},"number_1600":{"type":["string","null"],"pattern":"^1600\\d{6}$"},"dlt_entity_id":{"type":["string","null"],"pattern":"^\\d{10,20}$"}},"required":["number_140","number_1600","dlt_entity_id"]}}}},"responses":{"200":{"description":"Sent for checking","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundRegistration"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Outbound rules"]}},"/v1/privacy-requests":{"get":{"summary":"List caller data requests","responses":{"200":{"description":"Newest first, up to 100","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PrivacyRequest"}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Privacy"]},"post":{"summary":"Handle a caller data request","description":"A caller asked to see (`export`) or erase (`delete`) what you hold about them. Erasing removes transcripts, summaries, captured details, recordings and messages for the number at once and cannot be undone; call records stay for billing with the number replaced. The do-not-call list keeps the number, so they are not called again.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","maxLength":40},"type":{"type":"string","enum":["export","delete"]}},"required":["phone","type"]}}}},"responses":{"201":{"description":"Done","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivacyRequest"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Privacy"]}},"/v1/privacy-requests/{id}/export":{"get":{"summary":"Download a caller data export","description":"The JSON file to send the caller. Available for 30 days after the request.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"JSON file","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Privacy"]}},"/v1/wallet":{"get":{"summary":"Wallet balance and plan usage","responses":{"200":{"description":"The wallet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]}},"/v1/wallet/plan-change":{"get":{"summary":"Preview a plan change","description":"What choosing a plan would charge, credit and when it takes effect. Changes nothing.","parameters":[{"schema":{"type":"string","enum":["trial","starter","growth","business","agency"],"description":"'trial' cancels the paid plan at the renewal date"},"required":true,"description":"'trial' cancels the paid plan at the renewal date","name":"plan","in":"query"}],"responses":{"200":{"description":"The preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChange"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]}},"/v1/wallet/plan":{"put":{"summary":"Change plan","description":"Upgrades take effect now and are paid from the wallet (402 `wallet_empty` if it is short). Downgrades and cancellations (`trial`) take effect on the renewal date; choosing the current plan undoes them.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["trial","starter","growth","business","agency"],"description":"'trial' cancels the paid plan at the renewal date"}},"required":["plan"]}}}},"responses":{"200":{"description":"The wallet after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]}},"/v1/wallet/ledger":{"get":{"summary":"Wallet transactions","description":"Newest first. Append-only: the balance is the sum of these entries.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["topup","plan_fee","plan_credit","call_charge","number_fee","refund","adjustment"]},"required":false,"name":"type","in":"query"}],"responses":{"200":{"description":"Entries","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LedgerEntry"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]}},"/v1/wallet/statement":{"get":{"summary":"Monthly statement","description":"Opening and closing balance and the totals by kind for one month (India time). `format=csv` gives every entry as a CSV file instead.","parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","example":"2026-11"},"required":true,"name":"month","in":"query"},{"schema":{"type":"string","enum":["json","csv"],"default":"json"},"required":false,"name":"format","in":"query"}],"responses":{"200":{"description":"The statement","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statement"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]}},"/v1/wallet/topups":{"post":{"summary":"Start a wallet top-up","description":"Creates a Razorpay order for the amount plus 18% GST. Open Razorpay Checkout with `razorpay.key_id` and `razorpay.order_id`, then send its result to `/verify`. The wallet is credited once, whether `/verify` or Razorpay's webhook arrives first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_paise":{"type":"integer","minimum":50000,"maximum":20000000}},"required":["amount_paise"]}}}},"responses":{"201":{"description":"Order created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Topup"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]}},"/v1/wallet/auto-topup":{"put":{"summary":"Turn on or change auto top-up","description":"Charges a saved card or UPI Autopay mandate for `amount_paise` + 18% GST whenever the balance drops below `below_paise`. With an active mandate on the same method only the amounts change. Otherwise `checkout` is a first top-up of `amount_paise`: open Razorpay Checkout with its `order_id`, `customer_id` and `recurring`, then send the result to `/topups/{id}/verify`. Auto top-up starts when the bank or UPI app confirms the mandate.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_paise":{"type":"integer","minimum":50000,"maximum":1250000},"below_paise":{"type":"integer","minimum":10000,"maximum":5000000},"method":{"type":"string","enum":["card","upi"]}},"required":["amount_paise","below_paise","method"]}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","properties":{"auto_topup":{"$ref":"#/components/schemas/AutoTopup"},"checkout":{"type":["object","null"],"properties":{"topup":{"$ref":"#/components/schemas/Topup"},"customer_id":{"type":"string"},"recurring":{"anyOf":[{"type":"boolean","enum":[true]},{"type":"string","enum":["1"]}]}},"required":["topup","customer_id","recurring"],"description":"Pay this in Razorpay Checkout to authorise the mandate; null when only the amounts changed"}},"required":["auto_topup","checkout"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]},"delete":{"summary":"Turn off auto top-up","description":"Also cancels the card or UPI mandate with Razorpay.","responses":{"200":{"description":"Off","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTopup"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]}},"/v1/wallet/topups/{id}":{"get":{"summary":"Get a top-up","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The top-up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Topup"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]}},"/v1/wallet/topups/{id}/verify":{"post":{"summary":"Confirm a top-up after Razorpay Checkout","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"razorpay_payment_id":{"type":"string","minLength":1,"maxLength":64},"razorpay_signature":{"type":"string","minLength":1,"maxLength":128}},"required":["razorpay_payment_id","razorpay_signature"]}}}},"responses":{"200":{"description":"Paid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Topup"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]}},"/v1/wallet/invoices":{"get":{"summary":"GST invoices","description":"One tax invoice per paid top-up, newest first.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Invoices","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]}},"/v1/wallet/invoices/{id}/pdf":{"get":{"summary":"Download an invoice","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The invoice as a PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]}},"/v1/wallet/credit-notes":{"get":{"summary":"GST credit notes","description":"One per refund of unused wallet credit to your bank, against the top-up's invoice. Newest first.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Credit notes","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CreditNote"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]}},"/v1/wallet/credit-notes/{id}/pdf":{"get":{"summary":"Download a credit note","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The credit note as a PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Wallet"]}},"/v1/knowledge":{"get":{"summary":"List knowledge sources","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"agent_id","in":"query"},{"schema":{"type":"string","enum":["file","url","qa"]},"required":false,"name":"type","in":"query"}],"responses":{"200":{"description":"Sources","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSource"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Knowledge"]},"post":{"summary":"Add a website or a Q&A pair","description":"Websites are crawled (up to 50 pages, same domain). Files go to `POST /v1/knowledge/files`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewKnowledgeSource"}}}},"responses":{"201":{"description":"Added; indexing has started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSource"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Knowledge"]}},"/v1/knowledge/files":{"post":{"summary":"Upload a file","description":"PDF, DOCX, XLSX, CSV or TXT, up to 20 MB. Scanned PDFs (no text) are rejected.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"agent_id":{"type":"string"}}}}}},"responses":{"201":{"description":"Uploaded; reading has started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSource"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Knowledge"]}},"/v1/knowledge/search":{"post":{"summary":"Ask a question","description":"The \"ask a question\" tester: the chunks an agent would use, with their sources.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":500},"agent_id":{"type":"string"}},"required":["query"]}}}},"responses":{"200":{"description":"Best matches first","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"score":{"type":"number"},"source":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["file","url","qa"]},"title":{"type":"string"},"url":{"type":["string","null"]},"page":{"type":["number","null"]},"heading":{"type":["string","null"]}},"required":["id","type","title","url","page","heading"]}},"required":["text","score","source"]}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Knowledge"]}},"/v1/knowledge/deleted":{"get":{"summary":"Recently deleted knowledge","description":"Sources deleted in the last 30 days, newest first. Restore one to use it again.","responses":{"200":{"description":"Deleted sources","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSource"}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Knowledge"]}},"/v1/knowledge/{id}":{"get":{"summary":"Get a knowledge source","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSource"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Knowledge"]},"patch":{"summary":"Update a knowledge source","description":"Change which agent uses it, or edit a Q&A pair. Re-indexes when needed.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":["string","null"],"description":"Limit to one agent; omit or null for every agent"},"question":{"type":"string","minLength":1,"maxLength":300},"answer":{"type":"string","minLength":1,"maxLength":2000}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSource"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Knowledge"]},"delete":{"summary":"Delete a knowledge source","description":"Agents stop using it at once. The uploaded file is purged after 30 days.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Knowledge"]}},"/v1/knowledge/{id}/refresh":{"post":{"summary":"Re-read a knowledge source","description":"Re-crawls a website (also done weekly) or re-reads a file.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Indexing has started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSource"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Knowledge"]}},"/v1/knowledge/{id}/restore":{"post":{"summary":"Restore a deleted knowledge source","description":"Within 30 days of deleting it. It is read again, then agents use it.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Restored, being read again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSource"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Knowledge"]}},"/v1/tools/calendar/connect":{"post":{"summary":"Connect Google Calendar","description":"Returns the Google sign-in URL to open in this browser. Google asks only to see availability and to manage events on calendars the business owns. Needs a signed-in admin (not an API key).","responses":{"200":{"description":"Open this URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]}},"/v1/tools/crm/{provider}/connect":{"post":{"summary":"Connect Zoho CRM or HubSpot","description":"Returns the CRM's sign-in URL to open in this browser. Orvoca asks only for contacts, leads and notes. Needs a signed-in admin (not an API key).","parameters":[{"schema":{"type":"string","enum":["zoho","hubspot"]},"required":true,"name":"provider","in":"path"}],"responses":{"200":{"description":"Open this URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]}},"/v1/tools/whatsapp/embedded-signup":{"get":{"summary":"Embedded Signup settings","description":"The Meta app and configuration ids the dashboard opens WhatsApp's sign-up with. 404 until set up.","responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string"},"config_id":{"type":"string"}},"required":["app_id","config_id"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]},"post":{"summary":"Connect your own WhatsApp number","description":"Finishes Meta's Embedded Signup: send the `code` from FB.login and the `phone_number_id` and `waba_id` from its FINISH message within 5 minutes. Orvoca subscribes to the account, registers the number and sends from it from then on. Needs a signed-in admin.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddedSignup"}}}},"responses":{"200":{"description":"Connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]}},"/v1/tools":{"get":{"summary":"List tools","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Tools, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tool"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]},"post":{"summary":"Add a custom HTTP action","description":"Calls your own API during a call. `{{name}}` in the URL or body is filled from the agent's arguments, plus `{{call.id}}`, `{{call.from}}` and `{{call.to}}`. Headers are stored encrypted. HTTPS only, 2-second limit. Use `POST /v1/tools/{id}/test` before adding it to an agent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTool"}}}},"responses":{"201":{"description":"Added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]}},"/v1/tools/email":{"post":{"summary":"Turn on email summaries","description":"After each call of an agent that has this tool, the recipients get the summary, outcome and details by email. One per workspace. Send a test before publishing.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewEmailSummary"}}}},"responses":{"201":{"description":"Turned on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]}},"/v1/tools/whatsapp":{"post":{"summary":"Turn on WhatsApp","description":"Lets agents use `send_whatsapp` (to the caller only) and sends booking confirmations. Sends from Orvoca's shared number, or the business's own once it is onboarded with our WhatsApp provider. One per workspace. Send a test (`arguments.to`) before publishing.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewWhatsApp"}}}},"responses":{"201":{"description":"Turned on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]}},"/v1/tools/sms":{"post":{"summary":"Turn on SMS (beta)","description":"Beta: needs the workspace's `beta.sms_tool` flag. Lets agents use `send_sms`: a short text (up to 160 characters) to the caller's Indian mobile only, for callers without WhatsApp, at most 3 per call. Sent from Orvoca's DLT-registered sender. One per workspace. Send a test (`arguments.to`) before publishing.","responses":{"201":{"description":"Turned on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]}},"/v1/tools/razorpay":{"post":{"summary":"Connect Razorpay for payment links","description":"Lets agents use `send_payment_link`: a Razorpay payment link on the business's own account, sent to the caller on WhatsApp (when on) or by Razorpay's SMS. Keys are stored encrypted. Add `webhook_url` as a webhook in Razorpay (payment_link events) with the same `webhook_secret` so paid links show as paid. One per workspace. Send a test before publishing: it checks the keys and creates nothing.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewRazorpay"}}}},"responses":{"201":{"description":"Connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]}},"/v1/tools/{id}/razorpay":{"put":{"summary":"Change Razorpay keys","description":"New API keys and/or webhook secret. Changing the keys clears the test: send a test again before publishing.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RazorpayKeys"}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]}},"/v1/tools/{id}":{"get":{"summary":"Get a tool","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]},"patch":{"summary":"Change a tool","description":"URL, body and headers apply to live agents at once. The name, description and parameters the agent sees change when the agent is next published. Changing the config or headers clears its test: send a test again before publishing.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolPatch"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]},"delete":{"summary":"Delete a tool","description":"Agents using it stop being able to call it at once.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]}},"/v1/tools/{id}/test":{"post":{"summary":"Send test","description":"Runs the tool once with the given arguments, as an agent would. A success marks it tested, which publishing an agent with it needs.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"arguments":{"type":"object","additionalProperties":{},"default":{}}}}}}},"responses":{"200":{"description":"What happened","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolTestResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tools"]}},"/v1/webhooks":{"get":{"summary":"List webhook endpoints","responses":{"200":{"description":"Endpoints","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Webhooks"]},"post":{"summary":"Add a webhook endpoint","description":"Events are POSTed as JSON with `Orvoca-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"t.body\">`. Reject events older than 5 minutes. Failed deliveries retry with backoff for 24 hours.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewWebhook"}}}},"responses":{"201":{"description":"Added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Webhooks"]}},"/v1/webhooks/{id}":{"get":{"summary":"Get a webhook endpoint","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Webhooks"]},"patch":{"summary":"Change a webhook endpoint","description":"Disabling it stops deliveries, including pending retries.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPatch"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Webhooks"]},"delete":{"summary":"Delete a webhook endpoint","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Webhooks"]}},"/v1/webhooks/{id}/rotate-secret":{"post":{"summary":"Rotate the signing secret","description":"The old secret stops working at once. The new one is shown only now.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"New secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Webhooks"]}},"/v1/webhooks/{id}/test":{"post":{"summary":"Send test event","description":"Sends one signed `webhook.test` event now and waits for the answer. Not retried.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"What the endpoint answered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Webhooks"]}},"/v1/webhooks/{id}/deliveries":{"get":{"summary":"Recent deliveries","description":"The last 50, newest first.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deliveries","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Webhooks"]}},"/v1/messages":{"get":{"summary":"List messages","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"call_id","in":"query"}],"responses":{"200":{"description":"Messages, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Messages"]}},"/v1/notifications":{"get":{"summary":"In-app notifications","description":"Newest first, with the number still unread.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Notifications","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}},"unread":{"type":"integer"},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","unread","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Notifications"]}},"/v1/notifications/read":{"post":{"summary":"Mark notifications read","description":"Marks the given ids read, or every notification when `ids` is left out.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"maxItems":200}}}}}},"responses":{"204":{"description":"Marked read"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Notifications"]}},"/v1/notifications/settings":{"get":{"summary":"Where each notification goes","description":"WhatsApp goes to owners with a verified mobile number; email to owners, or the billing email for payments.","responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NotificationSetting"}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Notifications"]},"put":{"summary":"Choose where notifications go (owner only)","description":"Send the kinds to change, each with its channels; an empty list turns that kind off.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"channels":{"type":"array","items":{"type":"string","enum":["email","whatsapp","sms","in_app"]}}},"required":["kind","channels"]},"minItems":1}},"required":["settings"]}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NotificationSetting"}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Notifications"]}},"/v1/analytics/calls":{"get":{"summary":"Call totals for a period","description":"Totals, outcomes, languages, calls per day and per hour. At most 366 days.","parameters":[{"schema":{"type":"string","format":"date-time"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string"},"required":false,"name":"agent_id","in":"query"}],"responses":{"200":{"description":"Totals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallStats"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Analytics"]}},"/v1/agency/brand":{"get":{"summary":"White-label brand","responses":{"200":{"description":"The brand","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agency"]},"patch":{"summary":"Change the white-label brand","description":"Clients see it when they sign in on the custom domain.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandInput"}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agency"]}},"/v1/agency/brand/logo":{"put":{"summary":"Upload the logo","description":"PNG, JPEG or WebP, up to 200 KB. Send the image as the request body.","requestBody":{"required":true,"content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agency"]},"delete":{"summary":"Remove the logo","responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agency"]}},"/v1/agency/domain":{"get":{"summary":"Custom domain and its status","description":"While pending, each read asks Cloudflare again; it turns active once the CNAME is in place and the certificate is issued.","responses":{"200":{"description":"The domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agency"]},"put":{"summary":"Set the custom domain","description":"e.g. voice.youragency.com. Add a CNAME record pointing it at `cname_target`; the certificate is issued automatically.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainInput"}}}},"responses":{"200":{"description":"Added, pending until the CNAME is found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agency"]},"delete":{"summary":"Remove the custom domain","description":"Clients sign in on the Orvoca address again.","responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agency"]}},"/v1/agency":{"get":{"summary":"Clients and margins","description":"Every client workspace with its usage, what Orvoca charged the agency for it and the agency's own price.","parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","example":"2026-12","description":"India time; this month when left out"},"required":false,"description":"India time; this month when left out","name":"month","in":"query"}],"responses":{"200":{"description":"The overview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyOverview"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agency"]}},"/v1/agency/clients":{"post":{"summary":"Add a client workspace","description":"The agency's owners and admins manage it with their agency role; invite the client's own team from its Settings. Its calls and numbers are paid from the agency's wallet.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyClientCreate"}}}},"responses":{"201":{"description":"Added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyClient"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agency"]}},"/v1/agency/clients/{id}":{"get":{"summary":"One client","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","example":"2026-12","description":"India time; this month when left out"},"required":false,"description":"India time; this month when left out","name":"month","in":"query"}],"responses":{"200":{"description":"The client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyClient"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agency"]},"patch":{"summary":"Change a client","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyClientPatch"}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyClient"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or bad API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agency"]}}},"webhooks":{},"tags":[{"name":"Agents","description":"Create, edit and publish voice agents."},{"name":"Calls","description":"Place outbound calls and read call logs, transcripts and recordings."},{"name":"Campaigns","description":"Call a list of contacts with an agent, inside a calling window."},{"name":"Outbound rules","description":"The do-not-call list and 140 / 1600 registrations."},{"name":"Numbers","description":"Rent, import and assign phone numbers."},{"name":"Telephony","description":"Connect your own phone provider account."},{"name":"Knowledge","description":"Files, websites and Q&A your agents answer from."},{"name":"Tools","description":"Calendar, WhatsApp, CRMs, payment links, email summaries and custom HTTP actions."},{"name":"Webhooks","description":"Endpoints that receive signed events."},{"name":"Messages","description":"WhatsApp and email messages sent after calls."},{"name":"Notifications","description":"Alerts to owners and where each one goes."},{"name":"Support","description":"Asking Orvoca for help from the dashboard."},{"name":"Analytics","description":"Call totals for a period."},{"name":"Wallet","description":"Balance, plan usage, transactions and top-ups."},{"name":"Workspace","description":"Workspace settings and team."},{"name":"Privacy","description":"Export or erase what you hold about one caller."},{"name":"API keys","description":"Create and revoke API keys."},{"name":"Agency","description":"Client workspaces, margins, white-label brand and custom domain."}],"security":[{"apiKey":[]}]}