Before you start
A Ringg workspace
Sign in to the dashboard. Only the workspace owner can generate the API key.
Balance
Calls draw down your workspace balance.
A caller number of your own
Buy or import one. Ringg’s test numbers do not work from the API.
https://prod-api.ringg.ai/ca/api/v0 and send your key in the X-API-KEY header. The examples read it from the RINGG_API_KEY environment variable; JavaScript uses fetch (Node.js 18 or later), Python uses requests.
1
Get an API key and check it
In the dashboard, go to Settings → API key and click Generate API Key. Copy the key from the dialog: it is shown only once. If the workspace already has a key, ask whoever holds it; Regenerate API Key revokes the old key at once. See API key.Check the key with Get Workspace Info, a read-only request.Likeliest error:
Response (200)
A
200 with your workspace’s name means the key works. Check that credits is above zero before you place a call.401 with "message": "Invalid credentials". The key is missing, mistyped or was regenerated. Copy it again, or regenerate it on the API key page.2
Get an outbound agent
The call needs the ID of an outbound or outbound-inbound agent. Use one you have, or create one.In the dashboard: open Assistants in the sidebar. For an existing agent, open it and click the copy button beside its name in the top bar; the ID is also in the URL, Or create one with Create Agent. First get a
/assistants/<agent_id>. To create one, click Create agent, choose the Outbound tab and a template, then follow Create an agent.With the API: list your agents with Get Assistants and pick one whose agent_type is outbound or outbound_inbound:voice_id that speaks your language from Get Assistant Voices (GET /agent/voices?language=en-IN).Response (200)
data.id is your agent_id. Outbound agents always get the variables callee_name and mobile_number. An agent created by API gets a calling window of 09:00 to 21:00 in Asia/Kolkata unless you set call_config.call_time; a call placed outside the window waits until it opens (calling window).Likeliest error: 400 with code VOICE_LANGUAGE_MISMATCH, for example “Voice does not support language ‘en-US’”. Pick a voice_id whose languages include your primary_language.3
Choose a caller number
The caller number is the number your phone will show. List your workspace’s numbers with Get Workspace Numbers:Pick a number with
Response (200, one item, some fields left out)
"is_test_number": false and "is_spam": false and copy its id: that is your from_number_id. In the dashboard, the same list is on Numbers, with a copy button for each ID.Likeliest problem: the list holds only Ringg’s shared test numbers ("is_test_number": true), which the dashboard’s test call can use and the API cannot. Buy or import a number first, or run this test from the dashboard instead.4
Place the call to your own phone
Send Initiate Individual Call with your Save Likeliest errors:
agent_id, your from_number_id, and your own number, with country code, as mobile_number. custom_args_values fills the agent’s variables, such as @{{callee_name}} in the prompt.Response (200)
data.call_id. call_status starts as registered (queued) or ongoing. A call that stays registered is waiting for the agent’s calling window to open, or is held by a call limit.Your phone rings and shows the caller number you picked. Answer it: the agent speaks its first message. Talk to it, then hang up.
422with"message": "Provide either from_number_id or from_number, not both". Sendname,mobile_numberandagent_id, plus one offrom_number_idorfrom_number.400with"message": "Default numbers are for testing only. Please provide a real phone number.". The caller number is a Ringg test number; pick another one.402with"message": "Your current balance is insufficient to initiate this call!". Add balance (Billing).
5
Read the result
After you hang up, fetch the call with Get Call Details. Add Likeliest error:
send_analysis=true to include the analysis.Response (200)
Analysis runs after the call ends. Until it is ready,
platform_analysis and client_analysis are left out of the response, so fetch again.The same call is at the top of Logs in the dashboard. Click it for Call details, the transcript and, if set up, Advanced analysis. To find it later, filter Logs by Call ID.call_status is completed and the parsed transcription_url shows what you and the agent said.404 with "message": "Call not found". Check that you passed data.call_id from step 4 as id, with the same workspace’s key.Hand it to a coding agent
The same five requests make a good first script. Paste this into Claude, Cursor or ChatGPT with your details filled in:Write a script that places a Ringg AI call and prints the transcript.
Get results pushed to you
Polling Get Call Details is fine for a test. In production, subscribe the agent to events with Event Subscription (webhooks) and Ringg posts to your server as the call progresses. All Processing Done (all_processing_completed) carries the transcript, recording and analysis in one request. Endpoint requirements are in webhook setup.
Before you go live
- Keep the API key in a secret manager on your server. See Security.
- Store
agent_id,from_number_idand each returnedcall_id; thecall_idjoins API responses, webhook events and Logs. - Send every
mobile_numberwith its country code, for example+919876543210. - Send a
custom_args_valueskey for every variable the prompt uses. - Set the calling window for your market in the agent’s call settings, and retries per call in
call_config.call_retry_configor per campaign. - Dedupe webhook events on
call_idplusevent_type, and return2xxquickly. See Idempotency key.
Troubleshooting
The call stays registered and my phone never rings
The call stays registered and my phone never rings
The call is queued because the agent’s calling window is closed. Check Call start time, Call end time and Timezone in the agent’s call settings, or send your own
call_config.call_time with the call.The call ended as failed or error
The call ended as failed or error
Read
call_sub_status in Get Call Details; the full list of values is in Get Call Details. Also check that the caller number is not a test number and is not flagged as spam on Numbers.The agent does not use my name
The agent does not use my name
The prompt uses a variable you did not send, or sent under a different key. Add it to
custom_args_values, for example "callee_name": "Priya". See Variables.Next steps
API reference
Agents, calls, campaigns, numbers and results from your backend.
Improve the agent's prompt
Write the script, FAQs and rules your agent follows.
Run a campaign by API
Upload a list and start calls in two requests.