Ringostat
Log in

Launching calls from code (API)

~6 min · An end-to-end example: create → add numbers → start → results.

An end-to-end example over MCP. Calls go in a tools/call envelope after initialize (see “Authorization”).

1. Create a campaign — voiceagent_create_campaign with "pause": true. A new campaign is active at once: without pause it starts calling as soon as numbers are added. The response is the campaign object; its id is the campaignID for the next calls. type is the campaign type as the interface names it: simple (“Informational Call”), aisdr (“Voice Agent”) or multi_question_dtmf (“Interactive Survey”).

{"name":"voiceagent_create_campaign","arguments":{
  "projectID":217, "name":"Order confirmation", "type":"simple",
  "language":"en-US", "text":"Hello! I'm calling to confirm your order. Is everything correct?",
  "voiceName":"<VoiceID from voiceagent_get_voices>", "endpoint":"<your_SIP>",
  "maxAttempts":3, "simultaneousCalls":3,
  "webhookURL":"https://your-app.example/webhooks/ringostat", "pause":true }}

2. Add numbers — voiceagent_add_numbers.

{"name":"voiceagent_add_numbers","arguments":{
  "projectID":217, "campaignID":799,
  "numbers":[ { "phone":"+14155550123", "customFields":{"name":"John"} } ] }}

3. Start — voiceagent_update_campaign_field (field=paused, value="false").

{"name":"voiceagent_update_campaign_field","arguments":{
  "projectID":217, "campaignID":799, "field":"paused", "value":"false" }}

4. Results — voiceagent_get_campaign_stats (counters) and voiceagent_list_campaign_numbers (the status and ID of each number); one call's transcript and report — voiceagent_get_call_detail with numberID = that ID; or straight away through webhooks.