# Ringg AI
> Build AI agents that make and answer phone calls, talk on your website and chat on WhatsApp, then run them from the Ringg AI dashboard or REST API.
> ## Agent Instructions
> To search or read these docs, connect the Ringg docs MCP server at https://docs.ringg.ai/mcp (no key needed; tools search_ringg_ai and query_docs_filesystem_ringg_ai) instead of browsing pages one by one. Setup for each client: https://docs.ringg.ai/resources/mcp-server/docs-mcp-server/mcp-for-ai-assistants.md
> The dashboard labels agents "Assistants"; these docs say "agent". Both mean the same object, identified by agent_id.
> API base URL: https://prod-api.ringg.ai/ca/api/v0. Send the workspace API key in the X-API-KEY header, from server-side code only.
> Placing a call dials a real phone number and spends credits. Confirm the number with the user before calling.
> To act on a Ringg workspace (place calls, edit agents, read transcripts), use the separate Ringg workspace MCP server at https://mcp.ringg.ai/mcp: https://docs.ringg.ai/resources/mcp-server/workspace-mcp-server/overview.md
# Agents and teams
Source: https://docs.ringg.ai/analytics-platform/coach-agents/agents-and-teams
Add the agents whose calls you score, set who reports to whom, and invite them to sign in. Team leads see only the agents in their team.
**Agents** holds one record per person whose calls you score, with their level and team lead. The reporting lines decide what a team lead sees: their own calls and those of everyone below them.
In [Ringg Analytics](https://analytics.ringg.ai): **Sidebar → Agents**.

Agents with their level, team lead, login status and scores
## Add agents
**1. Set up levels**
Click **Manage Levels** and add your levels, for example **Agent** and **Team Lead**. An agent at the team-lead level signs in as a team lead.
**2. Add agents**
Click **Add Agent** for one, or **Import CSV** for many. The CSV takes **Name**, **Email**, **Level** and **Reports To**; download the template from the import dialog. The whole file is checked first, and nothing is added if a row has an error.
**3. Set who they report to**
Pick each agent's team lead under **Reports to**, or drag them onto their team lead in the org chart (the second view switch at the top).
> [!TIP]
>
> An agent added with an email gets an invite and shows **Invited**, then **Joined** once they sign in.
When you add calls with **Bulk calls**, each row is matched to an agent by email, then by name, and an agent that doesn't exist yet is created.

The org chart
## Columns
| Column | Shows |
| - | - |
| **Login** | **Joined**, **Invited**, **Not invited**, or **Add email to invite** |
| **Interactions** | Calls and emails in the period |
| **Avg score** | Average official score in the period |
| **Total HT** / **Avg HT** | Total and average handling time |
Click an agent to open their [report card](/analytics-platform/coach-agents/report-cards). **Export** downloads the table.
## What team leads see
A team lead's **Agents** page is titled **Your team**. It lists only their team, read-only: no **Add Agent**, **Import CSV**, **Manage Levels** or **Export**, and reporting lines can't be changed. Clicking a row opens that agent's report card.
## Next steps
> [card] [Report cards](/analytics-platform/coach-agents/report-cards)
>
> Coach an agent from their report card.
> [card] [Roles and access](/analytics-platform/roles-and-access)
>
> What each role can see.
> [card] [Interactions](/analytics-platform/review-calls/interactions)
>
> Add calls for your agents.
# Report cards
Source: https://docs.ringg.ai/analytics-platform/coach-agents/report-cards
An agent's report card shows their scores against the previous period, the parameters they need to work on, their calls and coaching notes from their team lead.
A report card is one agent's performance over a period: how their score moved, which parameters cost them points, and the calls behind it. Team leads, QAs and admins leave coaching notes there, and the agent reads them on their own report card.
In [Ringg Analytics](https://analytics.ringg.ai): **Sidebar → Agents →** click an agent. Agents open their own from **Sidebar → My report card**.
## Before you start
> [card] [Agents and teams](/analytics-platform/coach-agents/agents-and-teams)
>
> The agent exists, with a team lead and a login.
> [card] [Metrics](/analytics-platform/set-up/metrics)
>
> Their calls are scored against a rubric.
## Coach an agent
A team lead opens an agent, reads the report card and leaves a note on the parameter to work on.
Opening an agent's report card and leaving a coaching note on a parameter
**1. Open the agent**
On **Agents**, click the agent. A team lead can open only agents in their team.
**2. Read the report card**
Pick the period at the top right; the default is the last 30 days, compared with the 30 days before.

Arjun Mehta's report card
**3. Leave a note**
Click **Coach** on a parameter, or pick one in the **Coaching** panel (or leave it as **General (no parameter)**). Write what to do differently and click **Post note**.
> [!TIP]
>
> The note shows "Not read yet" until the agent marks it read, and the agent's **Summary** counts it under **New coaching notes**.

A coaching note waiting for the agent
## What's on a report card
| Section | Shows |
| - | - |
| **Average score** | The official average, the change against the previous period, and for coaches the team and workspace averages |
| **Scored calls**, **Fatal calls**, **Appeals** | Calls in the period, fatal ones, and [disputes](/analytics-platform/disputes/overview) raised and how many changed the score |
| **Score trend** | Average score per day for periods up to two weeks, per week beyond (India time) |
| **Parameters** | For each parameter, the share of its points the agent earned, the change, and the team's share. The tick on each bar is the workspace average. **Needs work** lists parameters under 80% on at least 3 calls, and any fatal miss. |
| **Focus areas** | Up to three parameters that need work and three strengths, from parameters scored on at least 3 calls |
| **Recent calls** | The latest calls with their official score and dispute result. **All calls** opens **Interactions** filtered to the agent. |
| **Coaching** | Notes from the agent's team lead, QAs and admins, newest first |
Scores are official: a resolved dispute's QA score replaces the AI's. Parameters marked N/A or optional on a call don't count toward it.
## Coaching notes
| | Who can |
| - | - |
| Write a note | The agent's team lead, QAs, admins and the owner. Nobody can coach themselves. |
| Mark a note read | Only the agent, with **Mark as read** |
| Delete a note | Its author, or an admin |
An agent's own report card has no team or workspace figures, and no note box.

An agent's own report card
Owners, admins and QAs can also email an agent from their report card with **Email**, using a [notification](/analytics-platform/set-up/notifications) template.
## Next steps
> [card] [Summary](/analytics-platform/review-calls/summary)
>
> Your team at a glance.
> [card] [QA reviews](/analytics-platform/review-calls/qa-reviews)
>
> Review the calls behind a weak parameter.
> [card] [Disputes](/analytics-platform/disputes/overview)
>
> How agents challenge a score.
# Disputes
Source: https://docs.ringg.ai/analytics-platform/disputes/overview
Agents dispute an AI score in Ringg Analytics; a QA re-scores the call, and the QA's score becomes the official score everywhere, with a full history.
A dispute lets an agent challenge the AI's score on one of their calls: they pick the parameters they think the AI got wrong and say why. A QA then re-scores the whole call, and once they resolve the dispute, the QA's score replaces the AI's as the call's official score.
Disputes live in [Ringg Analytics](https://analytics.ringg.ai), a separate product from the Ringg AI dashboard. In the app a dispute is called an **appeal**: agents click **Appeal this score**.
## How a dispute works
```mermaid theme={null}
flowchart LR
A[AI scores the call] --> B[Agent appeals within the window]
B --> C[Waiting for review]
C --> D[QA claims it: in review]
D --> E[QA resolves: final score]
E --> F[Optional correction later]
```
| Status | Meaning | Who acts next |
| - | - | - |
| **Submitted** | Waiting for a QA ("Waiting for a QA to pick it up.") | Any QA, with **Start review** |
| **In review** | A QA has claimed it; other QAs see who has it | That QA resolves it, or releases it back to the queue |
| **Resolved** | The QA's score is the call's official score | A QA can still [correct](/analytics-platform/disputes/results-and-corrections#corrections) it |
Each dispute also has a **QA target**: the submission time plus the workspace's **QA turnaround target**. An open dispute past it shows **Overdue**.
## Who does what
| Role | Can |
| - | - |
| Agent | [Raise a dispute](/analytics-platform/disputes/raise-a-dispute) on their own calls and follow it to the result |
| Team lead | Follow their team's disputes and receive every dispute email in CC |
| QA | [Review](/analytics-platform/disputes/review-a-dispute) and resolve disputes, and correct resolved ones |
| Owner, admin | Everything a QA can, plus hand a dispute to another QA, and turn disputes on and set the deadlines in [Settings](/analytics-platform/disputes/settings-and-reports) |
Nobody reviews their own dispute: a QA who also takes calls can't claim or resolve an appeal on their own call.
## Rules
* **Calls only.** Emails and meetings can't be disputed.
* **Once per call.** An agent can appeal each call once, and can't edit the appeal after submitting it.
* **Inside the window.** The window starts when the AI scores the call and lasts the **Appeal window** set by an admin, in calendar days (default 3).
* **The whole call is re-scored.** The QA rates every parameter, not only the disputed ones, against the rubric as it was when the agent appealed. Weights and fatal rules are the same as the AI's.
* **No re-scoring while open.** A call with an open dispute can't be sent back through the AI. After it is resolved, reprocessing changes only the AI score shown next to it.
## Where the official score shows
Once a dispute is resolved, the QA's score is used everywhere a score appears: **Interactions** (marked with a scale icon), **Summary**, **Agents**, [report cards](/analytics-platform/coach-agents/report-cards), [notification](/analytics-platform/set-up/notifications) conditions and exports. The AI's original score stays visible on the call for comparison.
## Next steps
> [card] [Raise a dispute](/analytics-platform/disputes/raise-a-dispute)
>
> Agents: appeal a score.
> [card] [Review a dispute](/analytics-platform/disputes/review-a-dispute)
>
> QAs: claim, re-score and resolve.
> [card] [Settings and reports](/analytics-platform/disputes/settings-and-reports)
>
> Admins: windows, deadlines and the dispute report.
# Raise a dispute
Source: https://docs.ringg.ai/analytics-platform/disputes/raise-a-dispute
As an agent, appeal the AI score on one of your calls in Ringg Analytics: pick the parameters you think are wrong, explain each one, and submit.
If you think the AI scored one of your calls wrongly, appeal it: pick the parameters it got wrong and say why for each. A QA re-scores the call, and their score becomes final.
In [Ringg Analytics](https://analytics.ringg.ai): **Sidebar → Interactions →** open your call.
## Before you start
> [card] [A linked agent login](/analytics-platform/roles-and-access)
>
> You sign in as an agent and see your own calls.
> [card] [Disputes turned on](/analytics-platform/disputes/settings-and-reports)
>
> An admin turns appeals on for the workspace.
## Appeal a call
The video shows the whole flow, from finding the call to the submitted appeal.
Finding a call you can still appeal, disputing two parameters and submitting
**1. Find the calls you can still appeal**
On **Interactions**, click **Filter → Appeal**, pick **Can still appeal** and click **Save**. The list shows your scored calls still inside the appeal window, each with its deadline, for example **Appeal by Oct 24**.

Calls you can still appeal
**2. Open the call and click Appeal this score**
Click the call, then **Open full page** for more room. Under the speaking distribution, "Think the AI got this wrong?" shows your deadline: "Appeal by …" and the hours left. Click **Appeal this score**.

The appeal deadline and button on the call
**3. Tick the parameters you dispute and say why**
The form lists every parameter with the AI's rating, for example **AI: No**. Tick each one you think is wrong. Its box opens with the AI's reason; write why it is wrong, in at least 20 characters. Point the QA to the moment in the call, for example "at 0:06".

Two parameters disputed, each with a reason
Add anything else for the QA in "Anything else the QA should know? (optional)".
**4. Review and submit**
Click **Review & submit**. You can appeal a call only once, and can't edit the appeal after you submit it, so check it, then click **Submit appeal**. **Back** returns to the form.

The last check before the appeal is sent
> [!TIP]
>
> The call shows the appeal as **Submitted**, "Waiting for a QA to pick it up.", with the **QA target** for a decision. You and your team lead get an email: "Appeal submitted: …".

A submitted appeal
## Follow your appeals
On **Interactions**, filter **Appeal** to **Appealed — awaiting QA** for open appeals, or **Appeal resolved** for decided ones. The call's appeal card changes to "A QA is re-scoring your call." when a QA picks it up. See [Results and corrections](/analytics-platform/disputes/results-and-corrections) for what you get back.
## When you can't appeal
**Appeal this score** isn't offered when disputes are off, or the call isn't yours, isn't a call, isn't scored yet or already has an appeal. Otherwise the card says why:
| Message | Why |
| - | - |
| "The appeal window for this call has closed" | The window, counted from when the AI scored the call, has passed |
| "This call is being re-scored — you can appeal once it finishes" | The call is being reprocessed |
## Next steps
> [card] [Results and corrections](/analytics-platform/disputes/results-and-corrections)
>
> What happens when the QA decides.
> [card] [Review a dispute](/analytics-platform/disputes/review-a-dispute)
>
> What the QA does with your appeal.
> [card] [Report cards](/analytics-platform/coach-agents/report-cards)
>
> Where appeals show on your report card.
# Results and corrections
Source: https://docs.ringg.ai/analytics-platform/disputes/results-and-corrections
After a QA resolves a dispute, the agent sees the final score, each parameter's result and the QA's remarks. A QA can correct a resolved dispute later.
When a QA resolves a dispute, the result shows on the call for the agent, their team lead and reviewers, and an email goes out. If the decision has to change later, a QA corrects it; every version is kept.
In [Ringg Analytics](https://analytics.ringg.ai): **Sidebar → Interactions →** open the call.
## What the agent sees

An overturned dispute, as the agent sees it
| Part | Shows |
| - | - |
| "Final score · Appeal reviewed by QA" | The official score, the AI's score and the difference, and the outcome: **AI score upheld**, **Partially overturned** or **Overturned** |
| **Appeal** card | Status, who submitted it and when, who resolved it and when |
| Disputed parameters | The AI's rating, the QA's, **Changed** or **Unchanged**, and the QA's remark |
| The AI's score | The original AI scoring, unchanged, for comparison |
The agent and their current team lead get an email: "Appeal reviewed: … — final score N%", with each disputed parameter's result and the QA's note.
The official score then counts everywhere: **Interactions**, **Summary**, **Agents**, [report cards](/analytics-platform/coach-agents/report-cards), [notification](/analytics-platform/set-up/notifications) conditions and exports.
## Appeal history
**Appeal history** at the bottom of the call lists every step: **Appealed**, **Review started**, **Released**, **Reassigned**, **Resolved** and **Corrected**, by whom and when, with each version's final score. Everyone who can see the call can read it, and it is never deleted.
## Corrections
Use a correction when a resolved decision turns out wrong, for example after a team lead escalates it offline and the escalation is accepted.
**1. Open the resolved call**
As a QA, admin or owner, open the call and click **Correct the final score (offline dispute accepted)**.
**2. Re-rate and give a reason**
Change the ratings that need it and write why you are correcting. The reason is required.
**3. Save**
Click **Review correction**, then **Save correction**.
> [!TIP]
>
> The call shows the new final score and **Corrected · v2**, with your reason. The agent and their team lead get an email: "Score corrected: … — now N%".

A corrected dispute
If two reviewers correct the same appeal at once, the second save is refused, so nobody overwrites a correction they haven't seen.
## Next steps
> [card] [Settings and reports](/analytics-platform/disputes/settings-and-reports)
>
> See overturn rates by parameter.
> [card] [Report cards](/analytics-platform/coach-agents/report-cards)
>
> Where resolved disputes show for an agent.
> [card] [Overview](/analytics-platform/disputes/overview)
>
> The rules for disputes.
# Review a dispute
Source: https://docs.ringg.ai/analytics-platform/disputes/review-a-dispute
As a QA, take a dispute from the queue, re-score the call with the disputed parameters first, keep the AI's ratings for the rest, and resolve it.
When an agent appeals a call, a QA re-scores it. You rate each disputed parameter with a remark the agent reads, keep or change the AI's ratings for the rest, and resolve; your score becomes the call's official score.
In [Ringg Analytics](https://analytics.ringg.ai): **Sidebar → Interactions → Filter → Appeal**. Owners, admins and QAs can review.
## Before you start
> [card] [A reviewer role](/analytics-platform/roles-and-access)
>
> You are a QA, an admin or the owner.
> [card] [An appeal waiting](/analytics-platform/disputes/raise-a-dispute)
>
> An agent has appealed a call.
## Resolve a dispute
The video shows the whole flow, from the queue to the final score.
Taking an appeal from the queue, re-scoring it and resolving it
**1. Open the queue**
On **Interactions**, click **Filter → Appeal**, pick **Waiting for review** and click **Save**. The queue lists the oldest appeal first.

Appeals waiting for review
**2. Claim the appeal**
Click the call, then **Open full page**. The **Appeal** card shows who appealed, their team lead, the **QA target** and the disputed parameters. Click **Start review**.

An appeal waiting for a QA
> [!TIP]
>
> The appeal moves to **In review**, and other QAs see that you have it.
**3. Rate the disputed parameters**
**Review the appeal** opens with "Disputed by the agent" first. Each disputed parameter shows the agent's reason and the AI's. Pick your rating and write a remark: the remark is required, and the agent reads it.
**4. Keep or change the rest**
**Other parameters** holds everything nobody disputed. Click **Keep AI ratings for …** to keep the AI's rating on all of them, or **Rate them myself** to open them and change any. Tick **Mark interaction as fatal** if the call breaks a fatal rule, and add a note to the agent if you want; it goes in their email.

A disputed parameter accepted, the AI's ratings kept for the rest
**5. Resolve**
Check **Score so far** and click **Resolve appeal**. The confirmation says how many parameters keep the AI's rating; click **Submit final score**, or **Back** to change something.

The last check before the score is final
> [!TIP]
>
> The call shows "Final score · Appeal reviewed by QA" with the AI's score and the outcome, and each disputed parameter's result with your remark. The agent and their team lead get an email: "Appeal reviewed: …".

The resolved appeal
Your work saves as a draft while you review, so you can leave and come back. Only reviewers see the draft; the agent never does.
## Queue filters
| Filter | Lists |
| - | - |
| **Waiting for review** | Appeals no QA has claimed |
| **In review** | Appeals a QA has claimed |
| **In review by me** | Appeals you have claimed |
| **Overdue** | Open appeals past their **QA target** |
| **Resolved** | Appeals with a final score |
| **Not appealed** | Calls without an appeal |
## Release or reassign
* Click **Release** to put an appeal you claimed back in the queue.
* An owner or admin can **Take back** anyone's claim, or pick a QA under **Assign to…** to hand it over.
* A reviewer who is removed from the workspace, or moved to a role that can't review, gives up their claims automatically.
## Blind review
A QA in **Blind review** sees the names of the disputed parameters but not the agent's reasons, and none of the AI's ratings or reasons, so they re-score the call from the recording. **Keep AI ratings** still works; the ratings stay hidden. See [QA settings](/analytics-platform/roles-and-access#qa-settings).
## Outcomes
Each disputed parameter is marked **Changed** or **Unchanged** (**Accepted** or **Rejected** in full view), and the appeal as a whole:
| Outcome | When |
| - | - |
| **AI score upheld** | You changed none of the disputed parameters |
| **Partially overturned** | You changed some of them |
| **Overturned** | You changed all of them |
## Next steps
> [card] [Results and corrections](/analytics-platform/disputes/results-and-corrections)
>
> What the agent sees, and how to correct a result.
> [card] [Settings and reports](/analytics-platform/disputes/settings-and-reports)
>
> Turnaround targets and the dispute report.
> [card] [QA reviews](/analytics-platform/review-calls/qa-reviews)
>
> Review calls nobody disputed.
# Settings and reports
Source: https://docs.ringg.ai/analytics-platform/disputes/settings-and-reports
Turn disputes on, set how long agents can appeal and how fast QAs should resolve, then track appeal and overturn rates to see where the AI is weakest.
Admins turn disputes on and set two deadlines for the workspace. The dispute report then shows how often agents appeal, how often QAs change the AI's rating, and which parameters the AI gets wrong most.
In [Ringg Analytics](https://analytics.ringg.ai): **Sidebar → Settings** for the settings, **Sidebar → Analytics** for the report.
## Settings

Dispute settings
**1. Turn appeals on**
In the **Appeals** card, turn the switch **On**. Agents can't appeal while it is off.
**2. Set the deadlines**
Both are in calendar days, from 1 to 30:
| Setting | Default | Meaning |
| - | - | - |
| **Appeal window** | 3 | How long after the AI scores a call an agent can appeal it. A change applies to calls not yet appealed. |
| **QA turnaround target** | 2 | How soon a QA should resolve an appeal. Later ones are flagged **Overdue**. A change applies to new appeals. |
**3. Save**
> [!TIP]
>
> "Saved" shows next to the button.
Only owners and admins can open **Settings**. Whether a QA sees the AI's score while reviewing is set per QA on **Team** (see [QA settings](/analytics-platform/roles-and-access#qa-settings)).
## Dispute report
The **Disputed AI scores** section at the bottom of **Analytics** covers the period you pick. Owners, admins and QAs in full view can see it.

The dispute report
| Figure | What it measures |
| - | - |
| **Appeal rate** | Scored calls in the period that were appealed |
| **Overturn rate** | Disputed parameters a QA changed, out of all disputed parameters |
| **Median turnaround** | Time from appeal to first resolution, with the time 90% were resolved within |
| **Closed on time** | Appeals resolved by their **QA target**, and how many were corrected later |
| **Open now** | Appeals waiting or in review, and how many are overdue |
| Outcomes | Appeals **Overturned**, **Partially overturned** and **AI score upheld**, the average score change, and how often QAs changed parameters nobody disputed |
| **Overturn rate by parameter** | For each parameter: how often it was disputed and how often the QA changed it. A high rate marks a parameter the AI gets wrong. |
**Open the queue** opens **Interactions** filtered to appeals waiting for review. **Export** downloads the appeals in the period as a spreadsheet, with one sheet for the appeals, one for every disputed parameter's result, and one for their history.
## Next steps
> [card] [Review a dispute](/analytics-platform/disputes/review-a-dispute)
>
> Work through the queue.
> [card] [Metrics](/analytics-platform/set-up/metrics)
>
> Sharpen the descriptions of parameters the AI gets wrong.
> [card] [Roles and access](/analytics-platform/roles-and-access)
>
> Set each QA's review mode.
# Ringg Analytics
Source: https://docs.ringg.ai/analytics-platform/introduction
Ringg Analytics scores your agents' calls against your own rubric, shows each agent and team where to improve, and lets agents dispute AI scores.
Ringg Analytics audits the calls your human agents make and take. It transcribes each call, scores it against your rubric, flags issues, and shows agents, team leads and QAs where to improve.
> [!NOTE]
>
> Ringg Analytics is a separate product at **[analytics.ringg.ai](https://analytics.ringg.ai)**, not part of the Ringg AI dashboard at `ringg.ai/dashboard`. It has its own sign-in: your dashboard login doesn't sign you in here, and the reverse is true too.

The Summary page for the Acme Lending workspace
## Sign in
You join a workspace by invitation. An admin invites QAs, admins and members from **Team**, and agents and team leads from **Agents**; the invite comes by email.
**1. Open analytics.ringg.ai**
Enter your work email and click **Sign in**.
**2. Enter the code**
"Check your email": type the six-digit code from the email. There is no password.
> [!TIP]
>
> You land on **Summary**. If you belong to several workspaces, switch between them from the workspace menu at the top of the sidebar.
## How it works
```mermaid theme={null}
flowchart LR
A[Call recording] --> B[Transcript]
B --> C[Score against your rubric]
C --> D[Summary, Interactions, report cards]
C --> E[Notifications]
D --> F[Agent disputes a score]
F --> G[QA re-scores: official score]
```
Every call is scored against the [metrics](/analytics-platform/set-up/metrics) of its use case: each parameter gets a rating and a reason quoting the transcript, and a missed fatal parameter sets the score to 0. QAs can [review](/analytics-platform/review-calls/qa-reviews) any call, and agents can [dispute](/analytics-platform/disputes/overview) a score they think is wrong.
## Get calls in
On **Interactions**, click **New**:
| Option | What it takes |
| - | - |
| **Call recordings** | `.wav` and `.mp3` audio files |
| **Bulk calls** | A CSV with a link to each recording, plus the agent's email or name |
| **Email conversations** | **Import from CSV** |
| **Video recordings** | `.mp4`, `.mov`, `.avi` and `.mkv` meeting recordings |
Only owners, admins and QAs can add calls. To let your own systems submit recordings, an admin creates a key under **Settings → API Keys → Create API key**.
## What's in Ringg Analytics
> [card] [Roles and access](/analytics-platform/roles-and-access)
>
> Who sees which calls and pages.
> [card] [Summary](/analytics-platform/review-calls/summary)
>
> Scores and trends for your workspace, team or own calls.
> [card] [Interactions](/analytics-platform/review-calls/interactions)
>
> Every call with its transcript, recording and scorecard.
> [card] [QA reviews](/analytics-platform/review-calls/qa-reviews)
>
> Re-score a call by hand next to the AI.
> [card] [Report cards](/analytics-platform/coach-agents/report-cards)
>
> One agent's performance, focus areas and coaching notes.
> [card] [Disputes](/analytics-platform/disputes/overview)
>
> Agents appeal an AI score; a QA settles it.
## Next steps
> [card] [Metrics](/analytics-platform/set-up/metrics)
>
> Set the rubric calls are scored against.
> [card] [Agents and teams](/analytics-platform/coach-agents/agents-and-teams)
>
> Add agents and team leads and invite them.
> [card] [Roles and access](/analytics-platform/roles-and-access)
>
> Decide who sees what.
# Interactions
Source: https://docs.ringg.ai/analytics-platform/review-calls/interactions
Interactions lists every call, email and meeting with its score, agent and status; open one for the transcript, recording and the scorecard behind the score.
**Interactions** is the list of everything Ringg Analytics has scored. Open any row to see why it scored the way it did: the transcript, the recording, and a rating with a reason for every parameter.
In [Ringg Analytics](https://analytics.ringg.ai): **Sidebar → Interactions**.

Interactions for the last 30 days
Agents see only their own calls here and team leads their team's (see [Roles and access](/analytics-platform/roles-and-access)).
## Filter and sort
Click **Filter**. Active filters show as chips above the list; click a chip's **×** to clear it.
| Filter | Options |
| - | - |
| **Type** | Calls, emails or meetings |
| **Status** | **Pending**, **Processing**, **Analyzed**, **Failed** |
| **Agent** | One or more agents. Not shown to agents. |
| **Use Case** | The [use case](/analytics-platform/set-up/metrics) a call was scored under |
| **Duration** | Call length, for example **Under 2 min** |
| **Score** | Score range. Hidden in blind review. |
| **Classification** | Calls tagged with a classification, such as a fatal issue. Not shown to agents and team leads. |
| **Human Evaluation** | Calls a QA has or hasn't [reviewed](/analytics-platform/review-calls/qa-reviews) |
| **Appeal** | [Dispute](/analytics-platform/disputes/overview) status, such as **Waiting for review** or **Overdue**. Agents get **Can still appeal**, **Appealed — awaiting QA** and **Appeal resolved**. |
| **ID / External ID** | A call's ID or your own reference |
The **Score** column shows the official score: a scale icon marks one set by a QA on a resolved dispute, and **FATAL** marks a call whose score is 0 because a fatal parameter was missed.
**Export** downloads the filtered list as a spreadsheet. It's available to owners, admins, QAs and members.
## Open a call
Click a row to open the call in a side panel, or **Open full page** in that panel for the full-width view below.

One call: the transcript on the left, the scorecard on the right
| Section | What it shows |
| - | - |
| Audio | The recording with a waveform. Click the waveform to jump to a moment, and change the playback speed next to it. |
| **Transcript** | Each turn labelled **Agent** or **Customer**, with its time in the call |
| **Speaking distribution** | Talk time and turns for the agent and the customer |
| Score | The overall score, or **AI** and **Human** side by side once a QA has [reviewed](/analytics-platform/review-calls/qa-reviews) the call |
| Categories | Points earned per category, for example **Compliance 40/40**. Expand one for its parameters: the rating, the AI's reason and the quote from the call it is based on. |
| **Summary** and **Key Events** | What happened on the call and what needs follow-up |
| Classifications | Tags such as **Promise to pay**, with their severity |
If the call has a [dispute](/analytics-platform/disputes/overview), its status and result sit at the top of the scorecard.
## Next steps
> [card] [QA reviews](/analytics-platform/review-calls/qa-reviews)
>
> Re-score a call by hand.
> [card] [Raise a dispute](/analytics-platform/disputes/raise-a-dispute)
>
> Agents: appeal a score you think is wrong.
> [card] [Metrics](/analytics-platform/set-up/metrics)
>
> The rubric behind every score.
# QA reviews
Source: https://docs.ringg.ai/analytics-platform/review-calls/qa-reviews
A QA re-scores a call by hand, parameter by parameter, and sees their Human score next to the AI's. Reviews can trigger an email to the agent.
A QA review is a QA's own scoring of a call, done whenever they choose. It sits next to the AI's score and doesn't replace it; to change the official score of a call, the agent [disputes](/analytics-platform/disputes/overview) it and a QA resolves the dispute.
In [Ringg Analytics](https://analytics.ringg.ai): **Sidebar → Interactions →** open a call. Owners, admins and QAs can review.
## Review a call
**1. Open the call**
Open it from **Interactions**, or **Open full page** for more room.
**2. Rate the parameters you check**
Expand a category and pick a rating for each parameter you check, with a comment saying why. Parameters you don't rate keep the AI's rating in your **Human** score.
**3. Mark the call fatal if it is**
Tick **Mark interaction as fatal** to set the Human score to 0, whatever the ratings, and say why.
**4. Save**
Click **Save review**, or **Discard** to drop your changes.
> [!TIP]
>
> The scorecard shows **AI** and **Human** scores side by side.

A reviewed call: the AI scored 85, the QA 95
**View detailed comparison** lists the parameters where you and the AI disagree, or says "Fully aligned". Every save is kept in the call's review history, marked **Added**, **Edited** or **Cleared**, with who made it.
## Rules
* A QA set to **Rate and comment on every parameter** can't save until each parameter has a rating and a comment: "Rate and comment on every parameter to save: N left." Clearing a whole review is always allowed.
* A QA in **Blind review** sees AI ratings, reasons and summaries as `***` while they score, so their ratings stay independent. Admins set both on **Team** (see [QA settings](/analytics-platform/roles-and-access#qa-settings)).
* Use **Human Evaluation** in the **Interactions** filter to list reviewed or unreviewed calls.
## Share reviews with agents
To email the agent each time a QA saves a review, add a notification trigger that starts when **A QA reviews a call**. The ready-made **QA Review Shared** template lists the QA's score against the AI's and every rating and comment. See [Notifications](/analytics-platform/set-up/notifications).
## Next steps
> [card] [Notifications](/analytics-platform/set-up/notifications)
>
> Email agents when a QA reviews their call.
> [card] [Review a dispute](/analytics-platform/disputes/review-a-dispute)
>
> Re-score a call an agent disputed.
> [card] [Report cards](/analytics-platform/coach-agents/report-cards)
>
> Turn reviews into coaching.
# Summary
Source: https://docs.ringg.ai/analytics-platform/review-calls/summary
The Summary page shows call volume, average score, fatal calls and the score trend for your whole workspace, your team, or only your own calls.
**Summary** is the first page after you sign in. What it covers depends on your [role](/analytics-platform/roles-and-access): owners, admins, QAs and members see the whole workspace, a team lead sees their team, and an agent sees their own calls.
In [Ringg Analytics](https://analytics.ringg.ai): **Sidebar → Summary**.
Pick the period with the date picker at the top right; the default is the last 30 days. Scores are the official ones: a call's [resolved dispute](/analytics-platform/disputes/results-and-corrections) score where there is one, otherwise the AI's.
## Workspace

Summary for the whole workspace
| Card or panel | Shows |
| - | - |
| **Total interactions** | Calls, emails and meetings in the period, analyzed and pending |
| **Avg score** | Average score of analyzed interactions, with the split by type |
| **Above 80%** | Interactions that scored 80 or more |
| **Fatal issues** | Fatal classifications found |
| **Agents** | Top or bottom agents by average score. The arrow opens **Agents**. |
| **Interactions** | Best or worst interactions. The arrow opens **Interactions** sorted by score. |
| **Score Trend** | Average score per day |
Switch **All**, **Calls**, **Emails** or **Meetings** at the top to narrow every card to one type.
## Team summary
A team lead's **Summary** covers only their team, with the workspace average as the one benchmark.

A team lead's Summary
* **Team average score** shows the change against the previous period of the same length, and the workspace average.
* **Your team** lists each agent, lowest average first, with their change. Click an agent to open their [report card](/analytics-platform/coach-agents/report-cards).
* **Where the team loses points** lists parameters scored on at least 3 calls where the team earns under 80% of the points.
* **Open appeals** counts the team's [disputes](/analytics-platform/disputes/overview) waiting for a QA.
## My summary
An agent's **Summary** covers only their own calls: their average and trend, lowest-scoring calls, the parameters to focus on, and **New coaching notes** from their team lead or QA. The notes card opens **My report card**.

An agent's own Summary
## Next steps
> [card] [Interactions](/analytics-platform/review-calls/interactions)
>
> Open a call behind a score.
> [card] [Report cards](/analytics-platform/coach-agents/report-cards)
>
> One agent's performance in depth.
> [card] [Roles and access](/analytics-platform/roles-and-access)
>
> Why each role sees different figures.
# Roles and access
Source: https://docs.ringg.ai/analytics-platform/roles-and-access
Each Ringg Analytics role sees only the calls and pages it needs: agents their own calls, team leads their team, QAs and admins the whole workspace.
Every member of a Ringg Analytics workspace has one role. The role decides which calls they can open and which pages they see; the server enforces the same rules, so a hidden page's data can't be fetched another way.
In [Ringg Analytics](https://analytics.ringg.ai): **Sidebar → Team** (owners and admins).
## Roles
| Role | Calls they see | Pages | Can also |
| - | - | - | - |
| **Owner** | All | All | Everything an admin can. Set when the workspace is created. |
| **Admin** | All | All, plus **Team** and **Settings** | Manage members, agents, metrics, notifications and dispute settings; reassign disputes; delete and reprocess calls |
| **QA** | All | All except **Team** and **Settings** | Add calls, [review](/analytics-platform/review-calls/qa-reviews) calls, resolve [disputes](/analytics-platform/disputes/review-a-dispute), set up notifications, coach agents |
| **Team lead** | Their team: the agents who report to them, directly or further down | **Summary** (their team), **Interactions**, **Agents** (their team, read-only), **Metrics** (read-only) | Leave coaching notes on their agents' [report cards](/analytics-platform/coach-agents/report-cards) |
| **Agent** | Their own | **Summary** (their own), **Interactions**, **My report card**, **Metrics** (read-only) | [Dispute](/analytics-platform/disputes/raise-a-dispute) an AI score |
| **Member** | All | All except **Notifications**, **Team** and **Settings** | Read only |
A team lead sees the workspace average as a benchmark, but never another team's figures. An agent sees no team or workspace figures at all.
## Invite members
**1. Invite QAs, admins and members from Team**
Click **Invite User**, enter the name and email, and pick the role. For a QA, also pick the **Review mode** and whether they must **Rate and comment on every parameter** (see [QA settings](#qa-settings)).
**2. Add agents and team leads from Agents**
Adding an agent with an email invites them and links their login to their agent record, which is what limits them to their own calls. See [Agents and teams](/analytics-platform/coach-agents/agents-and-teams).
> [!TIP]
>
> The invite arrives by email, and the member shows **Invite pending** until they sign in.
An agent or team lead whose login isn't linked to an agent record sees no calls. Their **Summary** says "Your login isn't linked to an agent yet".
## QA settings
Set per QA when you invite them, or later from the icon next to their role on **Team**.
| Setting | What it does |
| - | - |
| **Review mode: Blind review** (recommended) | The QA scores calls without seeing the AI. AI scores, reasoning and summaries show as `***`, and pages built on AI scores (**Summary**, **Business**, **Agents**, **Analytics**, **Notifications**) are hidden. |
| **Review mode: Full view** | The QA sees AI scores, reasoning and summaries next to the rubric, plus the dashboards. |
| **Rate and comment on every parameter** | The QA can't save a review until every parameter has a rating and a comment. |
## Next steps
> [card] [Agents and teams](/analytics-platform/coach-agents/agents-and-teams)
>
> Build the team structure team leads are scoped to.
> [card] [QA reviews](/analytics-platform/review-calls/qa-reviews)
>
> How QAs score calls by hand.
> [card] [Disputes](/analytics-platform/disputes/overview)
>
> How agents challenge an AI score.
# Metrics
Source: https://docs.ringg.ai/analytics-platform/set-up/metrics
Metrics hold the rubric Ringg Analytics scores calls against: one set per use case, with weighted parameters, rating scales and fatal rules.
A rubric is the list of parameters a call is scored on, grouped into categories, each with a weight. Each use case, such as EMI collections, has its own rubric per channel; every call is scored against the rubric of its use case.
In [Ringg Analytics](https://analytics.ringg.ai): **Sidebar → Metrics**. Everyone can read the metrics; only owners and admins change them.

The EMI collections rubric
## Set up a rubric
**1. Create the use case**
On **Metrics**, click **New Use Case** and name it for the kind of call, for example "EMI collections".
**2. Add the parameters**
Open the use case. On **Quality metrics**, click **Add parameters** for one at a time, or **Import Sheet** to load a spreadsheet of them. **Edit Rubric** changes existing ones. Pick the channel the rubric applies to under **Channel**.
**3. Check the totals**
The cards at the top show the number of parameters, the **Total weight**, the categories and the **Fatal rules**.
> [!TIP]
>
> New calls in the use case are scored against the rubric. **Export** downloads it as a spreadsheet.
## Parameters
Each parameter has a category, a weight, a scale, and a description the AI follows when it rates a call. The call's score is the share of the total weight it earned, out of 100.
| Scale | Ratings | Points |
| - | - | - |
| Yes / No | Yes, No | Full or none |
| Yes / No / N/A | Yes, No, N/A | N/A leaves the parameter out of the score |
| Yes / Maybe / No | Yes, Maybe, No | Maybe earns half |
| 0 / 3 / 5 | 0, 3, 5 | A share of the weight |
| 0 to 5 | 0 to 5 | A share of the weight |
* **Fatal** parameters are the ones a call can't miss, such as verifying the customer's identity. Missing one sets the call's score to 0 and flags it **FATAL**.
* **Optional** parameters don't count toward the score.
**Business metrics** track outcomes such as a payment promise, and **Custom variables** declare values you send with each call; both are set per use case.
## Next steps
> [card] [Interactions](/analytics-platform/review-calls/interactions)
>
> See a call's rating for each parameter.
> [card] [Notifications](/analytics-platform/set-up/notifications)
>
> Alert agents on low scores or fatal misses.
> [card] [Report cards](/analytics-platform/coach-agents/report-cards)
>
> Each agent's results per parameter.
# Notifications
Source: https://docs.ringg.ai/analytics-platform/set-up/notifications
Email agents automatically when a call scores low, misses a fatal parameter or gets a QA review, with their team lead in CC, using templates you design.
A trigger sends an email when a call meets your conditions: after the AI scores it, or each time a QA reviews it. Use triggers for alerts such as a fatal miss, and to share QA feedback with the agent.
In [Ringg Analytics](https://analytics.ringg.ai): **Sidebar → Notifications**. Owners, admins and QAs can open it.

Triggers and templates on the Setup tab
## Add a trigger
**1. Start a trigger**
On **Setup**, click **Add trigger** and give it a **Trigger name**. Pick the **Use case**: the trigger only fires for calls in it, and its parameters become available as conditions.
**2. Choose what starts it**
Under **What starts it?**:
* **The AI scores a call**: runs once the AI has scored and classified the call.
* **A QA reviews a call**: runs each time a QA saves a change to their [review](/analytics-platform/review-calls/qa-reviews). Saving an unchanged review, or clearing it, sends nothing.
**3. Set the conditions**
Under **When should this fire?**, add conditions and groups. Within a group, pick whether all or any of them must match.
**4. Pick the template and recipients**
Choose a [template](#templates) under **What message should we send?**. Under **Who should receive it?**, pick **Agent on the interaction** or **Specific email addresses**, and tick **CC the agent's team lead** to copy their current team lead.
> [!TIP]
>
> The trigger appears on **Setup**, and every email it sends shows on the **History** tab.

A trigger that shares QA reviews with the agent
## Conditions
| Condition | Available for | Means |
| - | - | - |
| **Overall Score** | Both | The call's official score, 0 to 100 |
| **Max Severity** | Both | The most severe classification on the call |
| **Source Type** | Both | Call, email or meeting |
| **Fatal Parameter Count** | Both | Fatal parameters the call missed |
| **Min Category Score** | Both | The lowest category score |
| A parameter, by name | Both | Whether the AI gave it full marks (Yes / No), Yes / Maybe / No, or its share of points |
| **QA Score** | QA reviews | The QA's score: their ratings, the AI's for parameters they didn't rate, 0 if marked fatal |
| **QA Score minus AI Score** | QA reviews | Negative when the QA scored lower than the AI |
| **QA Marked Fatal** | QA reviews | Yes or No |
| **QA Fatal Parameter Count** | QA reviews | Fatal parameters missed under the QA's ratings |
| **Parameters the QA Changed** | QA reviews | How many parameters the QA rated differently from the AI |
| QA: a parameter, by name | QA reviews | That parameter under the QA's rating |
QA conditions can't be used with **The AI scores a call**: there is no review yet at that point.
## Templates
A template is the email a trigger sends: a subject and a body built from blocks, with a live preview using sample data. Five come with every workspace, marked **System**: **Fatal Classification Alert**, **Low Score Alert**, **Classification Summary**, **General Notification** and **QA Review Shared**. Click **New template** under **Templates** to add your own, or **Edit** on one to change it.
Type `@` in a block to insert a variable:
| Variable | Filled with |
| - | - |
| `agent_name`, `interaction_title`, `overall_score`, `max_severity`, `summary` | The call and its official score |
| `qa_score`, `ai_score`, `qa_score_change_text` | The QA's score, the AI's, and the difference, for example "−14 points vs the AI" |
| `qa_reviewer_name`, `qa_reviewed_at`, `qa_fatal_reason` | Who reviewed, when (India time), and why they marked it fatal |
| `qa_parameters` | A list of the parameters the QA rated or commented on, each with the AI's rating, the QA's rating and the comment |
QA variables are empty in emails sent by **The AI scores a call** triggers.
## Send one email by hand
Owners, admins and QAs can email an agent from their [report card](/analytics-platform/coach-agents/report-cards) with **Email**, using any template.
## Next steps
> [card] [QA reviews](/analytics-platform/review-calls/qa-reviews)
>
> What a QA review contains.
> [card] [Disputes](/analytics-platform/disputes/overview)
>
> Dispute emails go out on their own, with the team lead in CC.
> [card] [Metrics](/analytics-platform/set-up/metrics)
>
> The parameters your conditions use.
# Get All User Workspaces
Source: https://docs.ringg.ai/api-reference/account/get-all-user-workspaces
get /workspace/all
List every workspace the API key's user can access, with role, credits and parent workspace, to see which workspaces are Ringg Spaces of a primary.
A workspace with `parent_workspace_id` set is a [Ringg Space](/documentation/manage-account/ringg-spaces/ringg-spaces-by-api#manage-the-family-by-api) of that primary.
## Notes
* Calls, campaigns and analytics always act on the workspace that owns the key. To work in another workspace from this list, use that workspace's own key.
Related topics
# Get Workspace Info
Source: https://docs.ringg.ai/api-reference/account/get-workspace-info
get /workspace
Get the workspace that owns your API key, with its name, ID and credit balance; use it as the first request to confirm a key works and points where expected.
## Notes
* A `401` means the key is wrong or was regenerated. Get the current key from the workspace owner ([API key](/documentation/manage-account/api-key)).
* Check `name` before storing a key: each workspace and each [Ringg Space](/documentation/manage-account/ringg-spaces/overview) has its own key.
Related topics
# List Workspace Users
Source: https://docs.ringg.ai/api-reference/account/list-workspace-users
get /workspace/users
List the members of your workspace with their user ID, name, email, role and invite status, for example to pick who gets a campaign completion email.
Use the `id` values in `email_completion_user_ids` when starting a campaign ([number pool](/api-reference/calling/campaigns/start-campaign-v2) or [large campaign](/api-reference/calling/large-campaigns/make-large-campaign-calls-async)) to email those members when it completes.
## Notes
* The API only reads members. Invite people and change roles in the dashboard.
Related topics
# Allocate Concurrency to a Ringg Space
Source: https://docs.ringg.ai/api-reference/account/ringg-spaces/allocate-concurrency
patch /workspace/sub/{sub_workspace_id}/concurrency
Set how many concurrent calls one Ringg Space may run, out of the capacity bought on the primary; a new Ringg Space starts at 0 and cannot call.
Allocations across all Ringg Spaces cannot exceed the capacity bought on the primary. The same call rebalances capacity between clients or teams later.
## Notes
* `concurrency` is absolute, not a delta. Lowering an allocation always succeeds; raising it must fit `family.concurrency_available` from [Get Ringg Spaces](/api-reference/account/ringg-spaces/get-sub-workspaces).
* `limit_concurrency` in the response is the persisted ceiling. In an individual-billing family it equals the allocation. In a common-billing family it is the family total, because idle capacity is shared, so it can be larger than `concurrency`.
* This is the only allocation endpoint that applies to common-billing families; money is pooled on the primary there.
* When `family.concurrency_available` reaches `0`, buy more capacity on the primary, then allocate the new slots here.
## Errors
* `400`: `Only 30 concurrent calls are available to allocate from the parent workspace (capacity 50, 20 already allocated to other sub-workspaces).` — the allocation does not fit.
* `400`: `Sub-workspaces cannot have their own sub-workspaces.` — the key belongs to a Ringg Space that has Ringg Spaces enabled.
* `401`: Invalid or missing API key.
* `403`: `Sub-workspaces are not enabled for this workspace.` — Ringg Spaces are not enabled on the primary, or the key belongs to a Ringg Space.
* `404`: `Sub-workspace not found` — no active Ringg Space with this ID under your primary.
* `422`: `sub_workspace_id` is not a UUID, or `concurrency` is negative or missing.
Related topics
# Create Ringg Space
Source: https://docs.ringg.ai/api-reference/account/ringg-spaces/create-sub-workspace
post /workspace/sub
Create a Ringg Space under your primary workspace with one API call; it starts with no balance, concurrency or API key until you allocate to it.
Use it for a client, brand or team that needs its own agents, numbers and call history. The Ringg Space's default agents and telephony are set up for it, and its currency, account type and billing plan are copied from the primary.
## Notes
* Store the returned `sub_workspace.id`; every allocation call needs it.
* The first Ringg Space you create turns the primary into a family in individual billing mode. Contact Ringg support if the family should use common billing instead.
* Every member of the primary automatically gets access to the new Ringg Space.
## Errors
* `400`: `Sub-workspaces cannot have their own sub-workspaces.` — the key belongs to a Ringg Space that has Ringg Spaces enabled.
* `401`: Invalid or missing API key.
* `403`: `Sub-workspaces are not enabled for this workspace.` — Ringg Spaces are not enabled on the primary, or the key belongs to a Ringg Space.
* `422`: Missing or blank `name`, or a name longer than 100 characters.
## After creation
Give the Ringg Space capacity with [Allocate Concurrency](/api-reference/account/ringg-spaces/allocate-concurrency) and, in an individual family, a [credit limit](/api-reference/account/ringg-spaces/reallocate-credit-limits) or [balance](/api-reference/account/ringg-spaces/reallocate-credit-balances). The response never contains an API key: generate one in the dashboard ([Ringg Spaces](/documentation/manage-account/ringg-spaces/ringg-spaces-by-api#manage-the-family-by-api)), then [create an agent](/api-reference/agents/create-agent) with that key.
Related topics
# Get Ringg Spaces
Source: https://docs.ringg.ai/api-reference/account/ringg-spaces/get-sub-workspaces
get /workspace/sub
Get your whole Ringg Space family in one call: the primary's summary, each Ringg Space's allocation, members and month-to-date usage, and family totals.
Use it for a tenant dashboard in your own admin tool, to check headroom before allocating concurrency or credit, and to reconcile per-client usage at month end.
## Reading the response
* `family.concurrency_available` is what [Allocate Concurrency](/api-reference/account/ringg-spaces/allocate-concurrency) can still hand out; `family.available_pot` (prepaid) is what [Reallocate Credit Balances](/api-reference/account/ringg-spaces/reallocate-credit-balances) can still move out of the primary.
* `family.is_individual_entity` tells you the billing mode: `true` for individual (each Ringg Space has its own wallet or limit), `false` for common (one pool on the primary). The keys present in `family` and in each row's `billing` depend on it; the response schema below lists them per mode.
* `usage_this_period` is the value of completed calls since the 1st of the current month in the `Asia/Kolkata` timezone, in the workspace's billing currency.
* Amounts are JSON numbers here (`200000.0`); the two allocation endpoints return decimal strings.
## Notes
* Works on a primary with no Ringg Spaces yet; `sub_workspaces` is then an empty list.
* Archived Ringg Spaces are not listed.
## Errors
* `400`: `Sub-workspaces cannot have their own sub-workspaces.` — the key belongs to a Ringg Space that has Ringg Spaces enabled.
* `401`: Invalid or missing API key.
* `403`: `Sub-workspaces are not enabled for this workspace.` — Ringg Spaces are not enabled on the primary, or the key belongs to a Ringg Space.
Related topics
# List Family Members
Source: https://docs.ringg.ai/api-reference/account/ringg-spaces/list-family-members
get /workspace/sub/members
List everyone with access to your Ringg Space family, whether they inherit access from the primary or were added to one Ringg Space, with permissions.
Members of the primary (`scope: "primary"`) inherit access to every current and future Ringg Space; people added directly to a Ringg Space (`scope: "sub"`) see only the Ringg Spaces in their `sub_workspace_ids`. Use it for access audits across client or team workspaces, or to show who can reach a Ringg Space in your own admin tool.
## Notes
* `permissions_by_workspace` already includes inherited rows, so render access from it rather than deriving it from `scope`.
* The endpoint only reads. Add or remove people in the dashboard ([Workspace members](/documentation/manage-account/members)).
## Errors
* `400`: `Sub-workspaces cannot have their own sub-workspaces.` — the key belongs to a Ringg Space that has Ringg Spaces enabled.
* `401`: Invalid or missing API key.
* `403`: `Sub-workspaces are not enabled for this workspace.` — Ringg Spaces are not enabled on the primary, or the key belongs to a Ringg Space.
Related topics
# Reallocate Credit Balances
Source: https://docs.ringg.ai/api-reference/account/ringg-spaces/reallocate-credit-balances
patch /workspace/sub/credit-balances
Set every Ringg Space's wallet to an absolute balance, moving the difference to or from the primary, for prepaid families in individual billing mode.
Use it to distribute a top-up made on the primary across clients or teams, or to pull unused balance back from one Ringg Space to fund another.
## Rules
* The net amount moving out of the primary's pot cannot exceed what the pot holds. Top up on the primary first, then allocate.
* A Ringg Space with a `0` balance cannot place calls; Ringg Spaces have no overdraft.
* Every move is recorded in the workspace ledgers as a transfer, never as a charge.
* In a common-billing family the wallet is shared on the primary and Ringg Spaces hold nothing, so this endpoint returns `400`. Allocate [concurrency](/api-reference/account/ringg-spaces/allocate-concurrency) instead.
## Notes
* Read the current wallets and `family.available_pot` from [Get Ringg Spaces](/api-reference/account/ringg-spaces/get-sub-workspaces) first, then send the full map.
* Amounts in the request can be JSON numbers (`200000`) or numeric strings (`"200000.00"`); they are rounded to two decimals.
* Amounts in the response are decimal strings (`"5000.00"`), unlike the read endpoints.
## Errors
* `400`: `Balance allocation applies to prepaid families only.`
* `400`: `This family uses a shared balance; per-sub wallets do not exist.`
* `400`: `allocations name workspaces that are not active sub-workspaces of this family: [...]`
* `400`: `allocations must cover every active sub-workspace; missing: [...]`
* `400`: `These allocations need 9000.00 from the primary's pot, which only holds 4000.00. Lower the allocations or add balance to the primary workspace first.`
* `401`: Invalid or missing API key.
* `403`: `Sub-workspaces are not enabled for this workspace.` — Ringg Spaces are not enabled on the primary, or the key belongs to a Ringg Space.
* `404`: `Workspace is not a sub-workspace family parent.` — the primary has no Ringg Spaces yet.
* `422`: Empty map, negative value, or a key that is not a UUID.
Related topics
# Reallocate Credit Limits
Source: https://docs.ringg.ai/api-reference/account/ringg-spaces/reallocate-credit-limits
patch /workspace/sub/credit-limits
Set every Ringg Space's credit limit in one call, and optionally the family total, for postpaid Ringg Space families in individual billing mode.
Use it to split the family's credit limit across clients or teams, or to raise one client's limit while keeping the total unchanged.
## Rules
* Values are absolute limits, not deltas.
* A Ringg Space's limit cannot go below what it has already used this month.
* The sum of all allocations cannot exceed the family total. Allocating less than the total is allowed; the remainder stays with the primary.
* What remains with the primary must still cover the primary's own utilized amount.
* In a common-billing family there are no per-Ringg Space limits: every charge utilizes the primary's single credit limit, and this endpoint returns `400`. Allocate [concurrency](/api-reference/account/ringg-spaces/allocate-concurrency) instead.
## Notes
* Read the current limits and usage from [Get Ringg Spaces](/api-reference/account/ringg-spaces/get-sub-workspaces) first, then send the full map.
* Amounts in the request can be JSON numbers (`200000`) or numeric strings (`"200000.00"`); they are rounded to two decimals.
* Amounts in the response are decimal strings (`"200000.00"`), unlike the read endpoints.
## Errors
* `400`: `Credit-limit reallocation applies to postpaid families only.`
* `400`: `This family uses common billing; per-sub credit limits do not exist.`
* `400`: `Allocations must cover every active sub-workspace exactly once. Missing: [...]; unknown: [...].`
* `400`: `Credit limit 100.00 for sub-workspace 'Mumbai Collections' is below its utilized amount 34210.50.`
* `400`: `The total credit limit across sub-workspaces must not exceed the parent workspace's credit limit (500000.00); allocations sum to 600000.00.`
* `400`: `These allocations would leave the primary workspace with 1000.00, below its already-utilized 12500.00. Lower the sub-workspace limits or raise the primary credit limit.`
* `401`: Invalid or missing API key.
* `403`: `Sub-workspaces are not enabled for this workspace.` — Ringg Spaces are not enabled on the primary, or the key belongs to a Ringg Space.
* `404`: `Workspace is not a sub-workspace family parent.` — the primary has no Ringg Spaces yet.
* `422`: Empty map, negative value, or a key that is not a UUID.
Related topics
# Create Agent
Source: https://docs.ringg.ai/api-reference/agents/create-agent
post /public/agent
Create a single-prompt voice agent from a prompt, language, voice and first message, with optional call settings such as calling window and voicemail.
Use it when your product sets up agents for its own customers from a template; for a one-off agent, the [dashboard](/documentation/build-agents/agents/create-an-agent) is quicker and also builds multi-prompt agents.
The response returns the new agent's ID as `data.id`. Store it: calls and campaigns need it as `agent_id`.
## Prompt sections
The prompt fields become the agent's prompt sections, in this order:
| Field | Section in the dashboard |
| - | - |
| `introduction_and_objective` | Objective |
| `response_guidelines` | Response Guidelines |
| `task` | Conversation Script; `sample_conversations` is added at its end |
| `faq` | FAQs (empty when `faq` is left out) |
`intro_message` becomes the agent's first message.
`primary_language` and `secondary_language` accept `en-US`, `en-GB`, `en-AU`, `en-IN`, `hi-IN`, `ta-IN`, `te-IN`, `bn-IN`, `mr-IN`, `kn-IN`, `ms-MY`, `zh-CN`, `od-IN`, `pa-IN` and `my-MM`. The voice must support the language, or the request returns `400` with code `VOICE_LANGUAGE_MISMATCH`.
## Call settings
`call_config` sets how the agent's calls behave. Every key is optional; leave one out to keep its default.
| Field | What it controls | Default |
| - | - | - |
| `call_time` | Daily calling window: `call_start_time` and `call_end_time` (`HH:MM`, 24-hour) in `timezone` | `09:00`–`21:00`, `Asia/Kolkata` |
| `max_call_length` | Hard cap on call length, in seconds (10–3600) | `240` |
| `idle_timeout_warning` | Seconds of caller silence (0–600) before the agent asks if they are still there; `0` turns the check-in off | `5` |
| `idle_timeout_end` | Seconds of caller silence (1–600) before the call ends; must be greater than `idle_timeout_warning` | `10` |
| `noise_filter_config` | Noise cancellation on the caller's audio: `filter_noise` on/off, `noise_suppression_level` 0–100 | off, `80` |
| `voicemail` | `detect` voicemail, then `action`: `end`, `summarise`, or `static_message` (speaks the `static_message` text); `retry` re-queues the call | detect on, `end`, retry on |
| `background_audio_config` | Ambient track under the agent's voice: `audio_id` (only `office_ambience`) and `volume` from `0.0` to `1.0` | off |
| `mute_during_intro` | `true`: the caller cannot interrupt the first message | `true` |
```json theme={null}
{
"agent_name": "EMI reminder",
"introduction_and_objective": "You are Asha, calling Acme Lending customers about an upcoming EMI.",
"response_guidelines": "Be polite and brief. Confirm the due date before ending the call.",
"task": "Remind the customer of the EMI due date and amount, and note if they want a callback.",
"primary_language": "en-IN",
"voice_id": "your-voice-id",
"intro_message": "Hello, this is Asha from Acme Lending.",
"call_config": {
"call_time": { "call_start_time": "10:00", "call_end_time": "18:30", "timezone": "Asia/Kolkata" },
"max_call_length": 300,
"idle_timeout_warning": 8,
"idle_timeout_end": 20,
"voicemail": { "detect": true, "action": "end", "retry": true },
"mute_during_intro": false
}
}
```
Get `voice_id` from [List voices](/api-reference/agents/get-assistant-voices).
### Calling window
Outbound calls placed outside the window wait for the next opening, and so do retries. A campaign or an individual call can set its own window instead. The window may cross midnight: `22:00` to `06:00` is valid.
`timezone` accepts any IANA zone, such as `America/New_York`, `Europe/London`, `Asia/Dubai`, `Australia/Sydney` or `UTC`.
> [!WARNING]
>
> Use the `Region/City` form. `IST`, `PST` and `CST` are rejected. `EST`, `MST`, `HST` and `GMT` are accepted but never change for daylight saving, so an agent on `EST` calls an hour late for most of the year compared with `America/New_York`.
### Validation rules
The request fails, rather than the agent's later calls, when:
* a time is not zero-padded 24-hour (`09:00` works, `9:00` and `9:00 AM` do not);
* `idle_timeout_warning` is not less than `idle_timeout_end`;
* `background_audio_config.volume` is outside `0.0`–`1.0` (send `0.5`, not `50`).
## Notes
* To change call settings after creation, use `edit_call_config` on [Edit agent settings](/api-reference/agents/edit-assistant), or [Call settings](/documentation/build-agents/customize-agent-behaviour/call-settings) in the dashboard. `PATCH /public/agent/{agent_id}` (Update Agent) changes the prompt fields, language, voice, first message, type and variables, but not `call_config`.
* Before running a campaign, check the new agent with one [individual call](/api-reference/calling/individual-calls/initiate-individual-call).
Related topics
# Edit Agent Settings
Source: https://docs.ringg.ai/api-reference/agents/edit-assistant
patch /agent/v1
Change one setting on an existing agent per request, such as its prompt, voice, knowledge base, inbound number or webhook subscriptions, by operation name.
Each request names an `operation` and carries the field that operation needs, so a prompt edit cannot overwrite the voice or the webhooks by accident.
## Operations and fields
| `operation` | Field to send |
| - | - |
| `edit_prompt` | `agent_prompt` |
| `edit_call_config` | `call_config` |
| `edit_agent_display_name` | `agent_display_name` |
| `edit_intro_message` | `intro_message` |
| `edit_voice` | `voice_id`, plus `language` (a voice must support the language); optional `secondary_voice_id` |
| `edit_voice_speed` | `voice_speed` |
| `edit_noise_settings` | `mute_during_intro` and `mute_while_bot_speaking`, both required |
| `edit_vocab` | `vocab` |
| `edit_query_phrases` | `pre_query_response_phrases`, optional `pre_query_phrase_probability` |
| `edit_vad_settings` | `vad_settings` |
| `edit_custom_vars` | `custom_variables` |
| `attach_kb`, `remove_kb` | `kb_id` |
| `attach_inbound_number`, `remove_inbound_number` | `number_id` |
| `edit_agent_whitelisted_domains` | `whitelisted_domains` (web agents) |
| `edit_chat_settings` | `chat_settings` (WhatsApp agents) |
| `edit_event_subscriptions` | `event_subscriptions` |
`agent_id` is required on every request. Without `version_id`, the change applies to the agent's active version; send `version_id` to change another version. An unknown operation, or a missing field, returns `422`.
## Replace or merge
* `edit_prompt` replaces the whole prompt. Send every section; a section you leave out is deleted.
* `edit_call_config` merges: only the keys you send change, and nested objects such as `voicemail` merge key by key.
* `edit_custom_vars`, `edit_vocab`, `edit_query_phrases`, `edit_vad_settings`, `edit_agent_whitelisted_domains` and `edit_event_subscriptions` replace the current value with the one you send. An outbound agent must keep `callee_name` and `mobile_number` in `custom_variables`, or the request returns `403`.
```json theme={null}
{
"operation": "edit_call_config",
"agent_id": "your-agent-id",
"call_config": {
"max_call_length": 300,
"voicemail": { "detect": true, "action": "end" }
}
}
```
## Webhook subscriptions
`edit_event_subscriptions` replaces the agent's whole subscription list with the one you send. Read the current list first and send it back with your change, or you will delete the subscriptions you left out.
```json theme={null}
{
"operation": "edit_event_subscriptions",
"agent_id": "your-agent-id",
"event_subscriptions": [
{
"event_type": ["all_processing_completed"],
"callback_url": "https://api.example.com/webhooks/ringg",
"method_type": "POST",
"headers": { "Authorization": "Bearer your-webhook-receiver-token" }
}
]
}
```
Each event type can have up to 4 subscriptions on one agent. Call events (`call_started`, `call_ringing`, `call_ongoing`, `call_completed`, `recording_completed`) apply to voice agents and `chat_completed` to WhatsApp agents; subscribing to an event the agent's channel never sends returns `400`.
## Notes
* Place one test [individual call](/api-reference/calling/individual-calls/initiate-individual-call) after a change, before the agent runs a campaign.
* Call settings such as the calling window and voicemail handling are changed with `edit_call_config`, or in the dashboard under [Call settings](/documentation/build-agents/customize-agent-behaviour/call-settings).
Related topics
# Get Agent
Source: https://docs.ringg.ai/api-reference/agents/get-assistant-by-id
get /agent/{agent_id}
Get one agent's configuration by its agent_id to confirm the agent exists in this workspace and check its name, type and settings before you call with it.
The agent is returned under `agents` as an object. Agent-level fields, such as `agent_display_name`, `agent_type` and `active_agent_version_id`, sit at the top; each version's language, voice, prompt (`agent_config`), tools, knowledge bases, `call_config` and `event_subscriptions` sit under `version_details`, keyed by version ID. For an outbound-inbound agent, add `type=inbound` to get its inbound settings.
A `404` means no agent with that ID exists in the workspace that owns the API key. Use it to check that an `agent_id` stored in your system still points at the agent you expect, for example after a call behaved unexpectedly.
Related topics
# List Voices
Source: https://docs.ringg.ai/api-reference/agents/get-assistant-voices
get /agent/voices
List the voices you can give an agent, with their supported languages, preview audio and gender, optionally filtered by one or more language codes.
Pass the chosen voice's `id` as `voice_id` when you [create an agent](/api-reference/agents/create-agent) or change its voice.
## Notes
* A voice works only in the languages listed in its `languages`. Pairing a voice with a language it does not support returns `400`.
Related topics
# List Agents
Source: https://docs.ringg.ai/api-reference/agents/get-assistants
get /agent/all
List the agents in your workspace with their IDs, display names and types, so your backend can pick the agent_id that calls and campaigns need.
## Notes
* Without `limit`, every agent is returned. `search` filters by name.
* Each agent lists its `versions` (`version_id`, `version_slug`, `is_archived`). Prompt, voice and other settings are not included; use [Get agent](/api-reference/agents/get-assistant-by-id).
* An agent's ID does not change when the agent is edited, so look it up once during setup and store it rather than fetching it before every [call](/api-reference/calling/individual-calls/initiate-individual-call) or [campaign](/api-reference/calling/campaigns/upload-campaign-contact-list).
* For one agent's full configuration, call [Get agent](/api-reference/agents/get-assistant-by-id).
Related topics
# Get All Campaigns
Source: https://docs.ringg.ai/api-reference/calling/campaigns/get-all-campaigns
get /campaign/all
List the campaigns in your workspace with their status, schedule and contact counts, to follow each campaign from upload to completion.
A campaign's `id` is the `list_id` or `bulk_list_id` returned when its list was uploaded, so you can match rows to the campaigns you created.
## Statuses
| `campaign_status` | Meaning |
| - | - |
| `verifying` | The uploaded list is being validated |
| `draft` | Validated, calls not started |
| `insufficient_balance` | The workspace balance does not cover the list. Listing the campaigns re-checks it and moves it back to `draft` once the balance covers it |
| `preparing` | Launched; calls are being prepared |
| `scheduled` | Calls are waiting for the start time |
| `ongoing` | Calls are being placed |
| `completed` | The campaign has finished |
| `terminated` | Stopped with [Terminate calls](/api-reference/calling/campaigns/stop-campaign) |
| `no_valid_contacts` | Every row in the list was invalid |
| `failed` | The list or the launch failed |
| `processing` | A workflow campaign is being prepared |
| `null` | The row is a list that is not a campaign, such as a contact list |
## Notes
* `limit` defaults to `10`; page with `offset`.
* `total_calls` is the number of valid contacts loaded from the list, not the number of calls placed. It is `0` until the list has been validated. `invalidated_rows_count` is the number of rows dropped as invalid.
* Rows in `insufficient_balance` also carry `additional_balance_required`, the extra balance needed, as a decimal string.
* For the calls inside one campaign, use [call history](/api-reference/monitoring/call-history/get-call-history) with `bulk_list_id`.
Related topics
# Start Campaign
Source: https://docs.ringg.ai/api-reference/calling/campaigns/start-campaign
post /campaign/start
Start a campaign uploaded with POST /campaign/save using caller numbers you list in from_numbers; the campaign then moves to scheduled or ongoing.
To let Ringg choose caller numbers from a [number pool](/documentation/inventory/phone-numbers/number-pools) instead, use [Start campaign (number pool)](/api-reference/calling/campaigns/start-campaign-v2).
`list_id` is the one returned by [Upload campaign contact list](/api-reference/calling/campaigns/upload-campaign-contact-list); `agent_id` is the agent the list was uploaded for; `from_numbers` are workspace numbers from [List workspace numbers](/api-reference/inventory/numbers/get-workspace-numbers): send each number's `id` (recommended), or the number written exactly as it is listed there. Each retry dials the next number in the list.
```json theme={null}
{
"agent_id": "your-agent-id",
"list_id": "123e4567-e89b-12d3-a456-426614174000",
"from_numbers": ["00000000-0000-4000-8000-000000000109"]
}
```
A success returns `{"status": "campaign registered successfully!"}` and the campaign's `campaign_status` becomes `scheduled` or `ongoing` in [Get all campaigns](/api-reference/calling/campaigns/get-all-campaigns).
The workspace balance must cover the campaign ([Billing](/documentation/manage-account/billing)); otherwise the request returns `402`.
## Errors
* `400`: an ID is wrong, a caller number is not in the workspace (`From numbers not found: …`), or the campaign has already started.
* `402`: the balance does not cover the campaign.
* `401`: `X-API-KEY` is missing or invalid.
Related topics
# Start Campaign (Number Pool)
Source: https://docs.ringg.ai/api-reference/calling/campaigns/start-campaign-v2
post /campaign/v2/start
Start a campaign uploaded with POST /campaign/save, taking caller numbers from a number pool that rotates numbers and skips ones flagged as spam.
`list_id` is the one returned by [Upload campaign contact list](/api-reference/calling/campaigns/upload-campaign-contact-list); `agent_id` is the agent the list was uploaded for. Copy `number_pool_id` with **Copy pool ID** on the **Number pools** page ([Number pools](/documentation/inventory/phone-numbers/number-pools)). `email_completion_user_ids` are workspace user IDs from [List workspace users](/api-reference/account/list-workspace-users).
```json theme={null}
{
"agent_id": "your-agent-id",
"list_id": "123e4567-e89b-12d3-a456-426614174000",
"number_pool_id": "your-number-pool-id"
}
```
The response, the balance requirement and the errors are the same as for [Start campaign](/api-reference/calling/campaigns/start-campaign).
Related topics
# Terminate Calls by Campaign ID
Source: https://docs.ringg.ai/api-reference/calling/campaigns/stop-campaign
PATCH /campaign/terminate
Stop a campaign by cancelling all of its queued and retry calls with PATCH /campaign/terminate; its status changes to terminated and no new calls go out.
**X-API-KEY** `string` *required*
Your Ringg AI API key.
**campaign\_id** `string` *required*
The campaign's ID: `id` from [Get all campaigns](/api-reference/calling/campaigns/get-all-campaigns), which is also the `list_id` or `bulk_list_id` returned when the list was uploaded. Example: `00000000-0000-4000-8000-000000000103`
```bash cURL theme={null}
curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/campaign/terminate" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{ "campaign_id": "00000000-0000-4000-8000-000000000103" }'
```
```json 200 theme={null}
{ "message": "Calls terminated successfully!" }
```
## What happens
* Calls with status `registered` (queued) or `retry` are cancelled (`cancelled`, sub-status `USER_TERMINATED`); calls in other campaigns are not affected.
* A call already in progress is not hung up. It ends normally and is not retried afterwards.
* Completed calls are not affected.
* The campaign's status becomes `terminated`.
* To call the remaining contacts later, create a new campaign.
## Errors
* `200` is returned even when no call matched the ID; check the calls in [call history](/api-reference/monitoring/call-history/get-call-history).
* `401`: `X-API-KEY` is missing or invalid.
* `422`: no field, more than one way of choosing calls at once, or a field of the wrong type.
Related topics
# Terminate Calls by Campaign Numbers
Source: https://docs.ringg.ai/api-reference/calling/campaigns/stop-campaign-numbers
PATCH /campaign/terminate
Stop calls to up to 100 phone numbers inside one campaign while the rest of it keeps running, for example when a contact asks not to be called again.
The same numbers in other campaigns are still called; to stop a number everywhere, use [by numbers](/api-reference/calling/individual-calls/stop-calls-to-numbers).
**X-API-KEY** `string` *required*
Your Ringg AI API key.
**campaign\_id** `string` *required*
The campaign's ID. Example: `00000000-0000-4000-8000-000000000103`
**mobile\_numbers** `string[]` *required*
Up to 100 numbers, each with country code. Example: `["+919876543210", "+919876543211"]`
```bash cURL theme={null}
curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/campaign/terminate" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"campaign_id": "00000000-0000-4000-8000-000000000103",
"mobile_numbers": ["+919876543210", "+919876543211"]
}'
```
```json 200 theme={null}
{ "message": "Calls terminated successfully!" }
```
## Errors
* `400`: a number has no call, or no call that can still be terminated, for example `Mobile numbers not found in campaign: …`.
* `401`: `X-API-KEY` is missing or invalid.
* `422`: no field, more than 100 numbers, or a field of the wrong type.
Related topics
# Upload Campaign Contact List
Source: https://docs.ringg.ai/api-reference/calling/campaigns/upload-campaign-contact-list
post /campaign/save
Upload a campaign calling list as CSV with the agent, variable mapping, country code, campaign window and call settings, and get the list_id to start it with.
Nothing is dialled yet: start the campaign with [Start campaign (number pool)](/api-reference/calling/campaigns/start-campaign-v2) or [Start campaign](/api-reference/calling/campaigns/start-campaign). The `list_id` is also the campaign's ID in [Get all campaigns](/api-reference/calling/campaigns/get-all-campaigns), call history and analytics (`bulk_list_id`).
## The CSV
One header row, then one row per contact. Every outbound agent has the variables `mobile_number` and `callee_name`, so the file needs a column for each, plus one for every other variable the agent's prompt uses. Write phone numbers without the country code; `country_code` applies to the whole list.
```text theme={null}
callee_name,mobile_number,amount_due,due_date
Priya Sharma,9876543210,4500,12 October
Rahul Verma,9876540123,1200,15 October
```
[Calling list](/documentation/deploy/campaigns/calling-list) has the full file rules.
## Fields
`campaign_start_time` and `campaign_end_time` are read in `call_config.call_time.timezone`, and the start must be in the future. Without `remove_invalid_rows`, a row that fails validation fails the whole upload with `400`, and the uploader is emailed the errors. A list may have up to 100 rows by default, and up to 5,000 once Company details are saved in the dashboard; a longer list returns `402`.
`transliterate_fields` is a JSON array of the agent's own variable names, not CSV headers, whose values are transliterated into the agent's language; each must be mapped in `variables_map`, and `mobile_number` is not allowed. `transliterate_callee_name=true` is the same as adding `callee_name`; both can be sent.
`variables_map` for the CSV above:
```json theme={null}
{"callee_name": "callee_name", "mobile_number": "mobile_number", "amount_due": "amount_due", "due_date": "due_date"}
```
`call_config` is a JSON string with the daily window calls may be placed in and how failed calls are retried. Retry waits are in minutes.
```json theme={null}
{
"call_time": { "call_start_time": "09:00", "call_end_time": "18:00", "timezone": "Asia/Kolkata" },
"call_retry_config": { "retry_count": 2, "retry_busy": 30, "retry_not_picked": 30, "retry_failed": 30 }
}
```
## Response
```json theme={null}
{
"message": "Contacts imported successfully!",
"list_id": "123e4567-e89b-12d3-a456-426614174000",
"total_rows": 100,
"successful_rows": 98,
"failed_rows": 2
}
```
Related topics
# Initiate Individual Call
Source: https://docs.ringg.ai/api-reference/calling/individual-calls/initiate-individual-call
post /calling/outbound/individual
Place one outbound call with an agent to one phone number, passing a caller number, the variables the prompt uses, and optional retry and timing settings.
Use it for calls triggered by an event in your product, such as a missed EMI or a new lead, and to [test an agent](/documentation/build-agents/test-and-improve/test-an-agent) before a campaign. To have Ringg choose the caller number from a [number pool](/documentation/inventory/phone-numbers/number-pools) (rotation and spam skipping), use the [number-pool variant](/api-reference/calling/individual-calls/initiate-individual-call-v2).
`agent_id` comes from [List agents](/api-reference/agents/get-assistants) and `from_number_id` from [List workspace numbers](/api-reference/inventory/numbers/get-workspace-numbers). Send `from_number_id` or `from_number`, not both. When the agent version has its own outbound numbers, those are used instead, and both fields may be left out. `name` is used as `callee_name` when `custom_args_values` does not set one.
```json theme={null}
{
"name": "John Doe",
"mobile_number": "+919876543210",
"agent_id": "your-agent-id",
"from_number_id": "your-from-number-id",
"custom_args_values": {
"callee_name": "John",
"order_id": "ORD-1042"
}
}
```
The response's `data.call_id` identifies the call in [call details](/api-reference/monitoring/call-history/get-call-details), [call history](/api-reference/monitoring/call-history/get-call-history) and [webhook payloads](/documentation/build-agents/customize-agent-behaviour/webhooks/call-events). Store it with your own record.
## Call settings for this call
`call_config` overrides the agent's settings for this call only:
* `max_call_length` (seconds), `idle_timeout_warning` and `idle_timeout_end` (seconds of silence);
* `call_time`: `call_start_time`, `call_end_time` (`HH:MM`) and `timezone`, the window the call may be placed in, and `scheduled_at` to place the call later;
* `call_retry_config`: `retry_count`, and the wait in minutes before retrying a busy (`retry_busy`), unanswered (`retry_not_picked`) or failed (`retry_failed`) call.
```json theme={null}
{
"call_config": {
"call_time": { "call_start_time": "09:00", "call_end_time": "18:00", "timezone": "Asia/Kolkata" },
"call_retry_config": { "retry_count": 1, "retry_busy": 30, "retry_not_picked": 30, "retry_failed": 30 }
}
}
```
## Schedule the call
`call_config.call_time.scheduled_at` places the call later. Write it as a local time without an offset, `YYYY-MM-DDTHH:MM:SS`, in `call_time.timezone` (the agent's timezone when that is not sent). It must be in the future; a time outside the calling window moves to the next opening.
```json theme={null}
{
"call_config": {
"call_time": { "scheduled_at": "2026-10-18T15:30:00", "timezone": "Asia/Kolkata" }
}
}
```
The response says "Call has been scheduled successfully for …" and returns `data.scheduled_at`, `data.scheduled_timezone` and `data.scheduled_time_utc`.
## Call limits and deadlines
The workspace and agent [call limits](/documentation/manage-account/call-limits) apply to calls placed by API. The request is still accepted with `200`; the limit is checked just before dialling.
* `call_validity_hours` and `call_deadline` give the call a deadline. A call held by a limit waits until then (`call_status` `registered`, `call_sub_status` `FREQUENCY_DEFERRED`), and is cancelled with `DEADLINE_PASSED` if it has not been placed by the deadline. `call_validity_hours` counts from when the call is created, or from `scheduled_at`; when both are sent, the earlier deadline applies.
* A call with no deadline is cancelled as soon as a limit blocks it (`cancelled`, `FREQUENCY_CAPPED`).
* `purpose: "transactional"` marks a transactional call; the call limits do not apply to it.
```json theme={null}
{
"call_validity_hours": 6,
"purpose": "transactional"
}
```
## Name formatting
`smart_formatter` cleans `callee_name` before the call. `extract_first_name` drops titles and keeps the first name (`Mr Rajesh Kumar` becomes `Rajesh`). `transliteration` also converts the name to `transliteration_language.target` (default `hi`) and turns on first-name extraction. The original name stays available as `original_callee_name` in `custom_args_values`.
```json theme={null}
{
"smart_formatter": {
"extract_first_name": true,
"transliteration": true,
"transliteration_language": { "source": "en", "target": "hi" }
}
}
```
## Troubleshooting
| Symptom | Check |
| - | - |
| `401` | `X-API-KEY` is missing or the key was regenerated. |
| `400` | No caller number and no outbound numbers on the agent version, a Ringg test number as the caller number, or a missing variable in `custom_args_values`. |
| `402` | The balance, or the available credit limit, does not cover the call. |
| `422` | A required field is missing or has the wrong type, or both `from_number_id` and `from_number` are set. |
| The call stays `registered` | The current time is outside `call_time`, or a call limit is holding it (`call_sub_status` `FREQUENCY_DEFERRED`). |
| The agent says the wrong name or value | A `custom_args_values` key does not match the variable name in the prompt. |
Related topics
# Initiate Individual Call (Number Pool)
Source: https://docs.ringg.ai/api-reference/calling/individual-calls/initiate-individual-call-v2
post /calling/v2/outbound/individual
Place one outbound call with an agent and let Ringg pick the caller number from a number pool, or pass a caller number yourself; optionally override the voice.
The [number pool](/documentation/inventory/phone-numbers/number-pools) rotates numbers and skips ones flagged as spam.
## Caller number
Send at least one of these. With `number_pool_id`, Ringg picks the number from the pool and ignores the other two. Without a pool, outbound numbers set on the agent version are used before `from_number_id` or `from_number`.
| Field | When to use it |
| - | - |
| `number_pool_id` | Ringg picks the number from the pool. Copy the ID with **Copy pool ID** on the **Number pools** page. |
| `from_number_id` | A specific workspace number, from [List workspace numbers](/api-reference/inventory/numbers/get-workspace-numbers). |
| `from_number` | A specific number written out with country code. |
```json theme={null}
{
"name": "John Doe",
"mobile_number": "+919876543210",
"agent_id": "your-agent-id",
"number_pool_id": "your-number-pool-id",
"custom_args_values": {
"callee_name": "John",
"order_id": "ORD-1042"
}
}
```
`name`, `mobile_number`, `agent_id`, `custom_args_values`, `smart_formatter`, `call_config`, `version_id`, `purpose`, `call_validity_hours` and `call_deadline` work as on [Initiate individual call](/api-reference/calling/individual-calls/initiate-individual-call). The response's `data.call_id` identifies the call everywhere else.
## Troubleshooting
As for [Initiate individual call](/api-reference/calling/individual-calls/initiate-individual-call#troubleshooting), plus:
| Symptom | Check |
| - | - |
| `422` | No caller number source, or both `from_number_id` and `from_number`. |
| `400` | The pool does not exist (`Number pool not found`) or has no usable number (`Number pool has no available numbers`). |
Related topics
# Terminate All Calls by Agent ID
Source: https://docs.ringg.ai/api-reference/calling/individual-calls/stop-agent-calls
PATCH /campaign/terminate
Stop every queued and retry call of one agent across all of its campaigns, for example when the agent is misbehaving and must not make more calls.
**X-API-KEY** `string` *required*
Your Ringg AI API key.
**agent\_id** `string` *required*
The agent's ID ([find it](/documentation/build-agents/agents/agent-types#find-the-agent-id)). Example: `00000000-0000-4000-8000-000000000110`
```bash cURL theme={null}
curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/campaign/terminate" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{ "agent_id": "00000000-0000-4000-8000-000000000110" }'
```
```json 200 theme={null}
{ "message": "Calls terminated successfully!" }
```
Only outbound calls created in the last 7 days are cancelled. In-progress and completed calls are handled as for [by campaign](/api-reference/calling/campaigns/stop-campaign#what-happens); the agent's campaigns keep their status.
## Errors
* `200` is returned even when no call matched the ID; check the calls in [call history](/api-reference/monitoring/call-history/get-call-history).
* `401`: `X-API-KEY` is missing or invalid.
* `422`: no field, more than one way of choosing calls at once, or a field of the wrong type.
Related topics
# Terminate Calls by Call IDs
Source: https://docs.ringg.ai/api-reference/calling/individual-calls/stop-calls-by-id
PATCH /campaign/terminate
Cancel specific queued or retry calls by their call IDs, from the call response, call history or webhooks, without stopping the rest of the campaign.
**X-API-KEY** `string` *required*
Your Ringg AI API key.
**call\_ids** `string[]` *required*
The calls to cancel. Example: `["00000000-0000-4000-8000-000000000116", "00000000-0000-4000-8000-00000000010d"]`
```bash cURL theme={null}
curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/campaign/terminate" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{ "call_ids": ["00000000-0000-4000-8000-000000000116"] }'
```
```json 200 theme={null}
{ "message": "Calls terminated successfully!" }
```
Only `registered` and `retry` outbound calls created in the last 7 days are cancelled. A call already in progress is not hung up; it ends normally and is not retried.
Call IDs come from the [call response](/api-reference/calling/individual-calls/initiate-individual-call) (`data.call_id`), [call history](/api-reference/monitoring/call-history/get-call-history) (`id`) and [webhook payloads](/documentation/build-agents/customize-agent-behaviour/webhooks/call-events).
## Errors
* `200` is returned even when no call matched the ID; check the calls in [call history](/api-reference/monitoring/call-history/get-call-history).
* `401`: `X-API-KEY` is missing or invalid.
* `422`: no field, more than one way of choosing calls at once, or a field of the wrong type.
Related topics
# Terminate Calls by Numbers
Source: https://docs.ringg.ai/api-reference/calling/individual-calls/stop-calls-to-numbers
PATCH /campaign/terminate
Stop all queued and retry calls to up to 100 phone numbers across every campaign in the workspace, for example to honour an opt-out from all your calls.
**X-API-KEY** `string` *required*
Your Ringg AI API key.
**mobile\_numbers** `string[]` *required*
Up to 100 numbers, each with country code. Example: `["+919876543210", "+919876543211"]`
```bash cURL theme={null}
curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/campaign/terminate" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{ "mobile_numbers": ["+919876543210", "+919876543211"] }'
```
```json 200 theme={null}
{ "message": "Calls terminated successfully!" }
```
## Errors
* `400`: a number has no call, or no call that can still be terminated, for example `Mobile numbers not found in campaign: …`.
* `401`: `X-API-KEY` is missing or invalid.
* `422`: no field, more than 100 numbers, or a field of the wrong type.
Related topics
# Check large campaign balance (Beta)
Source: https://docs.ringg.ai/api-reference/calling/large-campaigns/check-large-campaign-balance
post /campaign/check-balance/{bulk_list_id}
Re-check the workspace balance for a large campaign that stopped at insufficient_balance, after a top-up, so it returns to draft and calls can start.
Add balance first ([Billing](/documentation/manage-account/billing)), then call it with the `bulk_list_id` from [upload status](/api-reference/calling/large-campaigns/get-large-campaign-upload-status). When the response's `status` is `draft`, [start calls](/api-reference/calling/large-campaigns/make-large-campaign-calls-async) again with the same `bulk_list_id`; there is no need to upload the list again.
If the balance is still short, `status` stays `insufficient_balance` and the response gives `required_credits` and `additional_balance_required`. A campaign in another status, or with no contacts or agent, returns `400`. [Get all campaigns](/api-reference/calling/campaigns/get-all-campaigns) runs the same check on every `insufficient_balance` campaign it lists.
Related topics
# Get large campaign upload status (Beta)
Source: https://docs.ringg.ai/api-reference/calling/large-campaigns/get-large-campaign-upload-status
get /campaign/upload-status/{bulk_list_id}
Poll the validation status of a large campaign CSV by bulk_list_id until it is draft and ready to start, or fails, has no valid rows or lacks balance.
Poll it every few seconds after [Upload large campaign CSV](/api-reference/calling/large-campaigns/upload-large-campaign-csv), until `status` stops changing.
## Statuses
| `status` | Meaning | Next |
| - | - | - |
| `verifying` | Rows are still being validated | Keep polling |
| `draft` | The list is valid and ready | [Start calls](/api-reference/calling/large-campaigns/make-large-campaign-calls-async) |
| `no_valid_contacts` | Every row was invalid | Fix the CSV and upload it again |
| `insufficient_balance` | The workspace balance does not cover the list | Add balance, then [re-check the balance](/api-reference/calling/large-campaigns/check-large-campaign-balance) |
| `failed` | Validation could not finish | Upload again |
The response also reports `total_callees`, the valid contacts loaded, and `invalidated_rows_count`, the rows that failed validation. After launch, `status` follows the campaign: `preparing`, `in_db`, `scheduled`, `ongoing`, `completed` or `terminated`.
Related topics
# Make large campaign calls async (Beta)
Source: https://docs.ringg.ai/api-reference/calling/large-campaigns/make-large-campaign-calls-async
post /campaign/make-call-async
Schedule the calls of a validated large campaign: set the campaign window, calling hours, retries and caller numbers or a number pool for the bulk_list_id.
Call it once the [upload status](/api-reference/calling/large-campaigns/get-large-campaign-upload-status) is `draft`.
## Fields
`country_code` must be the same dialling code as the upload. Send exactly one of `from_numbers` or `number_pool_id`: both, or neither, returns `422`. `from_numbers` takes workspace number IDs from [List workspace numbers](/api-reference/inventory/numbers/get-workspace-numbers); a number that is not in the workspace makes the campaign `failed` after launch. `campaign_start_time` and `campaign_end_time` (`DD/MM/YYYY, HH:MM`) are required unless `call_slots` is sent, and go together. `email_completion_user_ids` are workspace user IDs from [List workspace users](/api-reference/account/list-workspace-users), emailed when the campaign completes.
`call_config` has two parts:
* `call_time`: `call_start_time` and `call_end_time` (`HH:MM`, defaults `09:00` and `21:00`) and `timezone` (default `Asia/Kolkata`) set the daily calling hours. They replace the agent's calling window for this campaign. `scheduled_at` (ISO 8601, in that timezone) schedules the start.
* `call_retry_config`: `retry_count` (default `0`, so leaving the block out means no retries) and the wait in minutes before retrying a busy (`retry_busy`), unanswered (`retry_not_picked`) or failed (`retry_failed`) call, each defaulting to `30`.
```bash theme={null}
curl --request POST "https://prod-api.ringg.ai/ca/api/v0/campaign/make-call-async" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"bulk_list_id": "123e4567-e89b-12d3-a456-426614174000",
"agent_id": "your-agent-id",
"country_code": "+91",
"campaign_start_time": "18/10/2026, 09:00",
"campaign_end_time": "18/10/2026, 18:00",
"number_pool_id": "your-number-pool-id",
"call_config": {
"call_time": { "call_start_time": "09:00", "call_end_time": "18:00", "timezone": "Asia/Kolkata" },
"call_retry_config": { "retry_count": 1, "retry_busy": 30, "retry_not_picked": 30, "retry_failed": 30 }
}
}'
```
## Calling slots
`call_slots` limits dialling to exact windows, in `call_time.timezone`. Without `campaign_start_time` and `campaign_end_time`, the campaign runs from the first slot's start to the last slot's end.
* `absolute`: dated `intervals`, each `{"start": "DD/MM/YYYY, HH:MM", "end": "DD/MM/YYYY, HH:MM"}`, up to 500.
* `weekly`: `windows` of `days` (`mon` to `sun`) with `start` and `end` (`HH:MM`), up to 21, repeated until `until` (`DD/MM/YYYY, HH:MM`), at most 90 days ahead.
Each slot lasts 1 minute to 24 hours, is not in the past and sits inside the daily `call_time` window; the last one must end at least 5 minutes from now. Mixing the two modes returns `422`.
```json theme={null}
{
"call_slots": {
"mode": "weekly",
"until": "31/10/2026, 18:00",
"windows": [{ "days": ["mon", "wed", "fri"], "start": "10:00", "end": "13:00" }]
}
}
```
`concurrency_percentage` (0–100) is this campaign's share of the workspace's concurrent calls while several campaigns are ongoing; campaigns at `0` share what is left equally.
## Response
```json theme={null}
{
"message": "Campaign calls scheduled",
"bulk_list_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "scheduled"
}
```
A `402` means the balance does not cover the campaign: it moves to `insufficient_balance`. Add balance, run [Check large campaign balance](/api-reference/calling/large-campaigns/check-large-campaign-balance), then send this request again with the same `bulk_list_id`.
Send each `bulk_list_id` once. Follow progress with [Get all campaigns](/api-reference/calling/campaigns/get-all-campaigns) and the calls with [call history](/api-reference/monitoring/call-history/get-call-history) filtered by the same `bulk_list_id`.
Related topics
# Upload large campaign CSV (Beta)
Source: https://docs.ringg.ai/api-reference/calling/large-campaigns/upload-large-campaign-csv
post /campaign/upload-csv
Upload a calling list for validation in the background, and get the bulk_list_id you poll for status and then start calls with.
The calling window, retries and caller numbers are not sent here; they go with [Start large campaign calls](/api-reference/calling/large-campaigns/make-large-campaign-calls-async).
The flow: upload → poll [upload status](/api-reference/calling/large-campaigns/get-large-campaign-upload-status) until it is `draft` → [start calls](/api-reference/calling/large-campaigns/make-large-campaign-calls-async).
## Fields
The CSV follows the same rules as for [Upload campaign contact list](/api-reference/calling/campaigns/upload-campaign-contact-list#the-csv). A list may have up to 100 rows by default, and up to 5,000 once Company details are saved in the dashboard; a longer list returns `402`. Contact Ringg for a higher limit.
* Invalid rows never fail this upload: the valid rows load and the invalid ones are left out. With `remove_invalid_rows` off, the uploader is also emailed the invalid rows.
* `transliterate_fields` is a JSON array of the agent's own variable names, not CSV headers, whose values are transliterated into the agent's language. Each must be mapped in `variables_map`, and `mobile_number` is not allowed. `transliterate_callee_name=true` is the same as adding `callee_name`.
```bash theme={null}
curl --request POST "https://prod-api.ringg.ai/ca/api/v0/campaign/upload-csv" \
--header "X-API-KEY: $RINGG_API_KEY" \
--form 'agent_id="your-agent-id"' \
--form 'campaign_name="EMI reminders - October"' \
--form 'country_code="+91"' \
--form 'variables_map="{\"mobile_number\":\"mobile_number\",\"callee_name\":\"callee_name\"}"' \
--form 'remove_invalid_rows="true"' \
--form "file=@emi-reminders.csv"
```
## Response
```json theme={null}
{
"message": "CSV uploaded successfully. Processing in background.",
"bulk_list_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "verifying",
"total_rows": 5000,
"campaign_name": "EMI reminders - October"
}
```
`total_rows` counts the rows in the file, not counting fully blank rows. Valid and invalid counts come from [upload status](/api-reference/calling/large-campaigns/get-large-campaign-upload-status) once validation finishes.
Store `bulk_list_id`. It is the campaign's ID in every later call, in call history and in analytics.
Related topics
# API Overview
Source: https://docs.ringg.ai/api-reference/introduction/api-overview
Find the Ringg AI API base URL, resource groups, request formats, the IDs that link agents, numbers, campaigns and calls, and how errors and paging work.
The Ringg AI API lets your backend do what the dashboard does for day-to-day calling: pick an agent, place calls, run campaigns, read call logs and analytics, and receive results by webhook. Building and editing agents is mostly done in the dashboard; the API covers creating an agent from a prompt and changing selected settings.
## Base URL and version
```text theme={null}
https://prod-api.ringg.ai/ca/api/v0
```
The version (`v0`) is part of the base URL. Some endpoints have a newer variant with its own path, for example `POST /calling/v2/outbound/individual` next to `POST /calling/outbound/individual`.
## Resources
| Group | What you can do |
| - | - |
| [Workspace](/api-reference/account/get-workspace-info) | Check the key, read balance, members and the workspaces you can access |
| [Ringg Spaces](/documentation/manage-account/ringg-spaces/ringg-spaces-by-api#manage-the-family-by-api) | Create client or team workspaces and allocate concurrency or money to them |
| [Agents](/api-reference/agents/get-assistants) | List, read and create agents, list voices, change settings and webhook subscriptions |
| [Knowledge bases](/api-reference/inventory/knowledge-bases/get-all-knowledge-bases) | Create and update knowledge bases from files, URLs and FAQs |
| [Numbers](/api-reference/inventory/numbers/get-workspace-numbers) | List the caller numbers in the workspace |
| [Calling](/api-reference/calling/individual-calls/initiate-individual-call-v2) | Place one outbound call |
| [Campaigns](/api-reference/calling/campaigns/upload-campaign-contact-list) | Upload a calling list, start it, and track campaigns |
| [Termination](/api-reference/calling/campaigns/stop-campaign) | Stop queued and retry calls by campaign, agent, call ID or number |
| [Call history](/api-reference/monitoring/call-history/get-call-history) | List calls, fetch one call's transcript and recording, export to CSV |
| [Analytics](/api-reference/monitoring/analytics/get-volume-analytics) | Call volume, connectivity, agent performance, latency, cohorts and chat metrics |
## Requests
Send the API key in `X-API-KEY` on every request (see [Authentication](/api-reference/introduction/authentication)). Request and response bodies are JSON; set `Content-Type: application/json` on `POST` and `PATCH` requests with a JSON body.
Endpoints that take a file (campaign CSVs, knowledge-base documents) use `multipart/form-data`. Let your HTTP client set that `Content-Type` so it includes the boundary; setting it by hand breaks the upload.
## IDs to store
| ID | Where you get it | Where you use it |
| - | - | - |
| `agent_id` | `GET /agent/all`, or the agent page in the dashboard | Calls, campaigns, agent settings |
| `from_number_id` | `GET /workspace/numbers` | Caller ID on individual calls and campaigns |
| `number_pool_id` | The **Number pools** page in the dashboard | Caller ID from a [pool](/documentation/inventory/phone-numbers/number-pools) |
| `list_id` / `bulk_list_id` | The campaign upload response | Starting the campaign; filtering history and analytics. It is also the campaign's ID |
| `call_id` | The call response, call history, webhook payloads | Call details, deduplicating webhooks, support requests |
## Errors
Failed requests return a `4xx` or `5xx` status and a JSON body with the reason in `message`:
```json theme={null}
{ "message": "Provide either from_number_id or from_number, not both" }
```
Some endpoints add keys beside `message`, such as `code` on [Create agent](/api-reference/agents/create-agent) (for example `VOICE_LANGUAGE_MISMATCH`). A `429` may carry its reason in `error` instead. Log the status code and the whole body.
| Status | Meaning |
| - | - |
| `400` | The request is invalid, for example a campaign that already started or a caller number that is not in the workspace |
| `401` | The API key is missing or invalid: `{"message": "Invalid credentials"}` |
| `402` | The balance, or the available credit limit, does not cover the call or campaign |
| `403` | The workspace or key cannot use this endpoint |
| `404` | The agent, call, campaign or knowledge base was not found in this workspace |
| `409` | The same request is already being processed, for example a call history export |
| `422` | A field is missing or failed validation; `message` names the problem |
| `424` | A provider the request depends on, such as your telephony account, rejected its credentials; `message` names the provider and reason. Fix the provider's credentials, not your Ringg API key |
| `429` | Rate limit hit; retry later with backoff. Endpoint pages list their limits |
| `5xx` | Server-side failure; retry with backoff and log the request and any `call_id` |
## Paging
Paging differs by endpoint:
| Endpoint | `limit` | `offset` |
| - | - | - |
| [Get call history](/api-reference/monitoring/call-history/get-call-history) | Default `10`, maximum `200` (more returns `400`) | Default `0` |
| [Get all campaigns](/api-reference/calling/campaigns/get-all-campaigns) | Default `10` | Default `0` |
| [List agents](/api-reference/agents/get-assistants) | Leave it out to get every agent | Default `0` |
| [List workspace numbers](/api-reference/inventory/numbers/get-workspace-numbers) | Not paged: every number comes back | Not paged |
## Typical integration order
1. Check the key with [`GET /workspace`](/api-reference/account/get-workspace-info).
2. Pick an agent with [`GET /agent/all`](/api-reference/agents/get-assistants) and a caller number with [`GET /workspace/numbers`](/api-reference/inventory/numbers/get-workspace-numbers).
3. Place one test call with [`POST /calling/outbound/individual`](/api-reference/calling/individual-calls/initiate-individual-call).
4. Subscribe the agent to [webhook events](/documentation/build-agents/customize-agent-behaviour/event-subscription) so results reach your server without polling.
5. Move to [campaigns](/documentation/deploy/campaigns/campaigns-by-api#with-the-api) for lists of people, and to [call history](/api-reference/monitoring/call-history/get-call-history) and [analytics](/api-reference/monitoring/analytics/get-platform-analytics) for reporting.
## Next steps
> [card] [Make your first call](/api-reference/introduction/quickstart)
>
> From API key to a ringing phone.
> [card] [Run a campaign by API](/documentation/deploy/campaigns/campaigns-by-api#with-the-api)
>
> Upload a CSV and start calling it.
# Authentication
Source: https://docs.ringg.ai/api-reference/introduction/authentication
Authenticate Ringg AI API requests by sending your workspace API key in the X-API-KEY header, check it with GET /workspace and handle 401 errors.
The key decides which workspace the request acts on: agents, numbers, campaigns and call history all belong to that workspace.
> [!WARNING]
>
> Keep the key on your server. Anyone who has it can place calls and spend your balance, so never put it in browser JavaScript, a mobile app, a public repository or a log line.
## Get your API key
The workspace owner generates the key in the dashboard under **Settings → API Key** ([open it](https://www.ringg.ai/dashboard/settings/api-key)). New keys start with `rg_live_`; keys generated earlier may start with `ringg_live_` or be a plain UUID, and keep working. The full key is shown once, when it is generated; afterwards the page shows only a masked form. **Regenerate API Key** revokes the old key immediately, so update every service that uses it.

The masked key on Settings → API Key.
[API key](/documentation/manage-account/api-key) walks through generating, storing and rotating the key.
## Send the key
All endpoints share the base URL `https://prod-api.ringg.ai/ca/api/v0`. `GET /workspace` is the simplest request to check a key with.
```bash cURL theme={null}
curl --request GET "https://prod-api.ringg.ai/ca/api/v0/workspace" \
--header "X-API-KEY: $RINGG_API_KEY"
```
```javascript JavaScript theme={null}
const response = await fetch("https://prod-api.ringg.ai/ca/api/v0/workspace", {
headers: { "X-API-KEY": process.env.RINGG_API_KEY }
});
if (!response.ok) {
throw new Error(`Ringg API error: ${response.status} ${await response.text()}`);
}
const workspace = await response.json();
```
A valid key returns the workspace it belongs to:
```json theme={null}
{
"workspace_info": {
"id": "00000000-0000-4000-8000-00000000010f",
"name": "Acme Lending",
"created_at": "2026-04-15T10:30:00.000000+00:00",
"credits": 3025.0,
"locked_credits": 0.0
}
}
```
If `name` is not the workspace you expected, the key belongs to another workspace. Each [Ringg Space](/documentation/manage-account/ringg-spaces/overview) has its own key.
## Protect the key in production
* Load the key from a secret manager or an environment variable, not from source code.
* Redact the `X-API-KEY` header in request logging.
* Rotate the key as soon as you suspect it leaked. Rotation is a dashboard action; the API cannot create or rotate keys.
* Alert on bursts of `401` responses: after a regeneration, they mean a service still has the old key.
## Error responses
| Response | Meaning | Fix |
| - | - | - |
| `400 Bad Request` | The request sends both an `Authorization` header and `X-API-KEY` | Send only `X-API-KEY` |
| `401 Unauthorized` | The key is missing, wrong, or was regenerated. The body is `{"message": "Invalid credentials"}` | Check the header name and value, then redeploy the current key |
| `403 Forbidden` | The workspace cannot use this endpoint, for example Ringg Space endpoints when Ringg Spaces are not enabled | Contact Ringg support |
Other statuses are listed in the [API overview](/api-reference/introduction/api-overview#errors).
## Next steps
> [card] [Make your first call](/api-reference/introduction/quickstart)
>
> Use the key to place an outbound call with an agent.
> [card] [API overview](/api-reference/introduction/api-overview)
>
> Base URL, resources, IDs and error format.
# API quickstart
Source: https://docs.ringg.ai/api-reference/introduction/quickstart
Place your first Ringg AI phone call by API in 10 minutes: check your API key, pick an agent and a caller number, ring your own phone, then read the transcript.
It takes five requests, and they are the path every Ringg build follows: an [agent](/documentation/build-agents/agents/agent-types), a number, a call, then the result in [Logs](/documentation/monitor/logs).
## Before you start
> [card] [A Ringg workspace](/get-started/dashboard-tour#sign-in-for-the-first-time)
>
> Sign in to the dashboard. Only the workspace owner can generate the API key.
> [card] [Balance](/documentation/manage-account/billing)
>
> Calls draw down your workspace balance.
> [card] [A caller number of your own](/documentation/inventory/phone-numbers/buy-or-import-a-number)
>
> Buy or import one. Ringg's test numbers do not work from the API.
You also need a phone you can answer.
No number of your own, or no code? Open an agent in the dashboard, click **Test assistant** and call your phone from a Ringg test number instead: [Test an agent](/documentation/build-agents/test-and-improve/test-an-agent).
All requests go to `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](/documentation/manage-account/api-key).
```bash theme={null}
export RINGG_API_KEY="your-api-key"
```
Check the key with [Get Workspace Info](/api-reference/account/get-workspace-info), a read-only request.
```bash cURL theme={null}
curl "https://prod-api.ringg.ai/ca/api/v0/workspace" \
-H "X-API-KEY: $RINGG_API_KEY"
```
```javascript JavaScript theme={null}
const res = await fetch("https://prod-api.ringg.ai/ca/api/v0/workspace", {
headers: { "X-API-KEY": process.env.RINGG_API_KEY },
});
console.log(res.status, await res.json());
```
```python Python theme={null}
import os
import requests
res = requests.get(
"https://prod-api.ringg.ai/ca/api/v0/workspace",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
)
print(res.status_code, res.json())
```
```json Response (200) theme={null}
{
"workspace_info": {
"id": "00000000-0000-4000-8000-000000000112",
"name": "Acme Finance's Workspace",
"created_at": "2024-12-16T13:03:29.947147+00:00",
"credits": 3025,
"locked_credits": 0
}
}
```
> [!TIP]
>
> A `200` with your workspace's `name` means the key works. Check that `credits` is above zero before you place a call.
**Likeliest error:** `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, `/assistants/`. To create one, click **Create agent**, choose the **Outbound** tab and a template, then follow [Create an agent](/documentation/build-agents/agents/create-an-agent).
**With the API:** list your agents with [Get Assistants](/api-reference/agents/get-assistants) and pick one whose `agent_type` is `outbound` or `outbound_inbound`:
```bash theme={null}
curl "https://prod-api.ringg.ai/ca/api/v0/agent/all" \
-H "X-API-KEY: $RINGG_API_KEY"
```
Or create one with [Create Agent](/api-reference/agents/create-agent). First get a `voice_id` that speaks your language from [Get Assistant Voices](/api-reference/agents/get-assistant-voices) (`GET /agent/voices?language=en-IN`).
```bash cURL theme={null}
curl -X POST "https://prod-api.ringg.ai/ca/api/v0/public/agent" \
-H "X-API-KEY: $RINGG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_name": "Quickstart agent",
"agent_type": "outbound",
"primary_language": "en-IN",
"voice_id": "00000000-0000-4000-8000-00000000010e",
"intro_message": "Hi, this is Asha from Acme Finance. Do you have a minute?",
"introduction_and_objective": "You are Asha, a friendly assistant for Acme Finance. This is a test call to show how Ringg works.",
"task": "Greet the caller by name, ask how their day is going, answer one question, then say goodbye.",
"response_guidelines": "Keep replies short and warm. Never ask for personal or payment details."
}'
```
```javascript JavaScript theme={null}
const res = await fetch("https://prod-api.ringg.ai/ca/api/v0/public/agent", {
method: "POST",
headers: {
"X-API-KEY": process.env.RINGG_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
agent_name: "Quickstart agent",
agent_type: "outbound",
primary_language: "en-IN",
voice_id: "00000000-0000-4000-8000-00000000010e",
intro_message: "Hi, this is Asha from Acme Finance. Do you have a minute?",
introduction_and_objective:
"You are Asha, a friendly assistant for Acme Finance. This is a test call to show how Ringg works.",
task: "Greet the caller by name, ask how their day is going, answer one question, then say goodbye.",
response_guidelines: "Keep replies short and warm. Never ask for personal or payment details.",
}),
});
console.log(res.status, await res.json());
```
```python Python theme={null}
import os
import requests
res = requests.post(
"https://prod-api.ringg.ai/ca/api/v0/public/agent",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
json={
"agent_name": "Quickstart agent",
"agent_type": "outbound",
"primary_language": "en-IN",
"voice_id": "00000000-0000-4000-8000-00000000010e",
"intro_message": "Hi, this is Asha from Acme Finance. Do you have a minute?",
"introduction_and_objective": "You are Asha, a friendly assistant for Acme Finance. This is a test call to show how Ringg works.",
"task": "Greet the caller by name, ask how their day is going, answer one question, then say goodbye.",
"response_guidelines": "Keep replies short and warm. Never ask for personal or payment details.",
},
)
print(res.status_code, res.json())
```
```json Response (200) theme={null}
{
"success": true,
"data": {
"id": "00000000-0000-4000-8000-000000000104",
"version": "v1",
"version_id": "00000000-0000-4000-8000-000000000105",
"created_at": "2024-12-16T13:03:29.947147+00:00"
},
"message": "Agent created successfully"
}
```
`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](/documentation/build-agents/customize-agent-behaviour/call-settings#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](/api-reference/inventory/numbers/get-workspace-numbers):
```bash cURL theme={null}
curl "https://prod-api.ringg.ai/ca/api/v0/workspace/numbers" \
-H "X-API-KEY: $RINGG_API_KEY"
```
```javascript JavaScript theme={null}
const res = await fetch("https://prod-api.ringg.ai/ca/api/v0/workspace/numbers", {
headers: { "X-API-KEY": process.env.RINGG_API_KEY },
});
const { workspace_numbers } = await res.json();
console.log(workspace_numbers.filter((n) => !n.is_test_number));
```
```python Python theme={null}
import os
import requests
res = requests.get(
"https://prod-api.ringg.ai/ca/api/v0/workspace/numbers",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
)
print([n for n in res.json()["workspace_numbers"] if not n["is_test_number"]])
```
```json Response (200, one item, some fields left out) theme={null}
{
"workspace_numbers": [
{
"id": "00000000-0000-4000-8000-000000000109",
"number": "+919876540001",
"agent": null,
"is_test_number": false,
"is_spam": false,
"provider": "plivo",
"display_name": "Sales Line",
"number_pool_id": null
}
]
}
```
Pick a number with `"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](/documentation/inventory/phone-numbers/overview#test-numbers) (`"is_test_number": true`), which the dashboard's [test call](/documentation/build-agents/test-and-improve/test-an-agent) can use and the API cannot. [Buy or import a number](/documentation/inventory/phone-numbers/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](/api-reference/calling/individual-calls/initiate-individual-call) with your `agent_id`, your `from_number_id`, and your own number, with country code, as `mobile_number`. `custom_args_values` fills the agent's [variables](/documentation/build-agents/customize-agent-behaviour/custom-variables), such as `@{{callee_name}}` in the prompt.
```bash cURL theme={null}
curl -X POST "https://prod-api.ringg.ai/ca/api/v0/calling/outbound/individual" \
-H "X-API-KEY: $RINGG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Priya Sharma",
"mobile_number": "+919876543210",
"agent_id": "00000000-0000-4000-8000-000000000104",
"from_number_id": "00000000-0000-4000-8000-000000000109",
"custom_args_values": {
"callee_name": "Priya"
}
}'
```
```javascript JavaScript theme={null}
const res = await fetch("https://prod-api.ringg.ai/ca/api/v0/calling/outbound/individual", {
method: "POST",
headers: {
"X-API-KEY": process.env.RINGG_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Priya Sharma",
mobile_number: "+919876543210",
agent_id: "00000000-0000-4000-8000-000000000104",
from_number_id: "00000000-0000-4000-8000-000000000109",
custom_args_values: { callee_name: "Priya" },
}),
});
const call = await res.json();
console.log(res.status, call.data?.call_id);
```
```python Python theme={null}
import os
import requests
res = requests.post(
"https://prod-api.ringg.ai/ca/api/v0/calling/outbound/individual",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
json={
"name": "Priya Sharma",
"mobile_number": "+919876543210",
"agent_id": "00000000-0000-4000-8000-000000000104",
"from_number_id": "00000000-0000-4000-8000-000000000109",
"custom_args_values": {"callee_name": "Priya"},
},
)
print(res.status_code, res.json()["data"]["call_id"])
```
```json Response (200) theme={null}
{
"status": "success",
"data": {
"call_id": "00000000-0000-4000-8000-00000000010b",
"call_direction": "outbound",
"call_status": "ongoing",
"initiated_at": "2025-11-24T07:33:49.629642",
"agent_id": "00000000-0000-4000-8000-000000000104",
"custom_args_values": {
"callee_name": "Priya",
"mobile_number": "+919876543210"
}
},
"message": "Call initiated successfully"
}
```
Save `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](/documentation/manage-account/call-limits).
> [!TIP]
>
> Your phone rings and shows the caller number you picked. Answer it: the agent speaks its first message. Talk to it, then hang up.
**Likeliest errors:**
* `422` with `"message": "Provide either from_number_id or from_number, not both"`. Send `name`, `mobile_number` and `agent_id`, plus one of `from_number_id` or `from_number`.
* `400` with `"message": "Default numbers are for testing only. Please provide a real phone number."`. The caller number is a Ringg test number; pick another one.
* `402` with `"message": "Your current balance is insufficient to initiate this call!"`. Add balance ([Billing](/documentation/manage-account/billing)).
**5. Read the result**
After you hang up, fetch the call with [Get Call Details](/api-reference/monitoring/call-history/get-call-details). Add `send_analysis=true` to include the analysis.
```bash cURL theme={null}
curl "https://prod-api.ringg.ai/ca/api/v0/calling/call-details?id=00000000-0000-4000-8000-00000000010b&send_analysis=true" \
-H "X-API-KEY: $RINGG_API_KEY"
```
```javascript JavaScript theme={null}
const callId = "00000000-0000-4000-8000-00000000010b";
const res = await fetch(
`https://prod-api.ringg.ai/ca/api/v0/calling/call-details?id=${callId}&send_analysis=true`,
{ headers: { "X-API-KEY": process.env.RINGG_API_KEY } },
);
const { data } = await res.json();
console.log(data.call_status, JSON.parse(data.transcription_url ?? "[]"));
```
```python Python theme={null}
import json
import os
import requests
res = requests.get(
"https://prod-api.ringg.ai/ca/api/v0/calling/call-details",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
params={"id": "00000000-0000-4000-8000-00000000010b", "send_analysis": "true"},
)
data = res.json()["data"]
print(data["call_status"], json.loads(data["transcription_url"] or "[]"))
```
```json Response (200) theme={null}
{
"status": "success",
"data": {
"id": "00000000-0000-4000-8000-00000000010b",
"call_direction": "outbound",
"call_status": "completed",
"call_sub_status": "ACCEPTED",
"from_number": "+919876540001",
"to_number": "+919876543210",
"callee_name": "Priya Sharma",
"agent_id": "00000000-0000-4000-8000-000000000104",
"initiation_time": "2025-11-24T07:33:49Z",
"recording_url": "https://example.com/recordings/call-123.mp3",
"transcription_url": "[{\"bot\": \"Hi, this is Asha from Acme Finance. Do you have a minute?\"}, {\"user\": \"Sure, go ahead.\"}]",
"platform_analysis": {
"summary": "Caller agreed to talk and asked one question.",
"key_points": ["Caller agreed to talk"],
"action_items": []
}
}
}
```
| Field | What it holds |
| - | - |
| `call_status` | `registered`, `ongoing`, `retry`, `completed`, `failed`, `error`, `cancelled` or `forwarded` |
| `call_sub_status` | The detail behind the status, for example `USER_DID_NOT_JOIN` or `MAX_CALL_DURATION` |
| `transcription_url` | The conversation as a JSON-encoded string: parse it to get one object per turn (`bot` or `user`) |
| `recording_url` | The recording. The link may expire; fetch the call again for a fresh link, and download the file if you need to keep it. |
| `platform_analysis`, `client_analysis` | Ringg's analysis (summary, key points, action items, classification) and your [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) fields |
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](/documentation/monitor/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**.
> [!TIP]
>
> `call_status` is `completed` and the parsed `transcription_url` shows what you and the agent said.
**Likeliest error:** `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.
Read [https://docs.ringg.ai/api-reference/quickstart.md](https://docs.ringg.ai/api-reference/quickstart.md). Write a script in \[LANGUAGE] that uses the Ringg AI API (base URL [https://prod-api.ringg.ai/ca/api/v0](https://prod-api.ringg.ai/ca/api/v0), header X-API-KEY read from the RINGG\_API\_KEY environment variable) to: 1) GET /agent/all and pick the agent named "\[AGENT NAME]"; 2) GET /workspace/numbers and pick the first number whose is\_test\_number and is\_spam are both false; 3) POST /calling/outbound/individual with name "\[NAME]", mobile\_number "\[+COUNTRY NUMBER]", that agent\_id and from\_number\_id, and a custom\_args\_values object whose callee\_name is "\[FIRST NAME]"; 4) poll GET /calling/call-details with id set to the returned call\_id and send\_analysis=true every 10 seconds until call\_status is completed, failed, error or cancelled; 5) print call\_status, call\_sub\_status, each turn of transcription\_url (a JSON-encoded string, so parse it first), and platform\_analysis.summary. Exit with a non-zero code on any non-200 response and print the response body.
## 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)](/documentation/build-agents/customize-agent-behaviour/event-subscription) 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](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors).
## Before you go live
* Keep the API key in a secret manager on your server. See [Security](/resources/security/security).
* Store `agent_id`, `from_number_id` and each returned `call_id`; the `call_id` joins API responses, webhook events and Logs.
* Send every `mobile_number` with its country code, for example `+919876543210`.
* Send a `custom_args_values` key for every variable the prompt uses.
* Set the calling window for your market in the agent's [call settings](/documentation/build-agents/customize-agent-behaviour/call-settings), and retries per call in `call_config.call_retry_config` or per [campaign](/documentation/deploy/campaigns/create-a-campaign).
* Dedupe webhook events on `call_id` plus `event_type`, and return `2xx` quickly. See [Idempotency key](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors#idempotency-key).
## Troubleshooting
> [accordion] 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](/documentation/build-agents/customize-agent-behaviour/call-settings#calling-window), or send your own `call_config.call_time` with the call.
> [accordion] 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](/api-reference/monitoring/call-history/get-call-details). Also check that the caller number is not a test number and is not flagged as spam on **Numbers**.
> [accordion] 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](/documentation/build-agents/customize-agent-behaviour/custom-variables).
## Next steps
> [card] [API reference](/api-reference/introduction/api-overview)
>
> Agents, calls, campaigns, numbers and results from your backend.
> [card] [Improve the agent's prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt)
>
> Write the script, FAQs and rules your agent follows.
> [card] [Run a campaign by API](/documentation/deploy/campaigns/campaigns-by-api#with-the-api)
>
> Upload a list and start calls in two requests.
# Create Knowledge Base
Source: https://docs.ringg.ai/api-reference/inventory/knowledge-bases/create-knowledge-base
post /external/kb
Create a knowledge base from files, web page URLs and FAQ pairs, processed in the background, then attach it to an agent so it can answer from that content.
The response returns its `kb_id` with `processing_status` `pending`; poll [Get knowledge base](/api-reference/inventory/knowledge-bases/get-knowledge-base-by-id) until `status` is `completed`, then attach it to an agent with the `attach_kb` operation of [Edit agent settings](/api-reference/agents/edit-assistant).
## Content
Send `kb_name` and any mix of `files`, `urls` and `faqs`; each FAQ is a `{"question", "answer"}` object. One request takes up to 10 files (2 MB each, 5 MB in total) and 20 URLs.
Files are read by extension: PDF, DOCX, TXT, CSV (one entry per row) and JSON. Any other extension, such as `.md`, is read as plain text.
Knowledge bases created with the API are not listed on the dashboard's **Knowledge Base** page. They do appear in the agent editor's knowledge base picker and in [Get all knowledge bases](/api-reference/inventory/knowledge-bases/get-all-knowledge-bases), which also lists the ones made in the dashboard.
```bash theme={null}
curl --request POST "https://prod-api.ringg.ai/ca/api/v0/external/kb" \
--header "X-API-KEY: $RINGG_API_KEY" \
--form 'kb_name="Acme Lending FAQ"' \
--form 'urls="[\"https://example.com/faq\"]"' \
--form 'faqs="[{\"question\": \"Can I pay my EMI early?\", \"answer\": \"Yes, from the Acme app under Loans.\"}]"' \
--form "files=@loan-terms.pdf"
```
Related topics
# Delete Knowledge Base
Source: https://docs.ringg.ai/api-reference/inventory/knowledge-bases/delete-knowledge-base
delete /external/kb/{kb_id}
Delete a knowledge base and all of its files, URLs and FAQs permanently; agents that use it stop answering from it at once, so detach or replace it first.
Attach a replacement first with the `attach_kb` operation of [Edit agent settings](/api-reference/agents/edit-assistant). To change only some content, use [Edit knowledge base](/api-reference/inventory/knowledge-bases/edit-knowledge-base) instead; it keeps the `kb_id` and the agents attached.
Related topics
# Edit Knowledge Base
Source: https://docs.ringg.ai/api-reference/inventory/knowledge-bases/edit-knowledge-base
patch /external/kb
Add files, URLs or FAQs to a knowledge base and remove existing ones by ID in one request, keeping its kb_id and the agents it is attached to.
New content is processed in the background, as on creation.
## Add content
* `new_files`: 2 MB each, 5 MB in total, with optional `new_files_metadata`
* `new_faqs`: each FAQ is a `{"question", "answer"}` object
## Remove content
Pass IDs from [Get knowledge base](/api-reference/inventory/knowledge-bases/get-knowledge-base-by-id). Removal is permanent.
```bash theme={null}
curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/external/kb" \
--header "X-API-KEY: $RINGG_API_KEY" \
--form 'kb_id="550e8400-e29b-41d4-a716-446655440000"' \
--form 'files_to_remove="[\"7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d\"]"' \
--form 'urls_to_remove="[\"https://example.com/old-page\"]"' \
--form 'new_urls="[\"https://example.com/new-docs\"]"'
```
Related topics
# Get All Knowledge Bases
Source: https://docs.ringg.ai/api-reference/inventory/knowledge-bases/get-all-knowledge-bases
get /external/kb/all
List every knowledge base in your workspace with its kb_id, name, type and creation date, for example to fill a picker when attaching one to an agent.
The endpoint does not page; it returns every knowledge base in one response. Cache the list if you show it often.
For files, URLs, FAQs and processing status, call [Get knowledge base](/api-reference/inventory/knowledge-bases/get-knowledge-base-by-id).
Related topics
# Get Knowledge Base by ID
Source: https://docs.ringg.ai/api-reference/inventory/knowledge-bases/get-knowledge-base-by-id
get /external/kb/{kb_id}
Get one knowledge base with its processing status and every file, URL and FAQ in it, including the IDs you need to remove items with the edit endpoint.
Each item has a `file_id`, which is the ID [Edit knowledge base](/api-reference/inventory/knowledge-bases/edit-knowledge-base) takes to remove it.
## Notes
* Poll this endpoint after creating or editing until `status` is `completed`. Large files or many URLs can take several minutes.
* Files carry `filename`, `file_type` and `file_size` (bytes); URLs carry `url`; FAQs carry `content` with the question and answer.
Related topics
# Get Workspace Numbers
Source: https://docs.ringg.ai/api-reference/inventory/numbers/get-workspace-numbers
get /workspace/numbers
List the phone numbers in your workspace with their IDs, provider, attached agent, spam flag and pool, to choose the caller number for calls and campaigns.
Each number's `id` is the `from_number_id` that [individual calls](/api-reference/calling/individual-calls/initiate-individual-call) take as caller ID.
Numbers appear here once they are bought or imported in the dashboard ([Buy and import numbers](/documentation/inventory/phone-numbers/buy-or-import-a-number)).
The list is not paged: every matching number comes back in one response, newest first. Filter it with `telephony_account_id` (a connected telephony account's ID, or `ringg` for numbers provided by Ringg, including the shared test numbers) and `inbound_enabled` (`true` or `false`).
## Fields to check
**agent** `object`
The agent the number is attached to (`id`, `agent_display_name`); inbound calls to the number reach that agent.
**is\_test\_number** `boolean`
A shared Ringg [test number](/documentation/inventory/phone-numbers/overview#test-numbers): for testing only, not for live calls or number pools.
**is\_spam** `boolean`
The number has been flagged as spam; `spam_message` says why. Pick another number, or let a [number pool](/documentation/inventory/phone-numbers/number-pools) skip it.
**number\_pool\_id** `string`
The [number pool](/documentation/inventory/phone-numbers/number-pools) the number belongs to, if any.
**provider** `string`
The telephony provider behind the number; `ringg` for numbers on Ringg's own account.
**owner** `string`
`ringg` for a number on Ringg's account, `customer` for one on your own telephony account.
**is\_relay** `boolean`
`true` for a [WhatsApp Relay](/documentation/deploy/whatsapp/relay-overview) number.
Related topics
# Get Active Campaigns
Source: https://docs.ringg.ai/api-reference/monitoring/analytics/get-active-campaigns
get /analytics/v4/campaigns
List your ongoing and completed campaigns with their ID, name and agent, to use as the bulk_list_id filter on the other analytics endpoints.
Pass `agent_id` to list only that agent's campaigns. Use each `id` as `bulk_list_id` on the other analytics endpoints.
## Errors
* `401`: `X-API-KEY` is missing or invalid.
Related topics
# Get Agent Performance
Source: https://docs.ringg.ai/api-reference/monitoring/analytics/get-agent-performance
get /analytics/v4/agent-performance
Get goal rate, latency and cost for your agents, a side-by-side comparison of agent versions, and call, minute and cost totals for each agent in scope.
Returns the **Performance** cards and the agents table in [Analytics](/documentation/monitor/analytics). Pass two or more IDs in `agent_version_id` to compare versions in `version_comparison`.
## Notes
* `summary` covers every version of the selected agents; `agent_version_id` changes only `version_comparison`.
* `goal_rate` uses each call's own version goal (see [Where the goal comes from](/documentation/monitor/analytics#where-the-goal-comes-from)). It is `null` when no call in scope has a goal value.
* `total_cost`, `cost` and `total_minutes` count completed calls only, in the workspace `currency`.
* `client_analysis_key`, `client_analysis_value` and `client_analysis_type` narrow the result to calls with one [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) value, for example `disposition` equal to `interested`.
* `assistants_in_action` lists agents with at least one call in scope, sorted by `call_count`.
## Errors
* `400`: a filter is invalid, such as an unknown `channel`, a malformed ID, or `sub_workspace_id` sent from a workspace that isn't a primary workspace.
* `401`: `X-API-KEY` is missing or invalid.
Related topics
# Get Chat Analytics
Source: https://docs.ringg.ai/api-reference/monitoring/analytics/get-chat-analytics
get /analytics/v4/chat-analytics
Get web chat and WhatsApp session volume over time, sessions per channel, and engagement, resolution and goal metrics, filtered by date, agent or channel.
Covers chats only; the other analytics endpoints cover calls. The dashboard's Analytics page doesn't show chats.
## Notes
* `channel` takes chat channels such as `chat` or `whatsapp_meta_chat`, not the call channels.
* `engaged_turns` sets how many user messages make a session `engaged` (default `1`). `resolved` counts completed sessions.
* `goal_rate` uses each session's own version goal.
## Errors
* `401`: `X-API-KEY` is missing or invalid.
Related topics
# Get Cohort Breakdown
Source: https://docs.ringg.ai/api-reference/monitoring/analytics/get-cohort-breakdown
get /analytics/v4/cohort/breakdown
Get calls, connection rate, goal rate and average handle time for each value of one analytics field, such as a disposition or a custom argument.
Returns the data behind **Cohort analysis** in [Analytics](/documentation/monitor/analytics). Take `path` and `key` from [Get cohort dimensions](/api-reference/monitoring/analytics/get-cohort-dimensions).
## Notes
* `path=custom_args` groups by a variable you sent when placing calls, for example `key=city`.
* `path=retry_count` groups by retry attempt and ignores `key`.
* `goal_rate` uses each call's own version goal and is `null` for values with no scored calls.
## Errors
* `400`: a filter is invalid, such as an unknown `channel`, a malformed ID, or `sub_workspace_id` sent from a workspace that isn't a primary workspace.
* `401`: `X-API-KEY` is missing or invalid.
Related topics
# Get Cohort Dimensions
Source: https://docs.ringg.ai/api-reference/monitoring/analytics/get-cohort-dimensions
get /analytics/v4/cohort/dimensions
List the fields you can slice call analytics by: built-in fields such as sentiment, and the Advanced Analysis variables configured on your agent.
Start here to build a cohort view. Pass a dimension's `path` and `key` to [Get cohort values](/api-reference/monitoring/analytics/get-cohort-values) for its values, or to [Get cohort breakdown](/api-reference/monitoring/analytics/get-cohort-breakdown) for metrics per value.
## Notes
* Dimensions come from `agent_version_id`, else `agent_id`, else the agent that runs `bulk_list_id`.
* Number fields are returned only with `include_numeric=true`, because they can't be grouped.
* The goal variable appears as an ordinary Boolean field.
## Errors
* `400`: an ID is malformed, or `sub_workspace_id` was sent from a workspace that isn't a primary workspace.
* `401`: `X-API-KEY` is missing or invalid.
Related topics
# Get Cohort Values
Source: https://docs.ringg.ai/api-reference/monitoring/analytics/get-cohort-values
get /analytics/v4/cohort/values
Get the distinct values of one analytics field and how many calls have each, most frequent first, to fill a filter list or see how outcomes split.
Take `path` and `key` from [Get cohort dimensions](/api-reference/monitoring/analytics/get-cohort-dimensions). For example, `path=client_analysis&key=disposition` lists every disposition your calls ended with.
## Notes
* An invalid `path` or `key` returns `400`.
## Errors
* `400`: a filter is invalid, such as an unknown `channel`, a malformed ID, or `sub_workspace_id` sent from a workspace that isn't a primary workspace.
* `401`: `X-API-KEY` is missing or invalid.
Related topics
# Get Concurrency Trend
Source: https://docs.ringg.ai/api-reference/monitoring/analytics/get-concurrency-trend
get /analytics/v4/concurrency-trend
Get your workspace's paid concurrency against the concurrency it received over time, hourly for up to two days and daily for longer date ranges.
Returns the **Concurrency usage** chart in [Analytics](/documentation/monitor/analytics). If `received` keeps reaching `paid`, your calls are waiting on concurrency: raise it on [Billing](/documentation/manage-account/billing#change-concurrency).
## Notes
* It covers the whole workspace and takes only the date range, `tz` and `sub_workspace_id`.
* `granularity` is `hour` for ranges of two days or less and `day` otherwise.
* `available` is `false` when there is no data for the range.
## Errors
* `400`: a filter is invalid, such as an unknown `channel`, a malformed ID, or `sub_workspace_id` sent from a workspace that isn't a primary workspace.
* `401`: `X-API-KEY` is missing or invalid.
Related topics
# Get Connectivity Analytics
Source: https://docs.ringg.ai/api-reference/monitoring/analytics/get-connectivity-analytics
get /analytics/v4/connectivity
Get how many calls connected, the connectivity percentage, and which attempt each connected call got through on, filtered by date, agent, campaign or channel.
Returns the data behind the **Connectivity** chart in [Analytics](/documentation/monitor/analytics). Use `by_retry_attempt` to judge whether more retries are worth it: `attempt_2` and later are calls that connected only after a retry.
## Notes
* `connectivity_pct` runs from `0` to `100`, rounded to two decimals, unlike the `0` to `1` rates on other analytics endpoints. It is `0.0` when there are no calls.
* `total` includes every call status, including registered, ongoing and retry calls.
* For calls stopped by the campaign's end time or retry limit, read `volume.connection_rate` from [Get volume analytics](/api-reference/monitoring/analytics/get-volume-analytics).
## Errors
* `400`: a filter is invalid, such as an unknown `channel`, a malformed ID, or `sub_workspace_id` sent from a workspace that isn't a primary workspace.
* `401`: `X-API-KEY` is missing or invalid.
Related topics
# Get Data Freshness
Source: https://docs.ringg.ai/api-reference/monitoring/analytics/get-data-freshness
get /analytics/v4/data-freshness
Get how up to date your workspace's analytics data is, as a data-as-of timestamp and lag in seconds, to label dashboards and decide when to refetch.
Show `data_as_of` as a "data as of" label. `version` changes whenever new data lands, so refetch only when it differs from the last value you saw.
## Notes
* `data_as_of` and `lag_seconds` are `null` and `version` is `0` before your workspace has any analytics data.
## Errors
* `401`: `X-API-KEY` is missing or invalid.
Related topics
# Get Latency Trend
Source: https://docs.ringg.ai/api-reference/monitoring/analytics/get-latency-trend
get /analytics/v4/latency-trend
Get median and 95th-percentile agent response latency over time, filtered by date, agent, version, campaign or channel, to spot latency regressions.
Plot `bucket` on the X-axis and `p50_ms` and `p95_ms` on the Y-axis. Compare before and after a prompt, model or voice change to catch regressions.
## Notes
* `scored` is the number of calls in the bucket with latency data. Buckets with few scored calls are noisy.
* Bucket size follows the date range: hour, day, week (labelled with the Monday) or month (labelled with the 1st). Pass `tz` to bucket in your timezone.
## Errors
* `400`: a filter is invalid, such as an unknown `channel`, a malformed ID, or `sub_workspace_id` sent from a workspace that isn't a primary workspace.
* `401`: `X-API-KEY` is missing or invalid.
Related topics
# Get Volume Analytics
Source: https://docs.ringg.ai/api-reference/monitoring/analytics/get-volume-analytics
get /analytics/v4/volume-graph
Get headline call metrics with the change against the previous period, plus call volume over time, filtered by date, agent, version, campaign or channel.
Returns the numbers behind the **Volume** cards and trend chart in [Analytics](/documentation/monitor/analytics). Each card has `count`, `previous` (the period of the same length just before) and `delta_pct`.
## Notes
* `sum(by_bucket[].total)` equals `total.count`, and in each bucket `total = completed + failed + cancelled + registered + ongoing + retry`.
* `total.campaign_count` and `total.api_count` split the current total by where calls came from. A callback counts toward its parent call's campaign.
* `callback_count` always reports callback calls, whatever `include_callback` is set to. It overlaps `total` only when `include_callback=true`.
* `connection_rate.campaign_time_exhausted` and `connection_rate.retry_exhausted` count calls stopped by the campaign's end time or retry limit.
* `aht_seconds.duration_distribution` counts completed calls in four buckets: under 10 seconds, 10 to 30, 30 to 60, and 60 or more.
* `unique_numbers_used` is the phone numbers your workspace owns, so it ignores the date range and filters.
* With a call `channel` filter, chats are left out and `chat_total.count` is `0`.
## Errors
* `400`: a filter is invalid, such as an unknown `channel`, a malformed ID, or `sub_workspace_id` sent from a workspace that isn't a primary workspace.
* `401`: `X-API-KEY` is missing or invalid.
Related topics
# Download Call History
Source: https://docs.ringg.ai/api-reference/monitoring/call-history/download-call-history
post /calling/history/download
Export call history to CSV by email, filtered by date range, agent, status, call type, campaign, number or call ID, with optional post-call analysis columns.
The response only confirms the export was queued and lists who will get the link: `{"message": "Call history export has been queued. You will receive an email shortly.", "emails": ["owner@example.com"]}`. The download link arrives by email; large exports take several minutes.
## Choose who receives the export
By default the link goes to the requester; with an API key, that is the workspace owner. To send it to specific teammates instead, add `email`. Repeat it for several people.
> [!WARNING]
>
> **Each recipient must be a member of your workspace.** The export is only emailed to people who belong to the workspace: they were invited, accepted the invite, and haven't been removed. An address outside the workspace gets a `400` and no one receives the export. To send it to someone new, invite them to the workspace first.
```bash theme={null}
curl --request POST \
--url 'https://prod-api.ringg.ai/ca/api/v0/calling/history/download?start_date=2025-09-25T00:00:00%2B05:30&end_date=2025-09-25T23:59:59%2B05:30&email=ops@example.com&email=qa@example.com' \
--header 'X-API-KEY: '
```
* A comma-separated list (`email=ops@example.com,qa@example.com`) works too.
* The link goes only to these addresses, one email each. The workspace owner is not copied.
* Every address must belong to an active member of your workspace: invite accepted and not removed. Otherwise the request returns `400` naming the address, and no one is emailed. Invite them to the workspace first.
## Notes
* `call_type` is `inbound`, `outbound` or `webcall`. The export covers every call that matches the filters.
* `include_analysis=true` adds the platform and [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) results.
* The CSV holds call details, status and timestamps, agent and campaign, transcript and recording links, and custom variables.
* The emailed link is valid for 7 days and downloads a ZIP with one CSV.
* Recording links in the export may expire; fetch a fresh link from [Get call details](/api-reference/monitoring/call-history/get-call-details).
* `409` means the same export is already running; `429` means too many exports are running, so try again later.
Related topics
# Get Call Details
Source: https://docs.ringg.ai/api-reference/monitoring/call-history/get-call-details
get /calling/call-details
Get one call by its call_id: status, numbers, agent, recording link and transcript, plus platform and advanced analysis when you set send_analysis=true.
Pass the call's ID as `id`, the `call_id` you got when placing the call or from a webhook.
## Notes
* `transcription_url` is the transcript as a JSON-encoded string, not an array: parse it to get one object per turn (`bot` or `user`). It is `null` when there is no transcript and `"[]"` for a call that never connected.
* `platform_analysis` is Ringg's summary and classification; `client_analysis` is the result of your [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis). Analysis runs after the call ends, and each key is left out of the response until it is ready. Leave `send_analysis` off when you only need status or the recording.
* `call_metrics=true` adds the call's [eval](/documentation/monitor/evals) results in `data.metrics`, one entry per metric with `metric_name`, `score` and `explanation`.
* When number masking is on for your workspace, `to_number` and any phone number in `custom_args_values` come back masked except the last 3 digits, for example `*********210`.
* `recording_url` may expire. Call this endpoint again for a fresh link, and download the recording if you need to keep it.
* A `404` means no call with that ID exists in the workspace that owns the API key.
Related topics
# Get Call History
Source: https://docs.ringg.ai/api-reference/monitoring/call-history/get-call-history
get /calling/history
List calls in your workspace by date range, agent, status or campaign, with transcript, recording link, duration and cost, to reconcile results or backfill.
Webhooks are the better fit for reacting to each call as it ends ([Event Subscription](/documentation/build-agents/customize-agent-behaviour/event-subscription)); use this endpoint for dashboards, backfills and checking that no webhook was missed.
## Notes
* `start_date` and `end_date` take a timezone offset, for example `2026-10-01T00:00:00+05:30`. `bulk_list_id` is the campaign's ID. `status` is one of `registered`, `ongoing`, `retry`, `error`, `completed`, `failed`, `cancelled`, `forwarded`. Repeat `agent_id`, `status` or `bulk_list_id` to filter by several values.
* `limit` defaults to `10`; more than `200` returns `400`. Page with `offset`.
* The list allows 10 requests per workspace per minute; more return `429`.
* `transcript` is a JSON-encoded string; parse it to get the turns.
* The response's `total` is the number of calls matching the filters, for paging.
* `audio_recording` links may expire. Fetch a fresh link from [Get call details](/api-reference/monitoring/call-history/get-call-details), and download recordings you need to keep.
* For one call with its post-call analysis, use [Get call details](/api-reference/monitoring/call-history/get-call-details). To get many calls as a CSV by email, use [Download call history](/api-reference/monitoring/call-history/download-call-history), or add `download=true` here with the same filters.
## Export by email
`download=true` emails a CSV of every matching call instead of returning a page (`limit` and `offset` are ignored). Add `email` to send it to specific teammates instead of the requester; repeat it for several people:
```bash theme={null}
curl --request GET \
--url 'https://prod-api.ringg.ai/ca/api/v0/calling/history?download=true&start_date=2025-09-25T00:00:00%2B05:30&end_date=2025-09-25T23:59:59%2B05:30&email=ops@example.com&email=qa@example.com' \
--header 'X-API-KEY: '
```
> [!WARNING]
>
> **Each recipient must be a member of your workspace.** The export is only emailed to people who belong to the workspace: they were invited, accepted the invite, and haven't been removed. An address outside the workspace gets a `400` and no one receives the export. To send it to someone new, invite them to the workspace first.
The response is `{"message": "Call history export has been queued. You will receive an email shortly.", "emails": ["ops@example.com", "qa@example.com"]}`. Without `email`, the link goes to the requester (with an API key, the workspace owner). The rules are the same as [Download call history](/api-reference/monitoring/call-history/download-call-history#choose-who-receives-the-export).
Related topics
# Agent types
Source: https://docs.ringg.ai/documentation/build-agents/agents/agent-types
Pick a Ringg AI agent type: outbound, inbound, outbound-inbound, webcall or WhatsApp, built as a single-prompt or multi-prompt agent, and find the guide for each.
An agent is the AI that holds the conversation for you on a phone call, a browser call or a WhatsApp chat. Every call or chat in Ringg runs through one, so it is the first thing you build after [signing in](/get-started/dashboard-tour#sign-in-for-the-first-time).
In the dashboard, agents are listed under **Assistants** in the sidebar. The page itself is titled **Agents**, and **Create agent** opens the **Create Assistant** dialog.
You choose two things when you create an agent: the channel it talks on, and how its instructions are built.
## Agent types by channel
The **Create Assistant** dialog has four tabs: **Outbound**, **Inbound**, **Webcall** and **WhatsApp**. The tab decides which templates you see and what the agent can connect to. Outbound-Inbound is not a tab: it is an outbound agent with **Inbound Calling** set to **Enabled**.
| Type | What it does | What it needs to go live |
| - | - | - |
| Outbound | Calls people, from a [campaign](/documentation/deploy/campaigns/overview) or an [API call](/api-reference/calling/individual-calls/initiate-individual-call) | A caller ID (The number your callee sees when the agent calls them.): a [number](/documentation/inventory/phone-numbers/buy-or-import-a-number) or a [number pool](/documentation/inventory/phone-numbers/number-pools) |
| Inbound | Answers calls to your number | A number [attached to the agent](/documentation/inventory/phone-numbers/inbound-agent-number) |
| Outbound-Inbound | Calls out and also answers calls | A caller ID for its outbound calls |
| Webcall | Talks to visitors in a browser or app, through the Ringg widget | The widget installed on your site or app |
| WhatsApp | Chats with customers on WhatsApp, and answers calls customers place to the number from WhatsApp | A WhatsApp Business number, [connected](/documentation/inventory/tools-integrations/connect-whatsapp) and attached |
You can switch **Inbound Calling** on later too: it is under **Advanced Settings** in the editor of any outbound agent. An outbound-inbound agent's editor then shows **Outbound** and **Inbound** tabs, so each direction gets its own prompt.
The widget is not limited to webcall agents. **Embed & Widgets** is on every agent except WhatsApp agents, so a voice agent can also take browser calls.
## Agent types by build style
Every agent is either single-prompt or multi-prompt. The dashboard calls the second kind **Multi Prompt**; the agent list filters it as **Multi-node**.
| | Single-prompt agent | Multi-prompt agent |
| - | - | - |
| How it works | One [prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt), split into sections such as **Objective**, **Conversation Script** and **FAQs**, drives the whole conversation | A canvas of connected nodes. Each node has one job: talk, say a fixed line, route, call an API, collect a value or end |
| Good for | Reminders, lead qualification, support, surveys | Calls with fixed steps: keypad menus, OTP (One-time password: a short code sent to confirm a phone number or sign-in.) or PIN capture, an API lookup before the next question |
| Channels | Outbound, inbound, outbound-inbound, webcall, WhatsApp | Voice and web; not WhatsApp |
| Created from | **Blank Template** or an industry template | The **Multi Prompt** card, or [**Convert to multi-prompt**](/documentation/build-agents/agents/multi-prompt-agents/test-and-convert#convert-a-single-prompt-agent) on a single-prompt agent |
| By API | [Create Agent](/api-reference/agents/create-agent) (outbound, inbound, outbound-inbound) | Not available |
Start single-prompt. It is faster to write and easier to change, because a fix is one edit in one prompt. Move to multi-prompt when the model keeps skipping or reordering steps that must happen in order, or when a step needs keypad input or an API result before the call can continue.
## Build each type
| You want to… | Build | Then |
| - | - | - |
| Call a list of borrowers with an EMI reminder | [Outbound, single-prompt](/documentation/build-agents/agents/create-an-agent) | [Create a campaign](/documentation/deploy/campaigns/create-a-campaign) |
| Call one customer when an order ships | [Outbound, single-prompt](/documentation/build-agents/agents/create-an-agent) | [Initiate Individual Call](/api-reference/calling/individual-calls/initiate-individual-call) |
| Answer your support line | [Inbound, single-prompt](/documentation/build-agents/agents/create-an-agent) | [Attach a number](/documentation/inventory/phone-numbers/inbound-agent-number) |
| Call leads and take their callbacks | [Outbound with **Inbound Calling** enabled](/documentation/build-agents/agents/create-an-agent) | Campaign or API |
| Add a "Talk to us" button to your site or app | [Webcall](/documentation/build-agents/agents/create-an-agent) | [Web widget overview](/documentation/deploy/web-and-apps/web-widget/overview), then the [web](/documentation/deploy/web-and-apps/web-widget/overview) or [mobile](/documentation/deploy/web-and-apps/mobile-apps/install) guide |
| Reply to customers on WhatsApp | [WhatsApp, single-prompt](/documentation/build-agents/agents/whatsapp-agents/create-an-agent) | [WhatsApp overview](/documentation/build-agents/agents/whatsapp-agents/overview) |
| Verify identity, collect a PIN, branch on the answer, then transfer | [Multi-prompt](/documentation/build-agents/agents/multi-prompt-agents/overview) | Same as its channel |
| Chain calls, messages and API steps on a trigger | [Agents inside a workflow](/documentation/build-agents/workflows/overview) | [Launch a workflow campaign](/documentation/deploy/campaigns/workflow-campaign#workflow-campaigns) |
Whatever the type, the order is the same: create the agent, [test it](/documentation/build-agents/test-and-improve/test-an-agent), then connect its channel. Before a phone agent goes live, run through the [go-live checklist](/documentation/build-agents/customize-agent-behaviour/voice-and-language#before-a-voice-agent-goes-live).
## What an agent is made of
These are the sections of the single-prompt editor sidebar. A multi-prompt agent keeps the agent-wide ones in [Global Settings](/documentation/build-agents/agents/multi-prompt-agents/global-settings#global-settings) and the rest on its nodes.
| Part | What it controls | Editor section |
| - | - | - |
| [Prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt) | The first message and the instructions the agent follows | **Prompt** |
| [Voice and language](/documentation/build-agents/customize-agent-behaviour/voice-and-language) | Languages, voice and speaking speed | **Voice** |
| [Variables](/documentation/build-agents/customize-agent-behaviour/custom-variables) | Per-call values such as `callee_name`, used in the prompt as `@{{callee_name}}` | **Custom Variables** |
| [Knowledge base](/documentation/build-agents/customize-agent-behaviour/attach-a-knowledge-base) | Documents the agent looks up during a conversation | **Knowledge Base** |
| [Call settings](/documentation/build-agents/customize-agent-behaviour/call-settings) | Call length, silence handling, voicemail, interruptions, chat timeouts | **Call**, **Chat** |
| [Number](/documentation/inventory/phone-numbers/inbound-agent-number) | The number an inbound or WhatsApp agent answers on | **Attach Number** |
| [Web widget](/documentation/deploy/web-and-apps/web-widget/overview) | Components, look and install code for the widget | **Embed & Widgets** |
| [Keywords](/documentation/build-agents/customize-agent-behaviour/voice-and-language#keyword-boosting) | Brand and product names the speech recogniser should catch | **Keyword Boosting** |
| [Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) | Fields extracted from every conversation | **Advanced Analysis** |
| [Tools](/documentation/build-agents/customize-agent-behaviour/tools/overview) | API calls before, during and after a call | **Tools** |
| [Event Subscription (webhooks)](/documentation/build-agents/customize-agent-behaviour/event-subscription) | Callbacks to your server on call events | **Event Subscription** |
| [Versions](/documentation/build-agents/test-and-improve/drafts-and-versions) | Several versions of one agent with a traffic split | **Create Versions** |
The outbound caller ID is not stored on the agent. You [pick it](/documentation/inventory/phone-numbers/inbound-agent-number#outbound-choose-the-caller-id) each time you place a call or start a campaign.
## The Agents page
The page lists every agent in the workspace, with **Create agent** at the top right.
* **Channels:** filters the list to **All**, **Voice**, **WhatsApp**, **Browser** (webcall agents) or **Multi-node** (multi-prompt agents).
* **Search by name or ID** matches any part of a name, ignoring case; an ID has to match in full.
* Agents are grouped as **Favourites**, then **Edited last week** (changed in the last 7 days), then **Older**, newest first within each group. Empty groups are not shown.
* The star on a row pins the agent under **Favourites**. Favourites live in your browser, so teammates and your other devices don't see them.
* Each row shows its channel and direction (**Voice • Outbound**, **Voice • Inbound**, **Voice • Outbound-Inbound**, **Browser**, **WhatsApp** or **Multi-node**) and **Activity**, the agent's call count since it was created ("—" when there is none). It counts phone and web calls, not WhatsApp chats, and can lag by a few minutes. An agent with its own [call limit](/documentation/manage-account/call-limits) shows it as a chip such as `5 calls/1hr`; agents on the workspace limit show no chip.
The row's **⋮** menu:
| Action | What happens |
| - | - |
| **Test** | Opens the editor with the test dialog open ([Test an agent](/documentation/build-agents/test-and-improve/test-an-agent)) |
| **Clone** | Creates a copy at once, with no confirmation; "Agent cloned successfully". The copy is named "\[agent name] (Cloned)" and has the active version only (every live version while an A/B test runs). It has no inbound number attached. |
| **History** | Opens [Logs](/documentation/monitor/logs) filtered to this agent's calls |
| **Analytics** | Opens [Analytics](/documentation/monitor/analytics) filtered to this agent |
| **Delete** | Opens **Delete agent**: "Are you sure you want to delete \[agent name]? This action cannot be undone." **Delete** removes it; "Agent deleted successfully". Clone it first if you want to keep a copy. |
## Find the agent ID
API calls, campaigns and webhooks identify an agent by its `agent_id`. Find it in any of these places:
* The copy button next to the agent name in the editor's top bar.
* The editor URL: `/assistants/`.
* The agent list search (**Search by name or ID**), which matches a full ID exactly.
By API, [List Agents](/api-reference/agents/get-assistants) lists every agent with its ID. Send your [API key](/documentation/manage-account/api-key) in the `X-API-KEY` header ([authentication](/api-reference/introduction/authentication)).
```bash cURL theme={null}
curl "https://prod-api.ringg.ai/ca/api/v0/agent/all?limit=50" \
-H "X-API-KEY: $RINGG_API_KEY"
```
```javascript JavaScript theme={null}
const response = await fetch("https://prod-api.ringg.ai/ca/api/v0/agent/all?limit=50", {
headers: { "X-API-KEY": process.env.RINGG_API_KEY },
});
console.log(await response.json());
```
```python Python theme={null}
import os
import requests
response = requests.get(
"https://prod-api.ringg.ai/ca/api/v0/agent/all",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
params={"limit": 50},
)
print(response.json())
```
Page through the list with `limit` and `offset`; without `limit`, it returns every agent. To read one agent, use [Get Agent](/api-reference/agents/get-assistant-by-id).
## Next steps
> [card] [Create an agent](/documentation/build-agents/agents/create-an-agent)
>
> Outbound, inbound or webcall, from a template or from scratch.
> [card] [Build a multi-prompt agent](/documentation/build-agents/agents/multi-prompt-agents/overview)
>
> Lay out a step-by-step flow on the canvas.
> [card] [Create a WhatsApp agent](/documentation/build-agents/agents/whatsapp-agents/create-an-agent)
>
> Connect WhatsApp Business, then build the agent.
# Create an agent
Source: https://docs.ringg.ai/documentation/build-agents/agents/create-an-agent
Create a Ringg AI agent from a blank or industry template in the Create Assistant dialog, or with POST /public/agent, then open it in the editor to test.
For a template, Ringg writes the first prompt from the company and call details you enter; the API creates single-prompt voice agents only. Not sure which type you need? See [Build each type](/documentation/build-agents/agents/agent-types#build-each-type).
## Before you start
> [card] [A Ringg workspace](/get-started/dashboard-tour#sign-in-for-the-first-time)
>
> Sign in to the dashboard; agents are created from its **Agents** page.
> [card] [An API key](/documentation/manage-account/api-key)
>
> Optional: only for the API path below.
## In the dashboard
**Sidebar → Assistants → Create agent**. The video shows the whole flow, from the Agents page to the editor.
Creating a single-prompt agent in the dashboard
**1. Pick a channel**
On the **Agents** page, click **Create agent**. In the **Create Assistant** dialog, choose a tab: **Outbound**, **Inbound**, **Webcall** or **WhatsApp** ([which one?](/documentation/build-agents/agents/agent-types#agent-types-by-channel)). The templates below change with the tab. A WhatsApp agent also needs a connected WhatsApp Business number; follow [Create a WhatsApp agent](/documentation/build-agents/agents/whatsapp-agents/create-an-agent) for that path.
**2. Pick a starting point**
The left rail has **Blank Template** (selected by default), **Select industry templates** (**Logistics**, **Healthcare**, **Financial**, **Education**, **HR & Recruitment**, **eCommerce**) and **Plugins → Zapier**.
With **Blank Template** selected, the dialog shows two groups:
* **Create from scratch**: a general single-prompt template for the chosen channel, and **Multi Prompt** ("Create assistant from scratch for complex workflows."), which is not offered on the **WhatsApp** tab.
* **Choose from templates**: ready-made templates for the channel. Some have a **Play Demo** button that plays a sample call.
Pick an industry to see only its templates, or **Zapier** for the Zapier ones. Click a card to continue.

The Create Assistant dialog on the Outbound tab
**3. Fill in Agent basics (single-prompt)**
* **Agent basics**: **Agent Name** (required), **Primary Language** (required; starts on the template's language, or `en-IN`) and **Secondary Language** (optional; only languages that pair with the primary are listed, after **None**). A name like `EMI reminder - Hindi` tells your team the use case and language at a glance in the agent list and Logs.
* **Set up voice**: pick a voice from the grid. Selecting a voice plays its preview. Filter by provider tab (**All**, then each provider) or click **See more** for the full list. The grid shows only voices for the selected languages; you can change languages and voice later ([Voice and language](/documentation/build-agents/customize-agent-behaviour/voice-and-language)).

Step 1: agent basics and voice
Click **Next**. It checks the fields in order and stops with "Agent name is required", "Please select a language" or "Please select a voice"; a voice must be selected, not only previewed.
**4. Fill in the call context**
The second step holds what the template needs to write your prompt:
* **Call context**: the template's own fields, such as company details and the purpose of the call. Fields marked `*` are required. Type `@` in a field to insert a variable, or to create one ([Write the prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt)).
* **Custom variables**: values that change per call ([Variables](/documentation/build-agents/customize-agent-behaviour/custom-variables)). Variables that come with the template cannot be removed. Names are lowercased and spaces become `_` as you type.
* **Knowledge Base**: attach one or more knowledge bases. Don't have one yet? [Create a knowledge base](/documentation/inventory/knowledge-base#create-a-knowledge-base).
* **Inbound Calling** (Outbound only): **Enabled** lets this outbound agent also answer calls (an Outbound-Inbound agent). Default **Disabled**.
* **Select Phone Number** (Inbound only) or **Select WhatsApp Number** (WhatsApp only): pick the **Telephony** provider, then the **Number** the agent answers on. Optional: you can [attach it later](/documentation/inventory/phone-numbers/inbound-agent-number). Don't have one yet? [Buy or import a number](/documentation/inventory/phone-numbers/buy-or-import-a-number), or [connect WhatsApp](/documentation/inventory/tools-integrations/connect-whatsapp).

Step 2: call context
Click **Create Assistant**. **Back** returns to the first step without losing your entries. "Please fill in all required fields" means a **Call context** field is empty; the page scrolls to it and outlines it in red.
**5. Land in the editor**
A progress screen shows while Ringg writes the prompt ("This usually takes under a minute").
> [!TIP]
>
> You see **Assistant created** and the agent opens in the single-prompt editor at `/assistants/`, with its name and **Test assistant** in the top bar. On the **Agents** page it is at the top of **Edited last week**, labelled with its channel and direction, for example **Voice • Outbound**.
### Multi-prompt agents
Clicking **Multi Prompt** skips the form: Ringg creates an agent named **Untitled Workflow** and opens the canvas. Rename the agent from its name in the top bar, then build the flow: [Multi-prompt agents](/documentation/build-agents/agents/multi-prompt-agents/overview).
## With the API
Send `POST /public/agent` with your [API key](/documentation/manage-account/api-key) in `X-API-KEY` ([authentication](/api-reference/introduction/authentication)). It creates a single-prompt agent and returns its ID. Get a `voice_id` from [List Voices](/api-reference/agents/get-assistant-voices) first. The API cannot create Webcall, WhatsApp or multi-prompt agents; use the dashboard for those.
```bash cURL theme={null}
curl -X POST "https://prod-api.ringg.ai/ca/api/v0/public/agent" \
-H "X-API-KEY: $RINGG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_name": "Payment reminder",
"agent_type": "outbound",
"primary_language": "en-IN",
"secondary_language": "hi-IN",
"voice_id": "857e1b18-0adb-4b3e-b150-ce7896a16bf1",
"intro_message": "Hello, this is Asha from Acme Finance. Is this a good time to talk?",
"introduction_and_objective": "You are Asha, a polite collections assistant for Acme Finance. Remind the customer of their upcoming EMI and confirm a payment date.",
"task": "Confirm identity, state the EMI amount and due date, ask when they will pay, and note the date.",
"response_guidelines": "Be brief and respectful. Never threaten. If the customer disputes the amount, offer a callback from the team.",
"custom_variables": ["callee_name", "mobile_number", "emi_amount", "due_date"]
}'
```
```javascript JavaScript theme={null}
const response = await fetch("https://prod-api.ringg.ai/ca/api/v0/public/agent", {
method: "POST",
headers: {
"X-API-KEY": process.env.RINGG_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
agent_name: "Payment reminder",
agent_type: "outbound",
primary_language: "en-IN",
secondary_language: "hi-IN",
voice_id: "857e1b18-0adb-4b3e-b150-ce7896a16bf1",
intro_message: "Hello, this is Asha from Acme Finance. Is this a good time to talk?",
introduction_and_objective: "You are Asha, a polite collections assistant for Acme Finance. Remind the customer of their upcoming EMI and confirm a payment date.",
task: "Confirm identity, state the EMI amount and due date, ask when they will pay, and note the date.",
response_guidelines: "Be brief and respectful. Never threaten. If the customer disputes the amount, offer a callback from the team.",
custom_variables: ["callee_name", "mobile_number", "emi_amount", "due_date"],
}),
});
console.log(await response.json());
```
```python Python theme={null}
import os
import requests
response = requests.post(
"https://prod-api.ringg.ai/ca/api/v0/public/agent",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
json={
"agent_name": "Payment reminder",
"agent_type": "outbound",
"primary_language": "en-IN",
"secondary_language": "hi-IN",
"voice_id": "857e1b18-0adb-4b3e-b150-ce7896a16bf1",
"intro_message": "Hello, this is Asha from Acme Finance. Is this a good time to talk?",
"introduction_and_objective": "You are Asha, a polite collections assistant for Acme Finance. Remind the customer of their upcoming EMI and confirm a payment date.",
"task": "Confirm identity, state the EMI amount and due date, ask when they will pay, and note the date.",
"response_guidelines": "Be brief and respectful. Never threaten. If the customer disputes the amount, offer a callback from the team.",
"custom_variables": ["callee_name", "mobile_number", "emi_amount", "due_date"],
},
)
print(response.json())
```
```json Response (200) theme={null}
{
"success": true,
"data": {
"id": "00000000-0000-4000-8000-0000000000a1",
"version": "v1",
"version_id": "3411d748-1dde-4701-88ad-8d1e8fd5cefe",
"created_at": "2024-12-16T13:03:29.947147+00:00"
},
"message": "Agent created successfully"
}
```
> [!TIP]
>
> `data.id` is the `agent_id` you pass to [calling](/api-reference/calling/individual-calls/initiate-individual-call) and [campaign](/api-reference/calling/campaigns/start-campaign) endpoints. [Get Agent](/api-reference/agents/get-assistant-by-id) returns the new agent, and it is on the **Agents** page in the dashboard.
**Likeliest error:** `400` with code `VOICE_LANGUAGE_MISMATCH`: the voice does not support `primary_language`. Pick a voice from [List Voices](/api-reference/agents/get-assistant-voices) whose `languages` include it.
`intro_message` becomes the agent's **First message**. The other text fields become four prompt sections, shown in the editor as **Objective**, **Response Guidelines**, **Conversation Script** (`task`, with `sample_conversations` appended) and **FAQs**; open the agent in the dashboard to review them ([Write the prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt)). An AI assistant can also create agents for you through the Ringg [MCP server](/resources/mcp-server/workspace-mcp-server/overview).
### Request fields
The [Create Agent](/api-reference/agents/create-agent) reference lists every field. The essentials:
**agent\_name** `string` *required*
Up to 100 characters.
**intro\_message** `string` *required*
First thing the agent says; up to 500 characters.
**introduction\_and\_objective** `string` *required*
Up to 2,000 characters.
**task** `string` *required*
Up to 1,500 characters.
**response\_guidelines** `string` *required*
Up to 3,000 characters.
**primary\_language** `string` *required*
A locale such as `en-IN` or `hi-IN`; see [language codes the API accepts](/documentation/build-agents/customize-agent-behaviour/voice-and-language#language-codes-the-api-accepts).
**voice\_id** `string` *required*
From [List Voices](/api-reference/agents/get-assistant-voices); must support the language.
**agent\_type** `string`
`outbound` (default), `inbound` or `outbound_inbound`.
**custom\_variables** `string[]`
Per-call [variables](/documentation/build-agents/customize-agent-behaviour/custom-variables). For outbound agents, `callee_name` and `mobile_number` are always added.
**secondary\_language** `string`
A second locale the agent can switch to.
**faq** `string`
Questions and answers; up to 5,000 characters.
**sample\_conversations** `string`
Example conversations; up to 5,000 characters. Use `\n` between turns.
**call\_config** `object`
Call behaviour; every key is optional. See [Call settings](/documentation/build-agents/customize-agent-behaviour/call-settings#do-this-with-the-api) for the keys.
## Troubleshooting
> [accordion] "Template not available"
>
> The general template for that channel could not be loaded. Close the dialog and try again, or start from an industry template.
> [accordion] Do I need a number before I create the agent?
>
> No. Outbound agents never store a number: you pick the caller ID per call or campaign. Inbound and WhatsApp agents can be created without one and have it [attached later](/documentation/inventory/phone-numbers/inbound-agent-number).
## Next steps
> [card] [Write the prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt)
>
> Edit the first message and the sections Ringg wrote.
> [card] [Test the agent](/documentation/build-agents/test-and-improve/test-an-agent)
>
> Call yourself, or talk to it in the browser, before going live.
> [card] [Buy or import a number](/documentation/inventory/phone-numbers/buy-or-import-a-number)
>
> The caller ID for outbound calls, or the line an inbound agent answers.
# Multi-prompt global settings
Source: https://docs.ringg.ai/documentation/build-agents/agents/multi-prompt-agents/global-settings
Settings that apply to a whole Ringg AI multi-prompt agent: voice, number, variables, knowledge base, analysis, call and chat settings, events, and pre- and post-call tools.
## Global Settings
With no node selected, the right panel shows **Global Settings**, which apply to the whole agent:

A loan application flow on the canvas, with Global Settings on the right
| Item | Covers |
| - | - |
| [**Voice**](/documentation/build-agents/customize-agent-behaviour/voice-and-language) | Default language, voice and speed |
| [**Attach number**](/documentation/inventory/phone-numbers/inbound-agent-number) | Inbound number for the agent |
| [**Custom variables**](/documentation/build-agents/customize-agent-behaviour/custom-variables) | Variables passed in per call |
| [**Knowledge base**](/documentation/build-agents/customize-agent-behaviour/attach-a-knowledge-base) | Agent-wide knowledge bases |
| [**Advanced Analysis**](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) | Post-call extraction |
| **Keywords boosting** | Words the speech recogniser should favour |
| [**Call**](/documentation/build-agents/customize-agent-behaviour/call-settings) | Call duration, voicemail, interruption and other call settings |
| [**Chat**](/documentation/build-agents/customize-agent-behaviour/call-settings) | Duration settings for text sessions |
| [**Events subscription**](/documentation/build-agents/customize-agent-behaviour/event-subscription) | Webhooks for call events |
| [**Pre-call tools**](/documentation/build-agents/customize-agent-behaviour/tools/overview) | Tools that run before the call |
| [**Embed & widgets**](/documentation/deploy/web-and-apps/web-widget/overview) | Web widget, its components and install code |
| [**Post-call tools**](/documentation/build-agents/customize-agent-behaviour/tools/overview) | Tools that run after the call |
On-call tools are not in Global Settings: you attach them per Agent node.
# Node types and connections
Source: https://docs.ringg.ai/documentation/build-agents/agents/multi-prompt-agents/node-types-and-connections
Every node in a Ringg AI multi-prompt agent, what each one does and its settings, and the rules for connecting nodes with routers and transitions.
## Node types
The node picker has one **Router** entry ("Ask the caller or branch on data"); choose it, then pick **LLM Router** or **Logic Router**.
| Node (picker description) | What it does | Main settings |
| - | - | - |
| **Start** (added automatically) | Entry point of every call. | None. Cannot be deleted. |
| **Agent** “Free-form conversation” | An LLM-driven conversation with its own [prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt). | **Prompt** (**Objective**, **Response Guidelines**, **Conversation flow**, **FAQs**; plus **Intro Message** on a node connected to **Start**), **Voice** (per-node override; falls back to Global Settings), **Context strategy**, **Knowledge base** ([per node](/documentation/build-agents/customize-agent-behaviour/attach-a-knowledge-base#multi-prompt-agents)), **On-call tools** (API, Function, Workspace tool and System tools; see [Tools](/documentation/build-agents/customize-agent-behaviour/tools/overview)), **Query Phrases** (only once the node has a knowledge base or on-call tool), **End call** (**Enable End Call**). |
| **Speak** “Send a scripted message” | Says a fixed message. | **Messages** per **Language**, with several phrase variations per language (the agent rotates them so it does not repeat itself); **Allow user to interrupt** (off by default). |
| **LLM Router** “Router → Ask the caller, decide on reply” | Branches on what the caller says. | **Conditions** (plain-language, e.g. "When the caller wants to reschedule"), **Retry behavior** (**Message**, **Ask attempts** 1–5, default 2), **Fallback** (**After exhausting attempts**), [**Extract variables**](#extract-variables). |
| **Logic Router** “Router → Branch on existing data” | Branches on variable values, with no caller turn. | **Conditions** built from rules (operators: equals, not equals, greater than, less than, greater or equal, less or equal, contains, in, is set, is not set), **Match** **All** or **Any**; **Fallback** (**When nothing matches**). A rule's left side is a variable or a [custom formula](#custom-formulas). |
| **Action** “Call an API or knowledge base” | Makes an HTTP request and stores the response. Despite the picker text, there is no knowledge base action; give an Agent node a knowledge base instead. | Request editor (method, URL, headers, path, query, body, response); **Retries on failure** (**No retries** by default, or 1, 2, 3; retried on 429/5xx). Outputs **On success** and **On failure**. |
| **Keypad Menu** “Press a key to choose a branch” | Routes on the digit the caller presses (DTMF (Dual-tone multi-frequency: the tones a phone keypad sends when a key is pressed.)). The menu itself ("Press 1 for sales…") is spoken by the Speak node before it; this node has no prompt. | **Keys** (digits 1–9 and 0, each routed to a node; `*` clears the input and `#` submits, so neither can be a key), **Wait for keypress** (3–15 s, default 5), **Retry behavior** (**Message** spoken before re-asking, **Ask attempts** 1–5, default 3), **Fallback** (**After max attempts, go to**). |
| **Collect** “Capture a value from the caller” | Captures and checks one value. | **Field type**: Phone number, Email, One-time passcode or PIN code; **Default country code** (phone, default +91); **Number of digits** (OTP (One-time password: a short code sent to confirm a phone number or sign-in.) and PIN, 3–10; defaults 5 and 4); **Allow keypad entry** (off by default); **Retry behavior** (**Ask attempts** 1–5, default 3); **Fallback** (**If it can't be collected, go to**). Outputs **Captured** and **Failed**. |
| **Widget** “Show a widget to the caller” | Shows one of the agent's widgets to the caller. | **Widget**: one of the agent's static widgets from **Embed & widgets** ([Embed & Widgets](/documentation/deploy/web-and-apps/web-widget/components)). |
| **End** “Finish the call” | Ends the call. | None. |
Responses stored by an Action node are available to later nodes through the `@` menu ([Variables](/documentation/build-agents/customize-agent-behaviour/custom-variables)).

An Action node's request editor after Test API: pick the response fields to store
**Context strategy** decides what an Agent node remembers from earlier nodes. The node being entered sets it:
| Strategy | What the node starts with |
| - | - |
| **Append (carry over)** (default) | Everything so far: earlier instructions, every turn, and tool calls and results |
| **Reset (start fresh)** | Only its own instructions; earlier turns are dropped |
| **Reset (keep conversation)** | Its own instructions plus the earlier caller and agent turns, without earlier instructions or tool results |
| **Reset with Summary** | Its own instructions plus a summary of the conversation so far, written from its **Summary Prompt** ("Summarize the conversation so far..."). If the summary can't be written in time, the node falls back to Append |
### Extract variables
An LLM Router can pull values out of the caller's answer as it routes. Each entry has a `variable_name`, a type (**String**, **Number**, **Boolean**, **Date**, **Enum** with its values as a comma-separated list, or **Array**) and a description: "Describe what this variable should capture from the conversation". Extracted variables appear under **Extracted Variables** in the `@` menu of later nodes and in a Logic Router's variable picker, and in the **Test call summary** after a test.
### Custom formulas
In a Logic Router rule, the variable picker's **Logic** section offers **Custom formula**, which replaces the variable with a jq expression. Describe it in English ("e.g. days until the payment date") and click **Generate formula**, or click **Paste formula directly** and type the jq yourself. The card shows **Sample values used** so you can check what the formula read, and the operator and value of the rule stay as they were. **Use a variable** switches back.
## Connection rules
The node picker enforces these rules. Blocked types appear greyed out with the reason as a tooltip, for example "Agents can only hand off to an LLM Router or End — route through a Router to continue."
| From | Can connect to | Cannot connect to |
| - | - | - |
| **Start** | Agent, Speak, Logic Router, Action | End, LLM Router, Keypad Menu, Collect, Widget |
| **Agent** | LLM Router, End | Everything else, including Logic Router |
| **LLM Router** | Any node except another LLM Router | LLM Router |
| Any other node | Any node type except **Start**, including **End**. **Widget** only after you add a widget with static content under [Embed & widgets](/documentation/deploy/web-and-apps/web-widget/overview) | |
When an LLM Router follows an Agent node, the Agent makes the routing decision, so the router hides its **Retry behavior** and **Fallback** sections.
# Multi-prompt agents
Source: https://docs.ringg.ai/documentation/build-agents/agents/multi-prompt-agents/overview
Build a Ringg AI multi-prompt agent: when to use one, create it, find your way around the canvas, and read an example flow from greeting to transfer.
Choose a multi-prompt agent when a call has strict steps or branches, such as a keypad menu, OTP (One-time password: a short code sent to confirm a phone number or sign-in.) capture or an API lookup before the next question. For most calls, a [single-prompt agent](/documentation/build-agents/agents/agent-types#agent-types-by-build-style) with one sectioned prompt is simpler to build and maintain.
In the dashboard: **Sidebar → Assistants → Create agent → Multi Prompt**. The dashboard calls these agents **Multi Prompt** and lists them under the **Multi-node** filter on the Agents page (multi-node is the internal name).
Multi-prompt agents support voice and web calls, not WhatsApp: the **Multi Prompt** card is not shown on the **WhatsApp** tab, and **Convert to multi-prompt** is not offered for WhatsApp agents.
## Before you start
> [card] [A knowledge base](/documentation/inventory/knowledge-base)
>
> Optional: for Agent nodes that answer from your documents.
> [card] [Tools](/documentation/build-agents/customize-agent-behaviour/tools/overview)
>
> Optional: on-call tools for Agent nodes, pre-call and post-call tools for the agent.
## Create a multi-prompt agent
**1. Open the create dialog**
On the Agents page (listed under **Assistants** in the sidebar), click **Create agent**. The **Create Assistant** dialog opens.
**2. Pick Multi Prompt**
On the **Outbound**, **Inbound** or **Webcall** tab, under **Create from scratch**, click **Multi Prompt** ("Create assistant from scratch for complex workflows.").
**3. Start building**
There is no form. The dashboard creates an agent named **Untitled Workflow** with a **Start** node and the custom variables `callee_name` and `mobile_number`, then opens the canvas. Whichever tab you start from, the new agent is an outbound agent.
> [!TIP]
>
> You see "Workflow created successfully" and the canvas with a single **Start** node.
You can also turn an existing single-prompt agent into a multi-prompt one. See [Convert a single-prompt agent](/documentation/build-agents/agents/multi-prompt-agents/test-and-convert#convert-a-single-prompt-agent).
## The canvas
The editor has two parts. The canvas on the left holds the nodes and their connections. The panel on the right shows the settings of the selected node, or **Global Settings** when nothing is selected; drag the divider to resize it.
The video adds a node, opens a node's settings, then opens Global Settings.
Working on the multi-prompt canvas
* **Add a node:** click the dot on a node's output. A picker lists the node types you can add there ([connection rules](/documentation/build-agents/agents/multi-prompt-agents/node-types-and-connections#connection-rules)).
* **Drag to add:** drag from an output dot to empty canvas. A preview of the next node follows the cursor; press **Tab** to switch its type, then release to place it. Drag onto an existing node to connect the two.
* **Reuse an Agent node:** once the flow has an Agent node, **Agent** opens a submenu with **Blank agent** and **From existing** (copies another Agent node's setup).
* **Name a node:** click the name or the description at the top of its panel and type. **Enter** saves the name (**Cmd/Ctrl+Enter** for the description), **Esc** cancels. The name is what you see in the test summary, in the call's path in [Logs](/documentation/monitor/logs) and from the [MCP server](/resources/mcp-server/workspace-mcp-server/tool-reference), so name nodes by what they do: "Greet and confirm identity", "Eligible?".
* **Canvas controls:** **Zoom in**, **Zoom out**, **Fit to screen**, **Organize nodes** (auto-layout left to right) and **Hand tool (H)** for panning.
* **Delete:** each node has a delete action with a confirmation. To delete several, drag a box around them and press **Delete** or **Backspace**; **Delete selection** asks you to confirm. The **Start** node cannot be deleted.

The node picker, opened from a router branch
Most node panels have their own **Save** button, which reads **Saved** once the node has no pending edits. Saved node changes go into the agent's draft; they reach callers only when you [publish](/documentation/build-agents/test-and-improve/drafts-and-versions#publish-changes-on-a-multi-prompt-agent).

An Agent node's settings with the Prompt section open
## Example flow
A rescheduling call, built from the node types below. Edge labels are the router's conditions and the nodes' outputs.
```mermaid theme={null}
flowchart TD
S([Start]) --> A[Agent: greet and confirm identity]
A --> R{LLM Router}
R -->|Wants to reschedule| C[Collect: PIN code]
R -->|Not interested| E([End])
C -->|Captured| X[Action: book slot]
C -->|Failed| E
X -->|On success| K[Speak: confirm the new slot]
X -->|On failure| E
K --> E
```
## Troubleshooting
> [accordion] The banner says “Review and resolve each issue before publishing.”
>
> The last publish found problems in the flow. Click **Review issues** and open each issue to jump to the node or connection that needs fixing, then [publish again](/documentation/build-agents/test-and-improve/drafts-and-versions#publish-changes-on-a-multi-prompt-agent).
## Next steps
> [card] [Publish changes and run A/B tests](/documentation/build-agents/test-and-improve/drafts-and-versions)
>
> Drafts, publishing, versions and traffic split.
> [card] [Add tools to your agent](/documentation/build-agents/customize-agent-behaviour/tools/overview)
>
> Pre-call, on-call and post-call tools.
# Test and convert multi-prompt agents
Source: https://docs.ringg.ai/documentation/build-agents/agents/multi-prompt-agents/test-and-convert
Test a Ringg AI multi-prompt agent, convert a single-prompt agent into a flow, and build or edit flows from an AI assistant through the MCP server.
## Test a multi-prompt agent
**1. Publish or discard pending changes**
While the agent has unpublished changes, the top bar shows **Discard** and **Publish** instead of **Test assistant**. Publish them first. See [Publish changes on a multi-prompt agent](/documentation/build-agents/test-and-improve/drafts-and-versions#publish-changes-on-a-multi-prompt-agent).
**2. Choose a test mode**
Click **Test assistant** and pick **Phone call**, **Web call** or **Live chat** ([test options](/documentation/build-agents/test-and-improve/test-an-agent#test-options)). Phone call opens a dialog; web call and live chat run in the right panel so the canvas stays visible.
**3. Watch the flow**
During the test, the canvas highlights the node the conversation is on and marks the path taken so far. Extracted values appear on the nodes as they are captured.
**4. Review the run**
When the call ends, the path stays on the canvas with a **Test call ended** pill. Click **View summary** to see the **Path** and **Extracted variables**.
> [!TIP]
>
> The path on the canvas matches the branch you expected, and the extracted values are correct. The call is also in [Logs](/documentation/monitor/logs).
A test runs the version shown in the editor. For test modes and caller variables, see [Test an agent](/documentation/build-agents/test-and-improve/test-an-agent).
## Convert a single-prompt agent
Where conversion is available, a single-prompt agent shows **Convert to multi-prompt** under **More** in its editor sidebar; its tooltip shows the prompt's token count. It isn't offered to every workspace: if you don't see it, contact Ringg.
**1. Open the dialog**
Click **Convert to multi-prompt**. The dialog **Convert to multi-node agent** explains that your current agent will remain unchanged.
**2. Start the conversion**
Click **Upgrade**. Progress streams in: plan generated, start and end nodes created, then each Agent, Speak and Router node and its connections. You can close the dialog; the conversion keeps running.
**3. Open the result**
When the dialog title changes to **Multi-node agent is ready**, click **Open new agent**. The conversion creates a separate multi-prompt agent. Review its nodes, then test it before you route real calls to it.
> [!TIP]
>
> The new multi-prompt agent opens on the canvas. Your original single-prompt agent is unchanged.
## Build flows with AI tools
The Ringg [MCP server](/resources/mcp-server/workspace-mcp-server/overview) can create multi-prompt agents and edit their nodes and connections as a draft, then publish them, so an AI assistant that supports MCP can build or change a flow for you. See [connect the MCP server](/resources/mcp-server/workspace-mcp-server/connect-an-assistant) and its [tools](/resources/mcp-server/workspace-mcp-server/tool-reference).
# Create a WhatsApp agent
Source: https://docs.ringg.ai/documentation/build-agents/agents/whatsapp-agents/create-an-agent
Create a Ringg AI WhatsApp agent, attach a registered WhatsApp number, set the chat session timeouts, let it send approved templates and test it by QR code.
A WhatsApp agent answers messages on one registered WhatsApp Business number, from the same create dialog as every other [agent type](/documentation/build-agents/agents/agent-types#agent-types-by-channel). A [voice agent](/documentation/build-agents/agents/create-an-agent) that only needs to *send* WhatsApp messages uses the [WhatsApp tools](/documentation/build-agents/customize-agent-behaviour/tools/whatsapp-tools#on-call) instead.
In the dashboard: **Assistants → Create agent → WhatsApp**.
## Before you start
> [card] [WhatsApp Business connected](/documentation/inventory/tools-integrations/connect-whatsapp)
>
> With at least one registered (**Ready**) number.
> [card] [Approved templates](/documentation/inventory/tools-integrations/connect-whatsapp#message-templates)
>
> Optional: only if the agent sends templates in a chat.
## Create the agent
The form is the one described in [Create an agent](/documentation/build-agents/agents/create-an-agent); these are the WhatsApp-specific choices.
Creating a WhatsApp agent, picking a template it may send, setting the session timeouts and opening the test QR code
**1. Choose the WhatsApp tab**
Go to **Assistants**, select **Create agent**, and choose the **WhatsApp** tab. Under **Create from scratch**, pick the single-prompt WhatsApp template; its prompt already carries WhatsApp's formatting rules.
**2. Fill in the basics**
Enter the **Agent Name**, **Primary Language** and optional **Secondary Language**, and pick a voice (the form requires one; the agent speaks with it when a customer calls the number from WhatsApp). Select **Next**.
**3. Describe the business and goal**
Fill in the **Call context** fields: what the business is and what the chat should achieve. Ringg writes the first version of the prompt from them. Add any **Custom variables** and **Knowledge Base** the agent needs.
**4. Select the WhatsApp number**
Under **Select WhatsApp Number**, pick the registered number this agent answers on ([which numbers are listed](#attach-a-whatsapp-number)); an empty list reads **No WhatsApp numbers connected**. You can leave it empty and attach one later.

The WhatsApp number step of the create form
**5. Create**
Select **Create Assistant**.
> [!TIP]
>
> The agent editor opens. On the **Assistants** page, set **Channels** to **WhatsApp** to find it again.
## Attach a WhatsApp number
A WhatsApp agent answers on exactly one number, and each number serves one agent at a time. Messages to a number with no agent attached get no reply. The list offers a number only when it belongs to the connected WhatsApp Business account, shows **Ready**, and no other agent uses it.
1. In the agent editor's left menu, expand **Attach Number** (in the top group, below **WhatsApp Templates**).
2. Open **WhatsApp Number** and choose a number. It saves as soon as you choose. The last option, **Connect WhatsApp Number**, takes you to [add and register one](/documentation/inventory/tools-integrations/connect-whatsapp#add-a-number).
To move a number to another agent, clear it on the agent that has it, then attach it on the new agent. De-registering or archiving a number detaches it, and the agent stops answering until you attach another.
## What's different in the editor
| Section | For a WhatsApp agent |
| - | - |
| **Prompt** | The first message is sent as a WhatsApp message when the chat starts. |
| **WhatsApp Templates** | Templates the agent may send during a chat. See [Send a template during a chat](#send-a-template-during-a-chat). |
| **Attach Number** | In the top group, offering only WhatsApp numbers. |
| **Chat → Settings** | The WhatsApp session timeouts. See [Set the session timeouts](#set-the-session-timeouts). |
| **Tools** | Pre-call, on-call and post-call tools as usual. Pre-call tools run on the customer's first message without holding up the reply; a field a tool didn't return resolves to "not available". **End Chat** sits under **Chat Tools** in the on-call side panel. |
| **Event Subscription** | Chat events instead of call events. See [Events](/documentation/build-agents/customize-agent-behaviour/webhooks/whatsapp-chat-events#whatsapp-chat-events). |
| Not shown | **Embed & Widgets**, **Keyword Boosting**, and A/B testing (except to finalize one already running). |
## When a chat opens and closes
A WhatsApp conversation is one chat. The customer's first message opens it, and it stays open while messages keep flowing. It closes when:
| Trigger | What happens |
| - | - |
| The agent ends it | The agent calls **End Chat**, writes a closing message and closes the chat. |
| The customer goes quiet | After the idle timeout (3 hours by default) with no customer message, the chat ends. Their next message opens a new chat. |
| It reaches the maximum length | After the maximum length (24 hours by default), however active, the next message opens a new chat. |
A new chat starts without the previous chat's messages. Closing the chat is what runs post-call tools and analysis and fires `chat_completed`, so when a customer stops replying, those results arrive after the idle timeout.
### Set the session timeouts
Shorter timeouts give you post-call results and webhooks sooner; longer ones keep context for customers who take hours to reply. A chat keeps the timeouts it started with, so a change applies to chats that open afterwards.
In the agent editor, open **Chat → Settings**. Under **WhatsApp session**:
| Setting | Default | Options |
| - | - | - |
| **End the chat after no messages for** | 3 hours | 15 or 30 minutes; 1, 2, 3, 6, 12 or 24 hours |
| **Start a new chat after** | 24 hours | 1, 6, 12 or 24 hours; 2, 3, 5 or 7 days |
Each change saves immediately. The second dropdown only offers values at or above the first; raising the idle timeout above the session length raises the length in the same save.

The WhatsApp session settings under Chat → Settings
### Set the session timeouts with the API
[Edit Assistant](/api-reference/agents/edit-assistant) with `operation: "edit_chat_settings"`. Send both fields; one you leave out resets to its default.
| Field | Default | Allowed |
| - | - | - |
| `idle_timeout_minutes` | 180 | 5 to 1440 |
| `max_duration_minutes` | 1440 | 60 to 10080, at least `idle_timeout_minutes` |
```bash theme={null}
curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/agent/v1" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"operation": "edit_chat_settings",
"agent_id": "your-agent-id",
"chat_settings": {
"whatsapp_session": { "idle_timeout_minutes": 1440, "max_duration_minutes": 4320 }
}
}'
```
### End the chat
**End Chat** closes the chat straight away, so post-call tools and analysis run without waiting for the idle timeout. Mention it in the prompt as `@||end_chat||` where the conversation should end. Use it instead of `@||end_call||`: **End Call** and the other call tools don't run during a chat.
## Write a prompt for WhatsApp
* Keep replies short, one to three small paragraphs. WhatsApp folds long messages behind "Read more".
* Use WhatsApp formatting only: `*bold*`, `_italic_`, `~strike~`, and lines starting with `- ` or `1. ` for lists.
* Skip Markdown headings, tables and `[label](url)` links. Send the bare URL; WhatsApp makes it clickable.
* Don't mention calls, audio, holding or keypad input. The customer is typing.
* Mention every on-call tool and template with `@` where it should be used, and `@||end_chat||` where the chat ends.
```text theme={null}
You are Neha, a WhatsApp assistant for Acme Insurance. You help customers renew
their health policy.
- Greet the customer by name if {{name}} is available, and ask how you can help.
- Answer plan questions from the knowledge base. Keep each reply under 80 words.
- When the customer is ready to renew, send the renewal link with
@||send_renewal_reminder|| and tell them it has been sent.
- Use *bold* for plan names and prices. Never use headings or tables.
- When the customer says they're done, thank them and end the chat with
@||end_chat||.
```
## Send a template during a chat
A WhatsApp agent can send an approved template mid-chat: a brochure, a payment link, a quick-reply menu. Use **WhatsApp Templates** for this. The **Send WhatsApp Template** integration tool can't send templates in a chat; it is for voice agents and post-call sends.
**1. Select the templates**
In the editor's left menu, expand **WhatsApp Templates** and select **Select Template**. The list shows the approved templates of the attached number's account; tick each one the agent may send. **Manage templates** opens [Message templates](/documentation/inventory/tools-integrations/connect-whatsapp#message-templates).
If the section says **Attach a WhatsApp number to this assistant first**, [attach one](#attach-a-whatsapp-number). Rows the agent can't send yet are disabled with the reason: Authentication templates, location headers, text headers with more than one variable, buttons with a variable link, copy-code and Flow buttons.
**2. Fill in the variables**
If the template has variables or a media header, a dialog asks what fills each variable:
* **Static**: fixed text, sent as written.
* **Variable**: a custom variable such as `{{name}}`, filled when the chat starts.
* **Dynamic**: the agent fills it from the conversation, for example the plan the customer chose.
For an image, video or document header, paste a public `https://` link; the same file goes out on every send.

Setting up a template with named variables
**3. Tag the template in the prompt**
Type `@` in the prompt and pick the template under **WhatsApp Templates**. Its tool name is `send_` plus the template name, for example `@||send_renewal_reminder||`; if that name is already taken, the language code is appended.
Each selected template is listed under **WhatsApp Templates** with its language; the pencil re-opens the variable dialog and the bin removes it. A line under the name flags one that can no longer be sent as set up: **Not in this WhatsApp account**, **Template rejected** (or another non-approved status), or **Variables changed, edit to re-map**.
The template is the agent's whole reply for that turn, and each send appears in the chat transcript under **Logs → WhatsApp**. If a **Variable** isn't available in a chat, the agent fills it from the conversation. When the customer taps a quick-reply button or swipes to reply to an earlier message, their reply reaches the agent with a short quote of that message, so "yes, this one" is understood in context.
## Test from your phone
Select **Test assistant** in the editor's top bar. A QR code for the attached number appears with "Scan to start a WhatsApp chat". Scan it with your phone's camera, or use **Open in WhatsApp**, and send a message. If the dialog says "No number attached", [attach a number](#attach-a-whatsapp-number) and reopen **Test assistant**.
> [!TIP]
>
> Your conversation appears under [Logs → WhatsApp](/documentation/monitor/logs#whatsapp-chats).
## Common questions
> [accordion] Can one number serve two agents?
>
> No. A number is attached to one agent at a time; [move it](#attach-a-whatsapp-number) by clearing it on the first agent.
> [accordion] Why is my test chat still Ongoing in Logs?
>
> It stays **Ongoing** until it [closes](#when-a-chat-opens-and-closes), and post-call tools, analysis and `chat_completed` wait with it. Lower **End the chat after no messages for** while testing.
> [accordion] Can a WhatsApp agent be multi-prompt?
>
> No. The **Multi Prompt** card is hidden on the WhatsApp tab and **Convert to multi-prompt** isn't offered for WhatsApp agents.
## Next steps
> [card] [Send WhatsApp Flows](/documentation/build-agents/agents/whatsapp-agents/flows)
>
> Forms inside the chat: bookings, lead forms and surveys.
> [card] [Add WhatsApp tools](/documentation/build-agents/customize-agent-behaviour/tools/whatsapp-tools#on-call)
>
> Send templates or text from voice agents and after chats.
> [card] [Message customers first](/documentation/deploy/whatsapp/start-a-conversation)
>
> Open a chat with a template from your backend.
> [card] [Read the chats](/documentation/monitor/logs#whatsapp-chats)
>
> Every conversation in Logs, with transcript and export.
Related topics
# Build WhatsApp Flows in Ringg
Source: https://docs.ringg.ai/documentation/build-agents/agents/whatsapp-agents/flow-builder
Create, preview and publish WhatsApp Flows from the Ringg AI dashboard, screen by screen or as Flow JSON, without opening Meta's WhatsApp Manager.
You can build a [WhatsApp Flow](/documentation/build-agents/agents/whatsapp-agents/flows) in Ringg instead of Meta's WhatsApp Manager. The builder shows one screen at a time: its title and content on the left, and on the right a preview you can fill in like the customer would. Ringg saves the Flow to your WhatsApp Business account as a draft, and when you publish it, any of your WhatsApp assistants can send it.
There are two ways to start:
| Start from | Use it for |
| - | - |
| **The builder** | Forms such as lead capture, feedback, site visit requests or KYC details. |
| **Paste JSON** | A Flow JSON you already have, such as a design from WhatsApp Manager, from a developer, or the booking design in [Flows with live data](/documentation/build-agents/agents/whatsapp-agents/flows-live-data#set-up-appointment-booking). See [Paste Flow JSON](#paste-flow-json). |
## Before you start
* A connected WhatsApp Business account. See [Connect WhatsApp Business](/documentation/inventory/tools-integrations/connect-whatsapp).
* You don't need access to WhatsApp Manager.
## Build a Flow
Building a two-screen Flow, trying it in the preview, then saving, publishing and duplicating it
**1. Open the builder**
Go to **Tools → WhatsApp Business**, select the **Flows** tab, then **Create Flow**.
**2. Name it**
* **Name**: something your team will recognise, such as *Site visit request*.
* **Category**: the closest match, for example *Lead generation* or *Appointment booking*.
**3. Add screens and content**
The first screen starts with an empty **Short answer**. Give the screen a **Page title**, then select a row to edit it. Drag a row by its handle to reorder it, and use the bin to remove it.
* **Add content** adds text or a question to the screen. See [What you can add](#what-you-can-add).
* **+** next to the screen names adds a screen. The arrows, or the screen names on either side of the current one, move between screens. **Delete screen** removes the screen you're on.
Keep it short. Two or three screens with a handful of questions each gets the most submissions.

The second screen of a Flow in the builder, with its preview
**4. Name the buttons**
Every screen ends with a **Button**:
* On each screen except the last, it takes the customer to the next screen. It says *Continue* unless you change it.
* On the last screen, it submits the form and sends every answer back into the chat, labelled by question. It says *Submit* until you change it, for example to *Request visit*.
**5. Try it in the preview**
Fill in the preview on the right and tap its buttons to move between screens, as the customer would. Required questions you leave empty are flagged. Select a number above the preview to jump to a screen.
When you submit, the preview shows the answers and, under **Assistant reads**, the exact message your assistant gets:
```text theme={null}
User submitted the WhatsApp Flow "Site visit request": Full name=Priya Sharma,
Project=Green Acres Villas, Preferred visit date=2026-10-04
```
Select **Start again** to clear it.

The preview after submitting: the answers and what the assistant reads
**6. Save the draft**
Select **Save draft**. Ringg creates the Flow on your WhatsApp account as a draft and keeps it open, so you can carry on editing and select **Save**. Select **Cancel** to see its details.
If Meta finds a problem, the builder stays open and lists it under *Meta found problems in the saved draft*. The draft is saved, but it can't be published until you fix the problem and save again.
**7. Publish it**
In the details, check the preview once more, select **Publish**, then **Publish** again to confirm.

A saved draft's details: Delete draft, Edit and Publish
> [!WARNING]
>
> Published Flows can't be changed. To change one later, see [Change a published Flow](#change-a-published-flow).
The Flow is now ready to [add to an assistant](/documentation/build-agents/agents/whatsapp-agents/flows#let-your-assistant-send-it) or to [a template's Flow button](/documentation/build-agents/agents/whatsapp-agents/flows#open-a-flow-from-a-message-template).
## What you can add
**Add content** lists the same components as WhatsApp Manager. The character limits are Meta's, and the builder shows how many you've used.
| Group | Content | What the customer gets | Limit |
| - | - | - | - |
| Text | **Large heading**, **Small heading** | A title inside the screen | 80 characters |
| | **Body** | A paragraph of text | 4,096 characters |
| | **Caption** | Small print | 409 characters |
| Text answer | **Short answer** | A one-line field. Choose its **Input type**: *Text*, *Email*, *Number* or *Phone*. | Label up to 20 characters |
| | **Paragraph** | A field for a few lines, such as an address | Label up to 20 characters |
| | **Date picker** | A calendar to pick a date | Label up to 40 characters |
| Selection | **Single choice** | A list where they pick one | Up to 20 options. Label up to 30 characters. |
| | **Multiple choice** | A list where they pick one or more | Up to 20 options. Label up to 30 characters. |
| | **Dropdown** | A menu where they pick one | Up to 200 options. Label up to 20 characters. |
| | **Opt-in** | A checkbox they tick, such as consent to be contacted | Up to 120 characters |
Each question also has:
* **Label**: what the customer sees, and the name its answer comes back under.
* **Required**: on by default. The customer can't continue until they answer.
* **Instructions** (optional): a hint under the field, such as *As on your ID*. Up to 80 characters. For short answers, paragraphs and date pickers.
* **Options**, for choices and dropdowns: each has a title of up to 30 characters and an optional description of up to 300.
A screen holds up to 49 pieces of content, and a button label is up to 35 characters.
> [!TIP]
>
> Labels matter. Ringg shows the customer's answers under these labels in the chat, in **Logs** and in your webhooks, and your assistant reads them too. *Preferred visit date* is clearer than *Date*.
## View as JSON
Every Flow is a Flow JSON document that WhatsApp reads. Select **View as JSON** in the builder to see the complete Flow JSON for what you've built. It is read-only: select the copy icon to copy it, for example for a developer or into WhatsApp Manager. Select **Edit flow** to go back.

View as JSON: the Flow JSON for the Flow being built
## Paste Flow JSON
To build from a Flow JSON you already have, copy it, then select **Paste JSON** in the builder. Pasting replaces everything in the builder:
* Text, text fields, choices, dropdowns, date pickers and opt-ins become rows you can edit, as if you had added them.
* Anything else stays as a **JSON** row: images, components that read screen data such as `${data.min_date}`, buttons that call the Flow's endpoint, and other components from Meta's [Flow JSON reference](https://developers.facebook.com/docs/whatsapp/flows/reference/flowjson). You can open a JSON row to read it, reorder it or remove it, but not edit it.
When a Flow has JSON rows, Ringg sends them to Meta exactly as pasted. To change one, edit the JSON and paste it again.
> [!NOTE]
>
> In a Flow with JSON rows, only the values in the last screen's `complete` action come back into the chat. Add every answer you need to its `payload`, such as `"full_name": "${form.full_name}"`. For a Flow built only from rows you can edit, the builder does this for you.
The preview draws text, text fields, choices, dropdowns, date pickers and opt-ins. A JSON row shows only its type, such as *DatePicker*. To see it, save the draft and select **View on Meta** below the preview, which opens the Flow in WhatsApp Manager.
## Drafts
A draft built in Ringg opens in the builder when you select it in the **Flows** tab. Select **Cancel** to see its details, whose buttons are:
* **Edit**: reopens it in the builder.
* **Publish**: makes it ready to send.
* **Delete draft**: removes it from your WhatsApp account. Only drafts can be deleted.
Drafts can't be sent to customers, so an assistant's Flow picker doesn't list them.
## Change a published Flow
Meta locks a Flow once it's published, so you change a copy instead:
**1. Copy it**
Open the Flow in the **Flows** tab and select **Duplicate & edit**. This works for Flows made in WhatsApp Manager too.
The copy is a new draft named after the original, with *(copy)* at the end, and it opens in the builder. A copy of a WhatsApp Manager Flow keeps anything the builder can't edit as JSON rows, as with [Paste JSON](#paste-flow-json). Rename the copy if you like.

A published Flow's details, with Duplicate & edit
**2. Edit, save and publish the copy**
Make your changes, select **Save draft**, then publish it from its details. If the original used [live data](/documentation/build-agents/agents/whatsapp-agents/flows-live-data), set up its data source again on the copy before publishing.
**3. Switch to the copy**
* In each assistant that sent the original, remove the old Flow under **WhatsApp Flows**, add the copy, and update its `@` tag in the prompt.
* A template's Flow button keeps opening the original. Edit the template to use the copy.
## Troubleshooting
The builder names the first problem it finds at the bottom left, next to **Save draft**, which stays greyed out until it's fixed.
| You see | Where | What to do |
| - | - | - |
| *Give the Flow a name.* or *Give screen 2 a title.* | Builder | Fill in the **Name** or the **Page title**. |
| *Every question on screen 2 needs a label.* | Builder | Fill in the question's **Label**, or remove the question. |
| *"Preferred date of the site visit" is longer than 40 characters.* | Builder | Shorten it. The limits are Meta's. See [What you can add](#what-you-can-add). |
| *"Project" needs at least one option.* | Builder | Add an option, or remove the question. |
| *Add some content to screen 2.* | Builder | Add a question or text, or select **Delete screen**. |
| *Meta found problems in the saved draft* | Top of the builder | The draft is saved, but Meta lists what it won't accept. Fix each one and select **Save** again. |
| *Clipboard is not Flow JSON* or *Clipboard is empty* | A pop-up message after **Paste JSON** | Copy the whole Flow JSON, including its `screens` list, and paste again. |
| *Clipboard access denied* | A pop-up message after **Paste JSON** | Allow clipboard access for the dashboard in your browser, then paste again. |
| *Could not save the Flow* | A pop-up message | The reason is shown under it. Fix it and save again. |
| *This step asks the endpoint for the next screen. Only WhatsApp can run it.* | Builder preview | Steps that load live data only run in WhatsApp. Select the next screen's number above the preview, or use **View on Meta** after saving. |
## Good to know
> [accordion] Drafts also appear in WhatsApp Manager
>
> A Flow built in Ringg lives on your WhatsApp Business account, like one made in WhatsApp Manager, so you can see it there too. If you change a draft in WhatsApp Manager, saving it again in Ringg replaces those changes.
> [accordion] How answers are named
>
> Each answer comes back under its question's label, such as *Full name=Priya Sharma*. If you change a label in a copy, update any prompt or analysis that mentions the old one.
> [accordion] Flows belong to one WhatsApp Business account
>
> A Flow is created on the account whose **Flows** tab you build it in. Only assistants with a number on that account can send it.
Related topics
# WhatsApp Flows
Source: https://docs.ringg.ai/documentation/build-agents/agents/whatsapp-agents/flows
Send customers a form inside WhatsApp from a Ringg AI agent, like a booking, a lead form or a survey, and get their answers back as the next chat message.
A **WhatsApp Flow** is a form that opens inside WhatsApp. The customer taps a button in the chat, fills in a few screens (text fields, dropdowns, dates, checkboxes) and submits. Their answers come straight back into the conversation, so your assistant can act on them.
You build the Flow once, either in Ringg's [Flow builder](/documentation/build-agents/agents/whatsapp-agents/flow-builder) or in Meta's **WhatsApp Manager**, which Ringg picks up automatically. Then any WhatsApp assistant can send it, or a message template can carry it as a button.
The Flows tab, a Flow's details, adding it to an assistant, a template's Flow button, and the answers in Logs
## Two kinds of Flow
| | Static Flow | Dynamic Flow (live data) |
| - | - | - |
| What it shows | Only what you typed when building it, plus values your assistant fills in when sending | Screens filled in while the customer is inside the form, such as free time slots from your calendar |
| Good for | Lead forms, feedback, surveys, address or document collection, KYC details | Appointment booking, picking a branch near a pincode, checking stock or prices |
| Setup | This page | This page, then [Flows with live data](/documentation/build-agents/agents/whatsapp-agents/flows-live-data) |
Start with a static Flow. Everything on this page also applies to Flows with live data.
## Before you start
* A connected WhatsApp Business account with at least one **Ready** number. See [Connect WhatsApp Business](/documentation/inventory/tools-integrations/connect-whatsapp).
* A WhatsApp assistant with that number attached. See [Create a WhatsApp agent](/documentation/build-agents/agents/whatsapp-agents/create-an-agent).
* To build in WhatsApp Manager instead of Ringg: access to the same WhatsApp Business account in Meta's [WhatsApp Manager](https://business.facebook.com/wa/manage/home/).
## Build a static Flow
> [tab] In Ringg
>
> **1. Open the builder**
>
> Go to **Tools → WhatsApp Business**, select the **Flows** tab, then **Create Flow**. Name it, for example *Site visit request*, and pick a category.
>
> **2. Design the screens**
>
> Fill in the first screen's **Short answer**, add questions and text with **Add content**, and add screens with **+**. The preview on the right works like the customer's phone: fill it in to try the Flow.
>
> **3. Save, then publish**
>
> Select **Save draft**. The draft stays open for editing: select **Cancel** to see its details, then **Publish**, and **Publish** again to confirm. Only published Flows can be sent to customers.
>
> Every component, **View as JSON**, **Paste JSON** and changing a published Flow are covered in [Build WhatsApp Flows in Ringg](/documentation/build-agents/agents/whatsapp-agents/flow-builder).
> [tab] In WhatsApp Manager
>
> **1. Create the Flow in WhatsApp Manager**
>
> In WhatsApp Manager, open **Account tools → Flows** and select **Create Flow**.
>
> * **Name**: something your team will recognise, such as *Site visit request*.
> * **Categories**: pick the closest match, for example *Lead generation* or *Appointment booking*.
> * **Template**: start from one of Meta's templates, or a blank Flow. Choose one **without an endpoint**.
>
> **2. Design the screens**
>
> Edit each screen in the builder: rename the title, add or remove fields, and change labels. The preview on the right shows exactly what the customer will see.
>
> Keep it short. Two or three screens with a handful of fields each gets the most submissions.
>
> **3. Save, then publish**
>
> Select **Save**, check the preview once more, then **Publish**. Only published Flows can be sent to customers.
>
> **4. Find it in Ringg**
>
> In Ringg, go to **Tools → WhatsApp Business** and select the **Flows** tab. It syncs with Meta every time you open it. Select the refresh icon to sync again at any time.
> [!TIP]
>
> Field labels matter. Ringg shows the customer's answers under these labels in the chat, in **Logs** and in your webhooks, and your assistant reads them too. *Preferred visit date* is clearer than *Date*.
> [!WARNING]
>
> Meta locks a Flow once it is published. To change it later, open it in the **Flows** tab and select **Duplicate & edit**, which also works for a Flow made in WhatsApp Manager. See [Change a published Flow](/documentation/build-agents/agents/whatsapp-agents/flow-builder#change-a-published-flow).
### Check what the Flow collects
The **Flows** tab lists every Flow on the account, with its **Status**, how many **Questions** it asks, where its **Live data** comes from, and when it was **Last synced**.

The Flows tab: two published Flows and two drafts that load live data
Select a Flow to open its details:
* **The preview** on the right: fill in the form and move between screens as the customer would. The numbers above it jump to a screen. When you submit, it shows the answers and the message your assistant reads.
* **Data source**, for a draft or a Flow that loads live data: where its screens get that data. See [Flows with live data](/documentation/build-agents/agents/whatsapp-agents/flows-live-data).
* **Technical details**: the Flow's Meta ID, its endpoint, and the data each screen takes.
**View on Meta** opens the Flow in WhatsApp Manager.

A published Flow's details, with its second screen in the preview
## Let your assistant send it
**1. Add the Flow to the assistant**
Open the WhatsApp assistant in the agent editor. In the left menu, select **WhatsApp Flows**, then **Add flow**, and pick your Flow.
The list shows published Flows only, so publish a draft from the **Flows** tab first. A Flow that can't be sent is greyed out with the reason, for example *Not read from Meta yet: sync this account's Flows*. If you just published one in WhatsApp Manager, select **Sync from Meta** at the bottom of the list.
**2. Write the message around it**
The Flow goes out as a chat message with a button. The live preview on the right updates as you type.
| Field | What it is | Example |
| - | - | - |
| **Message** | The text above the button. Required. | *Tap below to pick a slot for your site visit.* |
| **Button label** | The button that opens the form, up to 20 characters. Required. | *Book a visit* |
| **Header** and **Footer** | Optional lines above and below the message. | *Green Acres Villas* |
| **When to send it** | Optional. Plain words telling the assistant when this Flow is useful. | *When the customer wants to visit a project.* |
| **Opens on** | The screen the form opens on. Usually its first screen. | *Your details* |

Setting up Site visit request on an assistant, with the live message preview
**3. Prefill what you already know (optional)**
Under **Prefill**, give a starting value to any field the customer shouldn't have to type again. Leave a field empty and the customer fills it in.
**Prefill** appears only when the Flow's opening screen takes starting values, which a Flow written in WhatsApp Manager or as Flow JSON declares with `init-value`. Flows from Ringg's builder have none.
| Type | Where the value comes from | Example |
| - | - | - |
| **Static** | The same fixed value every time | `Bangalore` |
| **Variable** | A custom variable of the conversation | `name` |
| **Dynamic** | The assistant fills it from the chat. Describe what to put in. | *The city the customer mentioned* |
**4. Save**
Select **Save**. The Flow appears under **WhatsApp Flows** as a card with its preview. Use the pencil to edit it or the bin to remove it. Its tool name, such as `send_site_visit_request`, is what you tag in the prompt.
**5. Tell the assistant when to send it**
The assistant only sends a Flow when its prompt says so. In the prompt editor, type `@` and choose the Flow. It is inserted as `@||send_site_visit_request||`. Next to it, say when to send it and what to do with the answers:
```text theme={null}
When the customer wants to visit the site, send @||send_site_visit_request||
and say "I've sent you a quick form to pick a date."
When they submit it, thank them, repeat the date they picked, and tell them
our team will call to confirm.
```
**6. Test it**
Open **Test assistant**, scan the QR code with your phone and ask for a site visit. Open the form, fill it in and submit. The assistant should reply using your answers.
## Where the answers show up
When the customer submits, the answers arrive as their next message, labelled with the Flow's question labels.
> [tab] To your assistant
>
> The assistant reads the submission as a message from the customer and replies to it straight away:
>
> ```text theme={null}
> User submitted the WhatsApp Flow "Site visit request" (sent with send_site_visit_request):
> Full name=Priya Sharma, Preferred visit date=2026-10-02, Visitors=2
> ```
>
> It can use these answers in its reply, or pass them to an on-call tool, such as your CRM API or a calendar booking tool.
> [tab] In Logs
>
> In **Logs → WhatsApp**, open the chat and its **Transcript**. The Flow message appears with its button, and the customer's submission shows as **Response sent**. Select **View response** to see every answer, grouped by screen. See [Chat history](/documentation/monitor/logs#whatsapp-chats).
>
> 
>
> View response in Logs: the answers grouped by screen
> [tab] In your webhooks
>
> The chat's `transcript` in [chat events](/documentation/build-agents/customize-agent-behaviour/webhooks/whatsapp-chat-events) includes the submission as a `user` message, in the same text the assistant reads:
>
> ```json theme={null}
> { "user": "User submitted the WhatsApp Flow \"Site visit request\" (sent with send_site_visit_request): Full name=Priya Sharma, Preferred visit date=2026-10-02, Visitors=2" }
> ```
>
> To get the answers as separate fields, add them to the agent's **Advanced Analysis**.
## Open a Flow from a message template
A Flow sent by the assistant only reaches customers who messaged you in the last 24 hours. To start the conversation yourself, for example a booking reminder after a missed call, put the Flow on a **message template** as a button.
**1. Add a Flow button to a template**
Go to **Tools → WhatsApp Business**, select the **Message templates** tab, then **New template**. Under **Buttons**, select **+ Flow**.
**2. Pick the Flow**
* **Button text**: what the button says, up to 25 characters, such as *Book a visit*.
* **Flow**: one of your published Flows.
* **Opens on**: the screen it opens on. For a Flow with live data, choose **Loaded by the Flow's endpoint**.
A template can have up to three buttons, and one of them can be a Flow button.

A template's Flow button: its text, the Flow it opens and the screen it opens on
**3. Submit it for review**
Submit the template. Meta reviews it before it can be sent, as with any template. See [Message templates](/documentation/inventory/tools-integrations/connect-whatsapp#message-templates).
**4. Send it**
Send the approved template like any other: with the **Send WhatsApp Template** tool [during a call or chat](/documentation/build-agents/customize-agent-behaviour/tools/whatsapp-tools#on-call), or through the [outbound API](/documentation/deploy/whatsapp/start-a-conversation). When the customer submits the form, the answers come back into the chat with the assistant on that number, exactly as above.
## Flow status
Ringg only sends **Published** Flows.
| Status | Meaning | What to do |
| - | - | - |
| **Draft** | Saved but not published. | Publish it from its details in the **Flows** tab. For a Flow made in WhatsApp Manager, publish it there, then sync. |
| **Published** | Live. | Nothing: it can be sent. |
| **Throttled** | Meta is limiting it, usually because of errors or customer complaints. | Check its health in WhatsApp Manager and sync once it is Published again. |
| **Blocked** | Meta stopped it. | Check its health in WhatsApp Manager, or build a new Flow. |
| **Deprecated** | Retired in WhatsApp Manager. | Use another Flow. |
## Troubleshooting
| You see | Where | What to do |
| - | - | - |
| *No Flows on this account yet* | Flows tab | Select **Create Flow**. Or build and publish one in WhatsApp Manager under the same WhatsApp Business account, then select **Sync from Meta**. |
| *No published flows* | The assistant's Flow picker | Publish a Flow from the **Flows** tab, or publish it in WhatsApp Manager and select **Sync from Meta**. |
| *Draft: publish it from the Flows tab* | A template's Flow list, or an assistant's WhatsApp Flows | Open the Flow in the **Flows** tab and select **Publish**. |
| *Draft: publish it in WhatsApp Manager* | A template's Flow list, or an assistant's WhatsApp Flows | Publish the Flow in WhatsApp Manager, then sync. |
| *Not read from Meta yet: sync this account's Flows* | The Flow picker | Select **Sync from Meta**. |
| *Its questions are filled in when it's sent* | The Flow picker | This Flow builds its questions from data at send time, so Ringg can't send it. Use a Flow whose questions are written in the Flow itself. |
| *Uses Ringg's retired form endpoint* | Flows tab and picker | An older form Flow. Open it and use **Set up data source**, or build a new Flow. |
| *Not in this WhatsApp account* | The assistant's Flow list | The Flow was deleted, or the assistant's number moved to another account. Remove it and add another. |
| The assistant never sends the Flow | The chat | Tag the Flow in the prompt with `@` and say when to send it. |
| The customer's form says it can't open | The phone | The Flow isn't published, or it is **Blocked**. Check its status in the Flows tab. |
## Good to know
> [accordion] The 24-hour window applies
>
> An assistant sends a Flow as a normal chat message, so WhatsApp only delivers it within 24 hours of the customer's last message. Outside that window, send a template with a Flow button.
> [accordion] Flows belong to one WhatsApp Business account
>
> The Flows tab lists the Flows of the connected account. An assistant can use the Flows of the account its number belongs to.
> [accordion] Changing a Flow
>
> Published Flows can't be edited. Open the Flow in the **Flows** tab and select **Duplicate & edit**, which also works for a Flow made in WhatsApp Manager. Publish the copy, then in the assistant remove the old Flow and add the new one. Update the `@` tag in the prompt too. See [Change a published Flow](/documentation/build-agents/agents/whatsapp-agents/flow-builder#change-a-published-flow).
Related topics
# WhatsApp Flows with live data
Source: https://docs.ringg.ai/documentation/build-agents/agents/whatsapp-agents/flows-live-data
Fill a WhatsApp Flow's screens while the customer is using it, such as free appointment slots from Calendly, Google Calendar or Cal.com, through Ringg AI.
A static Flow only shows what you typed when you built it. A **dynamic Flow** asks for fresh information while the customer is inside it. In the dashboard, a Flow's **Data source** says where that information comes from, and the **Live data** column of the Flows tab shows it. For example, the customer picks a date and the next screen lists the times still free in your calendar that day.
Ringg does the technical part for you. It hosts the connection WhatsApp needs (the *endpoint*), handles WhatsApp's encryption, and fetches the data. You choose where the data comes from:
| Source | Use it for | Who sets it up |
| - | - | - |
| **Calendar** | Showing free appointment slots from Calendly, Google Calendar or Cal.com | Anyone, by following this page. No code needed. |
| **Server** | Anything from your own systems: branches near a pincode, stock, prices, order status | A developer on your team. See [Live data from your server](/documentation/build-agents/agents/whatsapp-agents/flows-your-server). |
> [!NOTE]
>
> Read [WhatsApp Flows](/documentation/build-agents/agents/whatsapp-agents/flows) first. Adding a Flow to an assistant, the prompt, and where answers show up all work the same way with live data.
## How a booking Flow works
```mermaid theme={null}
sequenceDiagram
participant C as Customer
participant W as WhatsApp
participant R as Ringg
participant Cal as Your calendar
C->>W: Taps "Book a visit"
W->>R: Which screen first?
R-->>W: Date screen, today to 30 days ahead
C->>W: Picks 2 Oct, taps "See times"
W->>R: Free times on 2 Oct?
R->>Cal: Free slots on 2 Oct
Cal-->>R: 10:00, 10:30, 14:00
R-->>W: Time screen with those slots
C->>W: Picks 10:00, adds name and email, taps "Book"
W->>R: The answers, into the chat
R->>Cal: Your assistant books 10:00 with its booking tool
R-->>C: "You're booked for 2 Oct at 10:00 AM"
```
The Flow itself doesn't book anything. It shows the free times and sends the customer's choice back to the chat. Your assistant then books the slot with the calendar's booking tool and confirms, just as it would on a call.
## Set up appointment booking
### Before you start
* A WhatsApp assistant with a **Ready** WhatsApp number attached. See [Create a WhatsApp agent](/documentation/build-agents/agents/whatsapp-agents/create-an-agent).
* Calendly, Google Calendar or Cal.com connected under **Tools** in Ringg.
### The booking design
Both ways below use this design: a **Pick a date** screen, then a **Pick a time** screen that lists the free times and asks for the customer's name and email.
> [accordion] Booking Flow design: copy all of it
>
> ```json theme={null}
> {
> "version": "6.3",
> "data_api_version": "3.0",
> "routing_model": { "PICK_DATE": ["PICK_SLOT"], "PICK_SLOT": [] },
> "screens": [
> {
> "id": "PICK_DATE",
> "title": "Pick a date",
> "data": {
> "min_date": { "type": "string", "__example__": "2026-10-01" },
> "max_date": { "type": "string", "__example__": "2026-10-31" }
> },
> "layout": {
> "type": "SingleColumnLayout",
> "children": [
> {
> "type": "DatePicker",
> "name": "date",
> "label": "Date",
> "required": true,
> "min-date": "${data.min_date}",
> "max-date": "${data.max_date}"
> },
> {
> "type": "Footer",
> "label": "See times",
> "on-click-action": { "name": "data_exchange", "payload": { "date": "${form.date}" } }
> }
> ]
> }
> },
> {
> "id": "PICK_SLOT",
> "title": "Pick a time",
> "terminal": true,
> "data": {
> "date": { "type": "string", "__example__": "2026-10-02" },
> "slots": {
> "type": "array",
> "items": {
> "type": "object",
> "properties": { "id": { "type": "string" }, "title": { "type": "string" } }
> },
> "__example__": [{ "id": "2026-10-02T10:00:00+05:30", "title": "10:00 AM" }]
> }
> },
> "layout": {
> "type": "SingleColumnLayout",
> "children": [
> {
> "type": "RadioButtonsGroup",
> "name": "slot",
> "label": "Available times",
> "data-source": "${data.slots}",
> "required": true
> },
> { "type": "TextInput", "name": "name", "label": "Your name", "required": true },
> { "type": "TextInput", "name": "email", "label": "Email", "input-type": "email", "required": true },
> {
> "type": "Footer",
> "label": "Book",
> "on-click-action": {
> "name": "complete",
> "payload": {
> "date": "${data.date}",
> "slot": "${form.slot}",
> "name": "${form.name}",
> "email": "${form.email}"
> }
> }
> }
> ]
> }
> }
> ]
> }
> ```
### The quick way: build it in Ringg
Plan about 5 minutes.
Pasting the booking design into Ringg, connecting Google Calendar as its data source, and publishing it
**1. Create the Flow**
Go to **Tools → WhatsApp Business**, select the **Flows** tab, then **Create Flow**. Name it, for example *Book a visit*, and choose the category **Appointment booking**.
**2. Paste the booking design**
Copy the [booking design](#the-booking-design) above, then select **Paste JSON** in the builder. The **Pick a date** and **Pick a time** screens appear. The parts that read live data stay as **JSON** rows, which is expected: Ringg sends them to Meta exactly as written.

The booking design pasted into the builder
**3. Save the draft**
Select **Save draft**, then **Cancel** to see the Flow's details.
**4. Connect your calendar**
Under **Data source**, select **Set up data source**. Keep **Calendar** and pick your connected calendar. **Date screen** and **Slots screen** are already set to **Pick a date** and **Pick a time**. Check the **Timezone**; the other settings are explained in the **Connect your calendar** step of [Or design it in WhatsApp Manager](#or-design-it-in-whatsapp-manager). Select **Save**.

A Google Calendar data source for the booking Flow
> [!TIP]
>
> **Data source** lists the calendar, the date screen and the slots screen.
**5. Publish it**
Select **Publish**, then **Publish** again to confirm. In the **Flows** tab, **Live data** shows **Calendar, via Ringg**.

The Flows tab after publishing: Book a visit reads its data from the calendar
Now [let your assistant send it and book](#let-your-assistant-send-it-and-book).
### Or design it in WhatsApp Manager
If you'd rather keep the Flow in WhatsApp Manager, for example to edit its layout there, build it from the same design. You need access to the same WhatsApp Business account in Meta's [WhatsApp Manager](https://business.facebook.com/wa/manage/home/). Plan about 15 minutes.
**1. Create the Flow in WhatsApp Manager**
In WhatsApp Manager, open **Account tools → Flows** and select **Create Flow**. Name it, for example *Book a visit*, choose the category **Appointment booking**, and start from a blank Flow.
**2. Paste the ready-made design**
The builder shows the Flow's code on the left and a preview on the right. Select everything in the code editor, delete it, and paste the [booking design](#the-booking-design). The preview should show a **Pick a date** screen.
Select **Save**. Don't publish yet: the Flow needs its data source connected first.
**3. Open the Flow in Ringg**
In Ringg, go to **Tools → WhatsApp Business** and select the **Flows** tab. It syncs as it opens. Select **Book a visit**. It shows as **Draft**, which is expected.
**4. Connect your calendar**
In the Flow's details, under **Data source**, select **Set up data source**. Keep **Calendar** and fill in:
| Setting | What to enter |
| - | - |
| **Calendar** | The calendar to read free times from. |
| **Event type link** (Calendly) or **Event type ID** (Cal.com), both optional | The meeting type to offer, for example your *30 minute site visit*. Leave it empty to use the account's first one. In Cal.com, the ID is the number at the end of the address when you edit the event type. For Calendly, it is the event type's API link, which starts with `https://api.calendly.com/event_types/`. |
| **Calendar ID** (optional) and **Slot length (minutes)** (Google Calendar) | Leave the calendar ID empty to use the main calendar. Slot length is how long each appointment is, in minutes. |
| **Date screen** | **Pick a date** |
| **Slots screen** | **Pick a time** |
| **Date field** | `date`. Leave it as it is. |
| **Timezone** | Where your appointments happen, such as `Asia/Kolkata` or `Asia/Dubai`. |
| **Days ahead** | How far ahead customers can book. 30 by default. |
| **Most slots shown** | The most times listed for one day. 20 by default. |
Select **Save**.
**5. Check the result**
After saving, **Data source** shows where things stand:
* Only the calendar, the date screen and the slots screen: everything is connected. Go to the next step.
* ***Meta kept this Flow's own endpoint***, with a URL beneath it. This happens when the Flow was already published. Copy the URL with the copy icon. In WhatsApp Manager, open the Flow, paste the URL as its **endpoint**, and publish it again.
**6. Finish in WhatsApp Manager**
Back in the Flow in WhatsApp Manager:
1. Open the Flow's endpoint settings. The endpoint URL should end in `/exchange`.
2. **Connect your Meta app**: choose the app you connected when you set up WhatsApp Business on Ringg.
3. Run the **health check**. It should pass.
4. Open the **Preview**, pick a date and check that times appear.
5. **Publish** the Flow.
**7. Sync in Ringg**
In the **Flows** tab, select the refresh icon. **Book a visit** now shows as **Published**, with **Calendar, via Ringg** under **Live data**.
## Let your assistant send it and book
**1. Add the Flow to the assistant**
In the agent editor, select **WhatsApp Flows**, then **Add flow**, and pick **Book a visit**. Write the **Message** and **Button label**, for example *Tap below to pick a time for your visit.* and *Book a visit*.
Keep **Opens on** set to **Loaded by the Flow's endpoint**, so every customer starts on today's dates. Select **Save**.
**2. Add the calendar's booking tool**
Select **Tools** in the left menu, then **On-call → Integration**, pick your calendar and add its booking tool:
| Calendar | Booking tool |
| - | - |
| Calendly | **Schedule Event** |
| Google Calendar | **Create Booking** |
| Cal.com | **Create Booking** |
Set the start time, name and email to **Dynamic**, so the assistant fills them in from the Flow's answers. Give fixed settings, such as the event type and timezone, a **Static** value.
**3. Tell the assistant what to do**
Tag both tools in the prompt with `@`:
```text theme={null}
When the customer wants to book a visit, send @||send_book_a_visit||.
When they submit it, book the time they picked with the calendar booking tool,
using "Available times" as the start time and their name and email.
Then confirm the date and time in plain words, like "2 Oct at 10:00 AM".
If the time is no longer free, say so and send @||send_book_a_visit|| again.
```
**4. Test it**
Open **Test assistant**, scan the QR code and ask to book a visit. Pick a date, check that the times match your calendar, choose one, submit, and look for the booking in your calendar.
The answers reach the assistant like this. The time the customer picked arrives in full, with its date and timezone, which is the format booking tools expect:
```text theme={null}
User submitted the WhatsApp Flow "Book a visit" (sent with send_book_a_visit):
date=2026-10-02, Available times=2026-10-02T10:00:00+05:30, Your name=Priya Sharma, Email=priya@example.com
```
## Change the design safely
You can change the words the customer sees without breaking anything:
* Screen titles, such as `"title": "Pick a date"`.
* Field and button labels, such as `"label": "See times"`.
* Extra questions on the **Pick a time** screen, such as a phone number or notes. Add each one to the `payload` of the **Book** button as well, or its answer won't come back.
Leave these exactly as they are, because Ringg relies on them:
| Keep | Why |
| - | - |
| `"data_api_version": "3.0"` and the `routing_model` | They tell WhatsApp this Flow loads live data. |
| The screen IDs `PICK_DATE` and `PICK_SLOT` | Ringg sends each answer to these screens. If you rename them, pick the new names under **Data source** again. |
| `"name": "date"` on the date picker, and `"date"` in the **See times** payload | That is the **Date field** Ringg reads. |
| `${data.min_date}`, `${data.max_date}`, `${data.slots}`, `${data.date}` and the `data` blocks | These are where Ringg's dates and free times appear. |
To change a published Flow, open it in the **Flows** tab and select **Duplicate & edit**. Edit the copy, set up its data source again, and publish it. See [Change a published Flow](/documentation/build-agents/agents/whatsapp-agents/flow-builder#change-a-published-flow).
## Troubleshooting
| You see | Where | What to do |
| - | - | - |
| *Connect Calendly, Google Calendar or Cal.com in Integrations first.* | Data source setup | Connect a calendar under **Tools**, then come back. |
| *Meta kept this Flow's own endpoint* | Data source, after saving | Paste the URL shown as the Flow's endpoint in WhatsApp Manager, publish, then sync. |
| Health check fails with *Unknown Flow* | WhatsApp Manager | The data source isn't saved on this Flow in Ringg yet. Save it, then run the check again. |
| Health check fails with a signature error (432) | WhatsApp Manager | The wrong Meta app is connected to the Flow. Connect the app you use with Ringg. |
| The Flow says it can't open, or the health check reports a key problem (421) | Phone or WhatsApp Manager | The number's encryption key isn't Ringg's. In Ringg, select **Edit source** under the Flow's **Data source** and save again. This puts Ringg's key back on every number of the account. |
| *No free slots on 2 Oct. Pick another date.* | The customer's phone | The calendar has no free times that day. Check the event type and the calendar's working hours. |
| *Couldn't load free slots. Please try again.* | The customer's phone | Ringg couldn't read the calendar. Reconnect it under **Tools** and check the event type. |
| *Booking isn't available right now.* | The customer's phone | The calendar was disconnected. Reconnect it, then pick it again under **Data source**. |
| Times are an hour or more off | The customer's phone | Set the right **Timezone** under **Data source**. |
## Good to know
> [accordion] Ringg sets an encryption key on your WhatsApp numbers
>
> WhatsApp encrypts everything a Flow sends, using a key set on each phone number. When you save a data source, Ringg puts its key on every number of the WhatsApp Business account, reusing the key it already has. If a developer connected the same numbers to their own Flow server with a different key, that setup stops working. Talk to them first, or have them use [a server data source](/documentation/build-agents/agents/whatsapp-agents/flows-your-server) instead.
> [accordion] Published Flows
>
> Changing a published Flow's endpoint moves it back to Draft in WhatsApp Manager, so Ringg never changes it for you. If a published Flow isn't already using Ringg's endpoint, saving its data source shows the URL to paste in WhatsApp Manager, and you publish the Flow again there. Setting up the data source before you publish avoids this.
> [accordion] A slot can be taken in the meantime
>
> Free times are read when the customer picks a date. If someone else books the same time before they submit, the booking tool returns an error and the assistant can offer another time, as the prompt above tells it to.
> [accordion] Remove a data source
>
> Open the Flow in the **Flows** tab, select **Edit source** under **Data source**, then **Remove**. The Flow then has nowhere to load its data from, so stop sending it or remove it from your assistants first.
Related topics
# Live data from your server
Source: https://docs.ringg.ai/documentation/build-agents/agents/whatsapp-agents/flows-your-server
Answer a WhatsApp Flow's screens from your own API. Ringg AI handles WhatsApp's encryption and sends your server plain, signed JSON for each screen.
Choose **Server** as a Flow's **Data source** when its screens need data from your own systems, such as branches near a pincode, stock, prices, order status or availability from a system Ringg doesn't connect to.
WhatsApp normally requires every Flow endpoint to handle its RSA and AES encryption, key management and health checks. With this option, Ringg does all of that. Your server gets one plain JSON `POST` per screen change, signed so you can trust it, and returns the next screen as JSON.
```mermaid theme={null}
sequenceDiagram
participant W as WhatsApp
participant R as Ringg
participant S as Your server
W->>R: Encrypted request
R->>R: Check Meta's signature and decrypt
R->>S: POST JSON, X-Ringg-Signature
S-->>R: {"screen": ..., "data": ...}
R-->>W: Encrypted next screen
```
> [!NOTE]
>
> This page is for developers. For the dashboard steps and how answers reach your assistant, see [WhatsApp Flows](/documentation/build-agents/agents/whatsapp-agents/flows) and [Flows with live data](/documentation/build-agents/agents/whatsapp-agents/flows-live-data).
## What you need to build
1. **A Flow** in WhatsApp Manager whose screens read data from the endpoint.
2. **One HTTPS endpoint** on your server that:
* accepts `POST` requests with a JSON body;
* checks the `X-Ringg-Signature` header against the raw body;
* answers within **7 seconds** with HTTP `200` and the next screen as JSON.
That is all. You don't handle WhatsApp's encryption keys, the health check (`ping`) or WhatsApp's error notifications. Ringg answers those itself.
## Example: find a showroom by pincode
The customer enters a pincode, your server looks up nearby showrooms, and the customer picks one. The same pattern works for any lookup.
### 1. The Flow
Create a Flow in WhatsApp Manager (**Account tools → Flows → Create Flow**), paste this into the code editor and **Save**. Don't publish it yet.
```json theme={null}
{
"version": "6.3",
"data_api_version": "3.0",
"routing_model": { "PINCODE": ["PICK_SHOWROOM"], "PICK_SHOWROOM": [] },
"screens": [
{
"id": "PINCODE",
"title": "Find a showroom",
"layout": {
"type": "SingleColumnLayout",
"children": [
{ "type": "TextInput", "name": "pincode", "label": "Your pincode", "input-type": "number", "required": true },
{
"type": "Footer",
"label": "Find showrooms",
"on-click-action": { "name": "data_exchange", "payload": { "pincode": "${form.pincode}" } }
}
]
}
},
{
"id": "PICK_SHOWROOM",
"title": "Pick a showroom",
"terminal": true,
"data": {
"pincode": { "type": "string", "__example__": "560001" },
"showrooms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"title": { "type": "string" },
"description": { "type": "string" }
}
},
"__example__": [{ "id": "blr-mg-road", "title": "MG Road", "description": "2.1 km away" }]
}
},
"layout": {
"type": "SingleColumnLayout",
"children": [
{
"type": "RadioButtonsGroup",
"name": "showroom",
"label": "Showrooms near you",
"data-source": "${data.showrooms}",
"required": true
},
{
"type": "Footer",
"label": "Confirm",
"on-click-action": {
"name": "complete",
"payload": { "pincode": "${data.pincode}", "showroom": "${form.showroom}" }
}
}
]
}
}
]
}
```
What makes it a live-data Flow:
* `"data_api_version": "3.0"` and a `routing_model` listing which screen can lead to which.
* A `data_exchange` action. Its `payload` is exactly what your server receives as `data`.
* A `data` block on each screen that shows your server's values, with an `__example__` for Meta's preview. Your response must match these types.
> [!TIP]
>
> You can also create this Flow in Ringg: in the **Flows** tab, select **Create Flow**, then **Paste JSON** with the design above, and **Save draft**. After connecting your server below, publish it from its details instead of WhatsApp Manager.
### 2. The endpoint
```python Python (FastAPI) theme={null}
import hashlib
import hmac
import json
import os
from fastapi import FastAPI, HTTPException, Request
app = FastAPI()
SIGNING_SECRET = os.environ["RINGG_FLOW_SIGNING_SECRET"]
SHOWROOMS = {
"560001": [{"id": "blr-mg-road", "title": "MG Road", "description": "2.1 km away"}],
}
@app.post("/whatsapp-flow")
async def whatsapp_flow(request: Request):
raw_body = await request.body()
expected = "sha256=" + hmac.new(SIGNING_SECRET.encode(), raw_body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(expected, request.headers.get("X-Ringg-Signature", "")):
raise HTTPException(status_code=401)
body = json.loads(raw_body)
data = body.get("data") or {}
if body["action"] == "data_exchange" and body.get("screen") == "PINCODE":
pincode = str(data.get("pincode", "")).strip()
showrooms = SHOWROOMS.get(pincode)
if not showrooms:
# Keeps the customer on this screen and shows the message.
return {"screen": "PINCODE", "data": {"error_message": f"No showroom near {pincode} yet."}}
return {"screen": "PICK_SHOWROOM", "data": {"pincode": pincode, "showrooms": showrooms}}
# INIT (the Flow opened) and BACK: start on the first screen.
return {"screen": "PINCODE", "data": {}}
```
```javascript Node.js (Express) theme={null}
const crypto = require("crypto");
const express = require("express");
const app = express();
const SIGNING_SECRET = process.env.RINGG_FLOW_SIGNING_SECRET;
const SHOWROOMS = {
"560001": [{ id: "blr-mg-road", title: "MG Road", description: "2.1 km away" }],
};
// express.raw keeps the exact bytes Ringg signed.
app.post("/whatsapp-flow", express.raw({ type: "application/json" }), (req, res) => {
const expected = "sha256=" + crypto.createHmac("sha256", SIGNING_SECRET).update(req.body).digest("hex");
const received = req.get("X-Ringg-Signature") || "";
if (received.length !== expected.length || !crypto.timingSafeEqual(Buffer.from(received), Buffer.from(expected))) {
return res.sendStatus(401);
}
const { action, screen, data = {} } = JSON.parse(req.body);
if (action === "data_exchange" && screen === "PINCODE") {
const pincode = String(data.pincode || "").trim();
const showrooms = SHOWROOMS[pincode];
if (!showrooms) {
return res.json({ screen: "PINCODE", data: { error_message: `No showroom near ${pincode} yet.` } });
}
return res.json({ screen: "PICK_SHOWROOM", data: { pincode, showrooms } });
}
// INIT (the Flow opened) and BACK: start on the first screen.
res.json({ screen: "PINCODE", data: {} });
});
app.listen(3000);
```
### 3. Connect it in Ringg
Choosing Server as a Flow's data source, saving it, and copying the signing secret
**1. Open the Flow**
Go to **Tools → WhatsApp Business**, select the **Flows** tab and open the Flow.
**2. Enter your server's URL**
Under **Data source**, select **Set up data source**, choose **Server** and enter your endpoint's URL in **Server URL**, for example `https://api.example.com/whatsapp-flow`. It must start with `https://`. Select **Save**.

Choosing Server as the data source and entering its URL
**3. Copy the signing secret**
Ringg shows a **signing secret** once. Copy it with the copy icon and store it on your server, for example as `RINGG_FLOW_SIGNING_SECRET`. It can't be shown again. If it is lost, select **Edit source**, tick **Issue a new signing secret** and save.

The signing secret, shown once after saving
**4. Check the endpoint**
If Ringg says ***Meta kept this Flow's own endpoint***, the Flow was already published. Copy the URL shown, paste it as the Flow's endpoint in WhatsApp Manager, and publish the Flow again. That URL is Ringg's, not your server's: WhatsApp calls Ringg, and Ringg calls you.
**5. Finish in WhatsApp Manager**
Open the Flow's endpoint settings, connect the Meta app you use with Ringg, and run the **health check**. Ringg answers it, so it passes even before your server is live. Then **Preview** the Flow, which calls your server for real, and **Publish** it.
**6. Add it to an assistant**
Sync the **Flows** tab, then add the Flow to a WhatsApp assistant as described in [WhatsApp Flows](/documentation/build-agents/agents/whatsapp-agents/flows#let-your-assistant-send-it). Set **Opens on** to **Loaded by the Flow's endpoint**, so your server is asked for the first screen.
## Request reference
Ringg sends one `POST` for every step that needs your server.
| `action` | When | `screen` | `data` |
| - | - | - | - |
| `INIT` | The customer opened a Flow sent with **Opens on: Loaded by the Flow's endpoint** | `null` | `{}` |
| `data_exchange` | The customer pressed a button whose action is `data_exchange` | The screen they were on | That action's `payload` |
| `BACK` | The customer went back to a screen that has `"refresh_on_back": true` | The screen they went back to | `{}` |
```json theme={null}
{
"action": "data_exchange",
"screen": "PINCODE",
"data": { "pincode": "560001" },
"flow_token": "rf2.3c6e2a1d-5b7f-4e8a-9c21-0f4d7b8e6a53.b7e4c2a0-1d3f-4e5a-8b9c-0d1e2f3a4b5c.9f2c41ab",
"flow": {
"id": "8d1f3a6e-2b4c-4d5e-9f60-7a8b9c0d1e2f",
"meta_flow_id": "1234567890123456",
"name": "Find a showroom"
},
"context": {
"chat_id": "3c6e2a1d-5b7f-4e8a-9c21-0f4d7b8e6a53",
"tool_id": "b7e4c2a0-1d3f-4e5a-8b9c-0d1e2f3a4b5c"
}
}
```
| Field | Description |
| - | - |
| `action` | `INIT`, `data_exchange` or `BACK`, as above. |
| `screen` | The screen ID the request comes from. `null` for `INIT`. |
| `data` | What the Flow sent. For `data_exchange`, the action's `payload` with the customer's input filled in. |
| `flow_token` | WhatsApp's token for this Flow session. Pass it back if you [finish the Flow yourself](#finish-the-flow-from-your-server). Treat it as opaque. |
| `flow.id` | Ringg's ID for the Flow. |
| `flow.meta_flow_id` | Meta's ID for the Flow, as shown in WhatsApp Manager. |
| `flow.name` | The Flow's name. |
| `context.chat_id` | The Ringg chat the Flow was sent in. It is the same `chat_id` as in [chat events](/documentation/build-agents/customize-agent-behaviour/webhooks/whatsapp-chat-events) and **Logs → WhatsApp**, so you can tie a Flow session to a conversation. |
| `context.tool_id` | The ID of the assistant's Flow tool that sent it, which stays the same while the Flow is on the assistant. `template` when the customer opened it from a template's Flow button. |
`context` is `{}` when the Flow wasn't sent by Ringg, for example in WhatsApp Manager's preview. Don't require it.
**Headers**
| Header | Value |
| - | - |
| `Content-Type` | `application/json` |
| `X-Ringg-Signature` | `sha256=` followed by the hex HMAC-SHA256 of the **raw request body**, keyed with your signing secret |
> [!WARNING]
>
> Verify the signature against the exact bytes you received, before parsing them. Parsing the JSON and serialising it again changes the spacing, so the signature won't match.
## Response reference
Return HTTP `200` with a JSON body naming the next screen and the data it reads:
```json theme={null}
{ "screen": "PICK_SHOWROOM", "data": { "pincode": "560001", "showrooms": [{ "id": "blr-mg-road", "title": "MG Road" }] } }
```
* `screen` must be a screen of the Flow that the current screen can lead to in `routing_model`, or the current screen itself.
* `data` must match the types in that screen's `data` block.
Ringg passes your response to WhatsApp unchanged, so a response that breaks these rules shows the customer WhatsApp's generic error.
### Keep the customer on the screen with a message
Return the screen the request came from, with `error_message` in `data`. WhatsApp shows the message at the bottom of the screen and keeps what the customer entered.
```json theme={null}
{ "screen": "PINCODE", "data": { "error_message": "No showroom near 560999 yet." } }
```
### Finish the Flow from your server
To close the Flow yourself, for example after you created an order, return WhatsApp's `SUCCESS` screen with the request's `flow_token` and anything you want to send back. You don't need a `SUCCESS` screen in the Flow JSON.
```json theme={null}
{
"screen": "SUCCESS",
"data": {
"extension_message_response": {
"params": { "flow_token": "", "order_id": "A-1042", "showroom": "MG Road" }
}
}
}
```
The `params` reach the assistant as the customer's submission, just like a Flow finished with a `complete` action: *order\_id=A-1042, showroom=MG Road*. Use readable keys, since they are the labels the assistant sees.
## Rules and limits
| Rule | Detail |
| - | - |
| **HTTPS only** | The URL must start with `https://`. |
| **Public address** | Addresses on private or internal networks are refused, both when you save and before every request. |
| **7 seconds** | WhatsApp gives Ringg 10 seconds, so your server gets 7. There is one attempt and no retry. |
| **No redirects** | Answer at the URL you saved. Redirects aren't followed. |
| **HTTP 200** | Any other status, a timeout, or a body without `screen` or `data` keeps the customer on the screen with *This form can't load right now. Please try again shortly.* |
| **One secret per Flow** | Each Flow with live data has its own signing secret. |
| **New secret takes effect at once** | After **Issue a new signing secret**, requests are signed with the new secret straight away. Accept both secrets on your server while you switch. |
## Test your endpoint
Send your server a signed request from a terminal before connecting it in Ringg:
```bash theme={null}
SECRET="your signing secret"
BODY='{"action": "data_exchange", "screen": "PINCODE", "data": {"pincode": "560001"}, "flow_token": "test", "flow": {"id": "test", "meta_flow_id": "1", "name": "Find a showroom"}, "context": {}}'
SIGNATURE=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$SECRET" | sed 's/^.* //')
curl -s https://api.example.com/whatsapp-flow \
-H "Content-Type: application/json" \
-H "X-Ringg-Signature: sha256=$SIGNATURE" \
-d "$BODY"
```
You should get the `PICK_SHOWROOM` screen back. Then use **Preview** in WhatsApp Manager to run the Flow end to end.
## Troubleshooting
| Symptom | Cause |
| - | - |
| **Server URL** is marked invalid, or saving fails | The URL isn't `https://`, or it points to a private or internal address. |
| Every request fails your signature check | You're hashing re-serialised JSON instead of the raw body, or using an old secret. |
| *This form can't load right now* on the phone | Your server took longer than 7 seconds, returned a status other than `200`, redirected, or returned a body without `screen` or `data`. |
| WhatsApp's generic error on the phone | Your response names a screen the current one can't lead to, or its `data` doesn't match the screen's `data` block. |
| Your server gets no `INIT` | The Flow was sent with **Opens on** set to a screen, so it opens without asking you. Set it to **Loaded by the Flow's endpoint**. |
| The health check fails | Ringg answers the health check itself, so the problem is on the Meta side. See [troubleshooting for live data](/documentation/build-agents/agents/whatsapp-agents/flows-live-data#troubleshooting). |
> [!WARNING]
>
> Ringg sets its own encryption key on every number of the WhatsApp Business account when you save a data source. If you also run a WhatsApp Flow endpoint of your own on those numbers with a different key, it stops working. Move those Flows to a **Server** data source so Ringg handles the encryption for all of them.
Related topics
# WhatsApp agents
Source: https://docs.ringg.ai/documentation/build-agents/agents/whatsapp-agents/overview
Learn what a Ringg AI WhatsApp agent is, how a chat runs, how it differs from a voice agent, and the order to connect Meta, add a number, build and test it.
A WhatsApp agent is one of the four [agent types](/documentation/build-agents/agents/agent-types#agent-types-by-channel), next to outbound, inbound and webcall. It has the same prompt, knowledge base, custom variables and tools as a voice agent, but it replies in WhatsApp messages on a WhatsApp Business number you connect through Meta. When a customer calls that number from WhatsApp, the same agent answers by voice; it can't place WhatsApp calls.
Use it when customers already reach you on WhatsApp, or to follow up a call in writing. You don't need a WhatsApp agent to *send* a WhatsApp message from a voice agent: once WhatsApp Business is connected, any agent can send a template or text through the [WhatsApp tools](/documentation/build-agents/customize-agent-behaviour/tools/whatsapp-tools#on-call).
## The steps in order
| Step | Page | What you end up with |
| - | - | - |
| 1 | [Connect WhatsApp](/documentation/inventory/tools-integrations/connect-whatsapp) (Inventory) | A WhatsApp Business account linked to your workspace through Meta's sign-in |
| 2 | [Add and register a number](/documentation/inventory/tools-integrations/connect-whatsapp#add-a-number) | A number marked **Ready**, your own or one bought through Ringg |
| 3 | [Message templates](/documentation/inventory/tools-integrations/connect-whatsapp#message-templates) (optional) | Meta-approved messages for anything you send outside the 24-hour window |
| 4 | [Create a WhatsApp agent](/documentation/build-agents/agents/whatsapp-agents/create-an-agent) | The agent attached to the number, with a chat prompt and session timeouts |
| 5 | [WhatsApp Flows](/documentation/build-agents/agents/whatsapp-agents/flows) (optional) | Forms the agent sends inside the chat, like bookings, lead forms and surveys, with answers back in the chat |
| 6 | [On-call](/documentation/build-agents/customize-agent-behaviour/tools/whatsapp-tools#on-call) and [post-call](/documentation/build-agents/customize-agent-behaviour/tools/whatsapp-tools#post-call) tools | Messages sent from any agent, during a call or after it |
| 7 | [Start a conversation by API](/documentation/deploy/whatsapp/start-a-conversation) or [WhatsApp Relay](/documentation/deploy/whatsapp/relay-overview) (Deploy) | Outbound first messages from your backend; or the agent on a number that stays in your own Meta account |
| 8 | [WhatsApp chats in Logs](/documentation/monitor/logs#whatsapp-chats) (Monitor) and [chat events](/documentation/build-agents/customize-agent-behaviour/webhooks/whatsapp-chat-events#whatsapp-chat-events) (Webhooks) | Every chat readable and exportable in Logs, and a webhook when a chat closes |

Step 2 ends here: the connected account's Phone numbers tab with a Ready number
## How a chat runs
1. A customer messages your WhatsApp Business number, or your backend [messages them first](/documentation/deploy/whatsapp/start-a-conversation) with a template.
2. The agent attached to that number opens a chat. Pre-call tools run, then the agent replies from its prompt, knowledge base and on-call tools.
3. The chat closes when the agent calls **End Chat** or the customer goes quiet for the agent's idle timeout ([session timeouts](/documentation/build-agents/agents/whatsapp-agents/create-an-agent#when-a-chat-opens-and-closes)). Post-call tools and analysis then run, and each stage can notify your [webhook](/documentation/build-agents/customize-agent-behaviour/webhooks/whatsapp-chat-events#whatsapp-chat-events).
## WhatsApp compared with voice
| | Voice agent | WhatsApp agent |
| - | - | - |
| Number | Telephony number ([Numbers](/documentation/inventory/phone-numbers/overview)) | Registered WhatsApp Business number |
| Structure | [Single-prompt or multi-prompt](/documentation/build-agents/agents/agent-types#agent-types-by-build-style) | Single-prompt only |
| Webhook events | `call_*`, `recording_completed`, analysis events | `chat_completed`, analysis events |
| Conversations | **Logs → Phone** | **Logs → WhatsApp** |
| [Analytics](/documentation/monitor/analytics) | Yes | No, Analytics covers calls only |
## Good to know
> [accordion] Why a template is needed after 24 hours
>
> WhatsApp delivers free-form text only within 24 hours of the customer's last message. Outside that window only an approved template goes through. That is why **Send WhatsApp Text** is an on-call tool only, while **Send WhatsApp Template** also works post-call.
> [accordion] How replies are formatted
>
> WhatsApp has its own markup: `*bold*`, `_italic_`, `~strikethrough~`, and lists that start with `- `. It has no headings, tables or Markdown links. The WhatsApp agent template already tells the model this; keep those rules if you rewrite the prompt.
## Next steps
> [card] [Connect WhatsApp Business](/documentation/inventory/tools-integrations/connect-whatsapp)
>
> Link your account through Meta, register a number and create templates.
> [card] [Create a WhatsApp agent](/documentation/build-agents/agents/whatsapp-agents/create-an-agent)
>
> Attach the registered number and write a chat prompt.
Related topics
# Advanced Analysis
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/advanced-analysis
Define the typed variables Ringg AI extracts after each conversation, mark a Boolean goal, test on a past call, and read results in Logs, Analytics and webhooks.
Use Advanced Analysis on an [agent](/documentation/build-agents/agents/agent-types) for facts you want to report on, filter by or send to your systems, such as `payment_promised` (a Boolean) or `promised_date` (a Date). Status, duration and transcript are already in [Logs](/documentation/monitor/logs) without it.
In the dashboard: Agents (listed under **Assistants** in the sidebar) → open an agent → **Advanced Settings → Advanced Analysis**. On a [multi-prompt agent](/documentation/build-agents/agents/multi-prompt-agents/overview), open **Global Settings → Advanced Analysis** (see [Global Settings](/documentation/build-agents/agents/multi-prompt-agents/global-settings#global-settings)).
## Before you start
> [card] [An agent](/documentation/build-agents/agents/create-an-agent)
>
> The agent whose conversations you want analysed.
> [card] [A completed call](/documentation/build-agents/test-and-improve/test-an-agent)
>
> Optional: needed to **Test** your variables. Place a test call first.
## Add variables
Adding a Boolean goal variable and testing it on a past call
**1. Add a variable**
Open **Advanced Analysis** and click **Add a new variable**. The **Add variables** dialog opens.
* **Variable name** (required): lower-case; spaces become `_` as you type.
* **Type**: one of the types below. The default is **Boolean**.
* **Enum options** (required for **Enum**): type an option and press Enter or **Add**. Options are stored lower-case with `_` for spaces.
* **Description** (required): "What the analysis should extract from the call." Write it as an instruction, for example "True if the customer agreed to pay by a specific date."
* **Default value**: "Fallback used when nothing is extracted."
* **Use as goal**: Boolean variables only (see [The goal](#the-goal)).
Analysis variables are separate from the agent's [custom variables](/documentation/build-agents/customize-agent-behaviour/custom-variables), which you fill before a call.

The Add variables dialog
**2. Add several at once (optional)**
Click **Add new variable** inside the dialog for another blank form. The button at the bottom changes to **Add 2**, **Add 3** and so on.
**3. Save**
Click **Add**. You see "Variable added" and the variable appears in the table with its **Variable**, **Type** and **Default value**. The goal variable carries a **Goal** chip.
> [!TIP]
>
> The table lists your variable, and **Test** is now enabled.

Variables after saving
To change a variable, click its row (the dialog is titled **Configure variable**) or use the row menu: **Edit** or **Delete**. Each change saves immediately.
A change applies to conversations analysed after you save it. Calls already analysed keep their results and can't be re-analysed. On a multi-prompt agent, changes go into the draft and apply once you [publish](/documentation/build-agents/test-and-improve/drafts-and-versions#publish-changes-on-a-multi-prompt-agent).
### Default values
The default is typed text, converted when the meaning is clear:
| You type | Stored as |
| - | - |
| `null` (any case) | A real `null` |
| `true` / `false` on a Boolean | A Boolean |
| A whole number on an Integer, any number on a Number | A number |
| Anything else | Text |
### Paste variables as JSON
While adding, paste a JSON array (or one object) into a **Variable name** field, or drop a JSON file onto the dialog, to fill one form per item:
```json theme={null}
[
{ "variableName": "payment_promised", "type": "boolean", "description": "True if the customer agreed to pay by a specific date.", "defaultValue": false, "useAsGoal": true },
{ "variableName": "promised_date", "type": "date", "description": "The date the customer promised to pay, if any." },
{ "variableName": "objection", "type": "enum", "values": ["already_paid", "no_money", "dispute", "none"], "description": "The customer's main reason for not paying." }
]
```
Names are converted to `snake_case`. A type Ringg does not recognise becomes **String**, with the warning "Some types weren't recognized". Review the forms, then click **Add**.
## Variable types
Each variable has one type. The name below is the value used in JSON; the label is what the **Type** menu shows.
**array** `Array`
A list of mixed values.
**array\_of\_numbers** `Array of numbers`
Several amounts or counts, such as EMIs mentioned.
**array\_of\_strings** `Array of strings`
Several items, such as products asked about.
**boolean** `Boolean`
Yes/no facts.
**date** `Date`
A day, such as a promised payment date.
**datetime** `DateTime`
A day and time, such as a callback slot.
**enum** `Enum`
One of a fixed set of options you list.
**integer** `Integer`
Whole numbers, such as number of family members.
**number** `Number`
Any number, such as an amount in rupees.
**string** `String`
Free text, such as a short summary of the complaint.
### Names you cannot use
* `revenue_collected` is reserved by the platform ("This name is reserved by the platform.").
* A name already in the table ("A variable with this name already exists.").
* The same name twice in one dialog ("Another variable above uses this name.").
## The goal
The goal is one Boolean variable that says whether the conversation succeeded, for example `payment_promised`. [Analytics](/documentation/monitor/analytics#where-the-goal-comes-from) uses it to calculate the agent's success rate.
* Only a **Boolean** can be the goal. On other types the switch reads "Only boolean variables can be used as goals."
* An agent has one goal at a time. Turning on **Use as goal** for another variable asks **Replace current goal?** first.
* Changing the goal variable's type asks **Change variable type?** and removes it as the goal.
## Context and tool calls
Below the table:
* **Context** ("Include additional context for better results"): one free-text note for the whole analysis, such as what counts as a valid promise to pay. Click **Save**; you see "Context saved".
* **Log tool calls** ("Include tool call logs to enhance advanced analysis."): a switch. On, the analysis also reads the [tool](/documentation/build-agents/customize-agent-behaviour/tools/overview) calls made during the conversation, such as an API lookup's result.
## Test on a past call
**1. Open the test**
Click **Test**. It is disabled until you have saved at least one variable.
**2. Pick a call**
In **Test advanced analysis**, paste a **Call ID** (copy it from the call panel in [Logs](/documentation/monitor/logs#the-call-panel)), or pick from **Or select from recent call log**. The list shows this agent's completed calls; sort it by date or duration. Picking a call from the list runs the test straight away.
**3. Run it**
If you pasted a Call ID, click **Run analysis**. You see the **Analysis result** next to the **Call transcript** (copy and download buttons). The link icon opens the call in [Logs](/documentation/monitor/logs). Click **Test another** to try a different one.
The test is a preview: it doesn't change the call's stored results or send a webhook.
> [!TIP]
>
> **Analysis result** shows a value for each variable that matches what was said in the transcript.

A test result next to the transcript
## Where results appear
| Where | What you see |
| - | - |
| [Logs](/documentation/monitor/logs) | The call's **Advanced analysis** tab, once the call has results. While it runs: "Advanced analysis is currently under process!" |
| [Logs filters](/documentation/monitor/logs#custom-variables-and-advanced-analysis) | **Advanced analysis** filters calls by a variable's value. Select exactly one agent first. |
| [Analytics](/documentation/monitor/analytics) | **Goal achieved** and **Cost per goal**, once you pick an agent or campaign. Boolean and Enum variables appear as [**Cohort analysis**](/documentation/monitor/analytics#cohort-analysis) charts. With one agent selected, a slice opens the matching calls in Logs. |
| [Event Subscription](/documentation/build-agents/customize-agent-behaviour/event-subscription) | The **Advanced Analysis Complete** event (`client_analysis_completed`) delivers the results to your server. See the [payload](/documentation/build-agents/customize-agent-behaviour/webhooks/call-events#client-analysis-event). |
| [Tools](/documentation/build-agents/customize-agent-behaviour/tools/post-call-tools#post-call-tools) | Post-call tools and condition groups can read **Advanced Analysis** fields (`client_analysis`). |
| [Alerts](/documentation/monitor/alerts#alert-on-an-advanced-analysis-field) | An alert rule can fire on an Advanced Analysis field. |
## Agents with the older prompt editor
Agents that saved an analysis prompt or keys before the variable table existed keep the older editor. It has a **Prompt** box ("Enter your prompt for Advanced Analysis"), a list of keys (**Define required keys for the prompt**) with a type and default value, a tool-call-logs switch, **Save** and **Test Analysis**. Its types are String, Number, Integer, Boolean, Array, Date and DateTime. It has no goal. Everyone else gets the variable table described above.
## Do this with the API
Advanced Analysis variables are set up in the dashboard only; the public API has no operation for them. Read results per call from [Get Call Details](/api-reference/monitoring/call-history/get-call-details) (the `client_analysis` field, returned when you send `send_analysis=true`) or from the `client_analysis_completed` webhook ([Event Subscription](/documentation/build-agents/customize-agent-behaviour/event-subscription)). You need an [API key](/documentation/manage-account/api-key) and the call's ID.
```bash cURL theme={null}
curl "https://prod-api.ringg.ai/ca/api/v0/calling/call-details?id=550e8400-e29b-41d4-a716-446655440000&send_analysis=true" \
-H "X-API-KEY: $RINGG_API_KEY"
```
```javascript JavaScript theme={null}
const params = new URLSearchParams({
id: "550e8400-e29b-41d4-a716-446655440000",
send_analysis: "true",
});
const response = await fetch(
`https://prod-api.ringg.ai/ca/api/v0/calling/call-details?${params}`,
{ headers: { "X-API-KEY": process.env.RINGG_API_KEY } },
);
console.log(await response.json());
```
```python Python theme={null}
import os
import requests
response = requests.get(
"https://prod-api.ringg.ai/ca/api/v0/calling/call-details",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
params={"id": "550e8400-e29b-41d4-a716-446655440000", "send_analysis": "true"},
)
print(response.json())
```
## Troubleshooting
> [accordion] "Failed to run analysis"
>
> The dialog shows the server's reason, or "Failed to run analysis" with "Check the call ID and make sure you have saved at least one variable before testing." Check the call ID belongs to this agent and the call completed, then click **Retry**.
> [accordion] Does it run on WhatsApp chats?
>
> Yes. Every agent, WhatsApp included, offers the **Advanced Analysis Complete** event and shows results in Logs. Only the **Test** dialog is limited to completed calls.
> [accordion] A variable is always empty or wrong
>
> Rewrite its **Description** as a precise instruction, add a **Default value**, and use **Context** for definitions. Then run **Test** on a call where you know the answer.
## Next steps
> [card] [Receive the results on your server](/documentation/build-agents/customize-agent-behaviour/event-subscription)
>
> The **Advanced Analysis Complete** event carries every field.
> [card] [Test the agent](/documentation/build-agents/test-and-improve/test-an-agent)
>
> Place a call, then check its **Advanced analysis** tab in Logs.
> [card] [See the results in Analytics](/documentation/monitor/analytics)
>
> Goal achieved, cost per goal and cohort charts per variable.
# Agent prompt
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/agent-prompt
Write a Ringg AI agent's first message and prompt sections, insert variables, tools and knowledge with @, add If Condition blocks, and save or edit by API.
The prompt is the set of instructions an agent follows on every call or chat, and the first message is the line it opens with. This page covers single-prompt agents; in a [multi-prompt agent](/documentation/build-agents/agents/multi-prompt-agents/overview), each Agent node has its own prompt with the same editor.
In the dashboard: **Sidebar → Assistants →** open an agent **→ Prompt**.
These three pages set what the agent says and hears:
| Page | What you set |
| - | - |
| Agent prompt (this page) | The first message and the prompt sections, with variables, tools and knowledge bases inserted by `@` |
| [Voice and language](/documentation/build-agents/customize-agent-behaviour/voice-and-language) | The languages it understands and speaks, the voice, and its speed |
| [Custom variables](/documentation/build-agents/customize-agent-behaviour/custom-variables) | Values that change per call, filled by API, from a campaign CSV or from tools |
After these, [Inventory](/documentation/inventory/knowledge-base) gives it your data and your APIs.
## Before you start
> [card] [An agent](/documentation/build-agents/agents/create-an-agent)
>
> The template you created it from supplies the sections you edit here.
## What the Prompt section holds
The section is one column of editors, top to bottom:
1. **First message**: what the agent says when the call connects. On a WhatsApp agent, it is the message sent at the start of the conversation.
2. One editor per **prompt section**, as supplied by the template you [created the agent](/documentation/build-agents/agents/create-an-agent) from.

The Prompt section of a single-prompt agent
Templates usually provide these sections. The editor renames three of them for display:
| Section title stored on the agent | Shown in the editor as | What to put there |
| - | - | - |
| `introduction and objective` | **Objective** | Who the agent is, who it speaks for and the goal of the call |
| `task` | **Conversation Script** | The steps of the conversation, in order |
| `faq guidelines` | **FAQs** | Questions callers ask, with the answers |
| Any other title, such as Response Guidelines | Its own title | Tone, length, what never to say |
The editor has no control to add, rename or remove a section. Collapse a section with the arrow next to its title.
### The Interruptible switch
The footer of **First message** has an **Interruptible** switch, on by default.
| Setting | What happens |
| - | - |
| On | The caller can talk over the first message and the agent stops to listen |
| Off | The caller's audio is ignored until the first message finishes |
The switch saves as soon as you flip it; it does not wait for **Save**. Turn it off when the first message carries something the caller must hear in full, such as a recording disclosure.
## Insert variables, tools and knowledge with @
Type `@` in any editor (the footer reminds you: "Type @ to add variables"). A menu opens, grouped by kind. Keep typing to filter it, use the arrow keys to move, and press Enter to insert. Each item becomes a coloured chip in the text.

The @ menu
| Menu group | What it inserts | Text form |
| - | - | - |
| **Custom Variables** | A per-call value, such as the caller's name ([Variables](/documentation/build-agents/customize-agent-behaviour/custom-variables)) | `@{{callee_name}}` |
| **Pre-Call API Settings** | The output of a [pre-call tool](/documentation/build-agents/customize-agent-behaviour/tools/overview#the-three-phases), or one of its response keys | `@((get_customer))`, `@((get_customer.plan))` |
| **On-Call API Settings** | A tool the agent can call during the conversation, or one of its response keys ([use on-call tools](/documentation/build-agents/customize-agent-behaviour/tools/overview#use-on-call-tools-in-the-prompt)) | `@\|\|book_slot\|\|`, `@\|\|book_slot.slot_time\|\|` |
| **Knowledge Bases** | A knowledge base attached to the agent | `@` + the knowledge base name |
| **Chat Components** | A saved, enabled [chat component](/documentation/deploy/web-and-apps/web-widget/components) the widget shows at that point of the conversation | `@[[family_member_details_form]]` |
| **WhatsApp Templates** | A template the WhatsApp agent can send mid-chat ([send a template](/documentation/build-agents/agents/whatsapp-agents/create-an-agent#send-a-template-during-a-chat)) | `@\|\|\|\|` |
| **Logic** | **If Condition**: a conditional block ([below](#if-condition-blocks)) | A Jinja (A templating language; its if blocks include text only when a condition holds.) `{% if %}` block |
Tools with response keys open a **Response Keys** submenu (arrow right). Only enabled pre-call and on-call tools from the **Tools** section are listed; post-call tools are never offered. Only knowledge bases attached to the agent are listed; attach them under **Knowledge Base** in the sidebar.
In a multi-prompt agent the menu also has **Extracted Variables** (`@[{name}]`), filled by routers and Agent nodes ([node types](/documentation/build-agents/agents/multi-prompt-agents/node-types-and-connections#node-types)), and **Action API Settings**.
### Create a variable from the menu
Type `@{{` followed by a new name, for example `@{{due_date`. When nothing matches, the menu offers **Create** `"{{due_date}}"`. Choosing it adds `due_date` to the agent's variables and inserts the chip. See [Variables](/documentation/build-agents/customize-agent-behaviour/custom-variables) for naming.
### If Condition blocks
**Logic → If Condition** inserts a block whose text applies only when a condition holds, for example a payment-plan paragraph only when `@{{plan}}` equals `gold`. Each condition row is a variable, an operator and a value; **Add condition** adds a row, and the **and** / **or** toggle between rows sets how they combine.
| Group | Operators | Value |
| - | - | - |
| Comparison | **equals**, **not equals**, **greater than**, **greater or equal**, **less than**, **less or equal**, **between** | One value; **between** takes a **from** and a **to** |
| String | **contains**, **does not contain**, **starts with**, **ends with** | One value |
| Array | **is one of**, **is not one of**, **array contains**, **array not contains** | **is one of** / **is not one of** take a comma-separated list (`a, b, c`); the other two take one value |
| Existence | **is empty**, **is not empty** | None |
| Size | **size equals**, **size greater than**, **size less than** | A number |
Below the block, **+ else if** adds another branch with its own condition and **+ else** adds the fallback; once an else branch exists, no more branches can be added. The bin icon deletes the whole block.
**Switch to code** shows a branch's condition as Jinja so you can edit it directly, and **Copy Jinja code** copies the whole block. **Switch to builder** goes back only when the code is `variable operator value` rows joined with `and` / `or`; anything more complex stays in code mode ("Cannot switch to builder").
### Unknown tokens
You can type or paste tokens as text. When `@name`, `@{{name}}`, `@((name))`, `@||name||` or `@[[name]]` matches something the agent has, it turns into a chip. When it matches nothing (a misspelling, a deleted variable, a removed tool), it is shown in red with a wavy underline. A chip that points at something since deleted is flagged too. Fix every red token before you save: the agent has nothing to fill it with.
### Other editor tools
Select text to open a toolbar: bold, italic, underline, strikethrough, numbered and bulleted lists, tables, **Find & replace all** (across every section), and **Translate**, which converts the selection into the script of the agent's secondary language. Translate needs a secondary language ([Voice and language](/documentation/build-agents/customize-agent-behaviour/voice-and-language)) and a selection of 10,000 characters or fewer. Pasted Markdown is converted to formatting.
## Save or discard
Prompt edits are held until you save. While you have unsaved edits, **Test assistant** in the top bar is replaced by **Discard** and **Save**. The video edits the first message and a section, inserts a variable with @, and saves.
Editing and saving a prompt in the dashboard
* **Save**, or Cmd+S (macOS) / Ctrl+S (Windows): "Changes saved successfully". The change is live for new calls on the version you are viewing ([Save changes on a single-prompt agent](/documentation/build-agents/test-and-improve/drafts-and-versions#save-changes-on-a-single-prompt-agent)). "Partial Save" means the prompt and the first message save separately and one of them failed: read the message, fix it and save again.
* **Discard**: asks "Discard your unsaved prompt changes? This action cannot be undone."
* Leaving the page, switching sidebar sections, or switching between **Outbound** and **Inbound** on an outbound-inbound agent asks before throwing unsaved edits away.

A section after saving, with the new variable chip
> [!TIP]
>
> **Test assistant** is back in the top bar. [Place a test call](/documentation/build-agents/test-and-improve/test-an-agent) to hear the new prompt.
## Write prompts for voice
A voice agent's text is heard, not read, so write for the ear.
* **Keep turns short.** Ask for one sentence or two per turn, and one question at a time. Put it in **Response Guidelines**: "Reply in at most two short sentences. Ask one question at a time."
* **Write the first message to be interrupted.** Greet, say who you are, and ask a question within about ten seconds: "Hello `@{{callee_name}}`, this is Asha from Acme Finance. Is this a good time to talk?"
* **Script the steps.** In **Conversation Script**, number the steps and say what to do on each answer, including "no", "call me later" and "wrong person".
* **Say how to end.** Tell the agent when the call is done and what to say last: "Once the payment date is confirmed, thank them and end the call." If you add the end-call system tool under [Tools](/documentation/build-agents/customize-agent-behaviour/tools/overview), mention it with `@` at that point. Set a hard limit with **Maximum Call Duration** in [Call settings](/documentation/build-agents/customize-agent-behaviour/call-settings).
* **Spell out how to say numbers.** Tell the agent how to speak amounts, dates and numbers: "Say amounts in words, in rupees: ₹4,500 is 'four thousand five hundred rupees'. Say dates as '15 October', never '15/10'. Read phone numbers digit by digit, in groups."
* **Write in the language the agent speaks** ([Voice and language](/documentation/build-agents/customize-agent-behaviour/voice-and-language)). For a Hindi agent, write examples in Devanagari or say which script to use. Name the languages in the prompt if callers may switch.
* **Put facts in FAQs or a knowledge base**, not in the script. Long reference text belongs in a [knowledge base](/documentation/inventory/knowledge-base).
* **Test after every change.** Place a [test call](/documentation/build-agents/test-and-improve/test-an-agent) with realistic variable values.
## Edit the prompt by API
[Edit Agent Settings](/api-reference/agents/edit-assistant) (`PATCH /agent/v1`) changes one thing per request, named by `operation`. It matches **Save** in the Prompt section.
| Operation | Changes | Field |
| - | - | - |
| `edit_prompt` | The prompt sections | `agent_prompt`: a string, or `{"prompt_sections": [{"section_title", "section_content"}]}` |
| `edit_intro_message` | The first message | `intro_message` |
| `edit_noise_settings` | The **Interruptible** switch | `mute_during_intro` (`false` is Interruptible on) and `mute_while_bot_speaking`; send both |
| `edit_custom_vars` | The agent's [variables](/documentation/build-agents/customize-agent-behaviour/custom-variables#variables-by-api) | `custom_variables` |
| `attach_kb` / `remove_kb` | [Knowledge bases](/documentation/build-agents/customize-agent-behaviour/attach-a-knowledge-base) | `kb_id` |
Send your [API key](/documentation/manage-account/api-key) in `X-API-KEY`. Find the `agent_id` in the editor ([Find the agent ID](/documentation/build-agents/agents/agent-types#find-the-agent-id)).
`edit_prompt` replaces the whole prompt: send every section you want to keep, because a section left out is deleted. Edits go to the agent's active version; add `version_id` to edit another one.
```bash cURL theme={null}
curl -X PATCH "https://prod-api.ringg.ai/ca/api/v0/agent/v1" \
-H "X-API-KEY: $RINGG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "edit_prompt",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"agent_prompt": {
"prompt_sections": [
{ "section_title": "introduction and objective", "section_content": "You are Asha, a polite collections assistant for Acme Finance. Remind @{{callee_name}} of their EMI of @{{emi_amount}} due on @{{due_date}}." },
{ "section_title": "task", "section_content": "1. Confirm you are speaking to @{{callee_name}}. 2. State the amount and due date. 3. Ask when they will pay. 4. Thank them and end the call." },
{ "section_title": "Response Guidelines", "section_content": "Reply in at most two short sentences. Never threaten." }
]
}
}'
```
```javascript JavaScript theme={null}
const response = await fetch("https://prod-api.ringg.ai/ca/api/v0/agent/v1", {
method: "PATCH",
headers: {
"X-API-KEY": process.env.RINGG_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
operation: "edit_prompt",
agent_id: "00000000-0000-4000-8000-0000000000a1",
agent_prompt: {
prompt_sections: [
{ section_title: "introduction and objective", section_content: "You are Asha, a polite collections assistant for Acme Finance. Remind @{{callee_name}} of their EMI of @{{emi_amount}} due on @{{due_date}}." },
{ section_title: "task", section_content: "1. Confirm you are speaking to @{{callee_name}}. 2. State the amount and due date. 3. Ask when they will pay. 4. Thank them and end the call." },
{ section_title: "Response Guidelines", section_content: "Reply in at most two short sentences. Never threaten." },
],
},
}),
});
console.log(await response.json());
```
```python Python theme={null}
import os
import requests
response = requests.patch(
"https://prod-api.ringg.ai/ca/api/v0/agent/v1",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
json={
"operation": "edit_prompt",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"agent_prompt": {
"prompt_sections": [
{"section_title": "introduction and objective", "section_content": "You are Asha, a polite collections assistant for Acme Finance. Remind @{{callee_name}} of their EMI of @{{emi_amount}} due on @{{due_date}}."},
{"section_title": "task", "section_content": "1. Confirm you are speaking to @{{callee_name}}. 2. State the amount and due date. 3. Ask when they will pay. 4. Thank them and end the call."},
{"section_title": "Response Guidelines", "section_content": "Reply in at most two short sentences. Never threaten."},
]
},
},
)
print(response.json())
```
> [!TIP]
>
> A successful response is `{"message": "Agent updated successfully!", "agent_id": "…"}`.
When you create an agent by API, the first message and sections come from `intro_message`, `introduction_and_objective`, `task`, `faq` and `response_guidelines` in [Create Agent](/api-reference/agents/create-agent).
## Next steps
> [card] [Pick a voice and language](/documentation/build-agents/customize-agent-behaviour/voice-and-language)
>
> Choose languages, a voice and its speed.
> [card] [Add variables](/documentation/build-agents/customize-agent-behaviour/custom-variables)
>
> Personalise every call with values you pass in.
# Attach a knowledge base
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/attach-a-knowledge-base
Attach or detach knowledge bases on a Ringg AI agent, mention them in the prompt with @, add query phrases, and test that the agent answers from your data.
An agent can have several knowledge bases, and one knowledge base can serve many agents.
In the dashboard: Agents (listed under **Assistants** in the sidebar) → open an agent → **Knowledge Base** in the editor sidebar.
## Before you start
> [card] [A knowledge base](/documentation/inventory/knowledge-base#create-a-knowledge-base)
>
> Created in the same workspace, with status **Ready**.
> [card] [An agent](/documentation/build-agents/agents/create-an-agent)
>
> The agent that will answer from it.
## Attach or detach a knowledge base
Attaching knowledge bases and mentioning one in the prompt
**1. Pick knowledge bases**
In the agent editor, click **Knowledge Base**, then **Select Knowledge Base**, and tick one or more. Each tick attaches it at once: "Knowledge base attached successfully". The button then shows the count.

Two knowledge bases attached
**2. Detach**
Click the trash icon on an attached knowledge base, or untick it in the list: "Knowledge base detached successfully".
> [!TIP]
>
> Attached knowledge bases are listed below the button and appear under **Knowledge Bases** when you type `@` in the [prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt).
**Add Knowledge Base** at the bottom of the list opens the Knowledge base page to create a new one ([Create a knowledge base](/documentation/inventory/knowledge-base#create-a-knowledge-base)). If the button reads **No knowledge bases found**, the workspace has none yet; create one there first.
You can also attach knowledge bases while you [create the agent](/documentation/build-agents/agents/create-an-agent).
Attachments belong to the version you are editing. On an agent with several [versions](/documentation/build-agents/test-and-improve/drafts-and-versions), attach the knowledge base to each version that needs it.
### Multi-prompt agents
A [multi-prompt agent](/documentation/build-agents/agents/multi-prompt-agents/overview) has knowledge bases at two levels:
| Where | Applies to |
| - | - |
| **Global settings → Knowledge base** ([Global Settings](/documentation/build-agents/agents/multi-prompt-agents/global-settings#global-settings)) | The whole agent |
| An **Agent** node's **Knowledge base** section ([node types](/documentation/build-agents/agents/multi-prompt-agents/node-types-and-connections#node-types)) | That node only |
Changes go into the draft, so [publish the agent](/documentation/build-agents/test-and-improve/drafts-and-versions#publish-changes-on-a-multi-prompt-agent) for callers to get them. Once a node has a knowledge base or an on-call tool, it also shows **Query Phrases**: "Phrases the assistant will say before querying a knowledge base or running an on-call tool on this node." Add short fillers such as "Let me check that for you." so the caller does not hear silence during the lookup.
## Mention it in the prompt
Type `@` in the prompt and pick the knowledge base from the **Knowledge Bases** group. Only attached knowledge bases are listed. A mention isn't required: the agent can search every attached knowledge base either way. The mention uses the knowledge base's name and tells the agent which knowledge base covers which questions. For a knowledge base named `loan_faqs`:
```text theme={null}
For questions about interest rates, eligibility or documents, answer from @loan_faqs.
If the answer is not there, say you will check and have an advisor call back.
```

Attached knowledge bases in the @ menu
See [Write the prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt) for how mentions work. If you detach a knowledge base that the prompt still mentions, the mention turns red; remove it or attach the knowledge base again.
## How the agent uses it in a call
During the conversation, the agent searches an attached knowledge base when it decides a question needs it, not on every turn, and answers from what it finds. For CSV columns marked **Exact match** ([column configuration](/documentation/inventory/knowledge-base#structured-data-and-column-configuration)), the lookup matches the exact value, such as an order ID the caller reads out.
## Do this with the API
Call [Edit Assistant](/api-reference/agents/edit-assistant) (`PATCH /agent/v1`) with `operation` set to `attach_kb` or `remove_kb` and the `kb_id`, once per knowledge base. Send your [API key](/documentation/manage-account/api-key) in `X-API-KEY`.
```bash cURL theme={null}
curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/agent/v1" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"operation": "attach_kb",
"agent_id": "b1972188-038e-4605-916c-3926e9d7bde4",
"kb_id": "550e8400-e29b-41d4-a716-446655440000"
}'
```
Get the `kb_id` from [Get All Knowledge Bases](/api-reference/inventory/knowledge-bases/get-all-knowledge-bases), and the `agent_id` from the editor ([Find an agent's ID](/documentation/build-agents/agents/agent-types#find-the-agent-id)). To create knowledge bases by API, see [Create Knowledge Base](/api-reference/inventory/knowledge-bases/create-knowledge-base).
## Test it
**1. Test the knowledge base alone**
Ask your questions in the knowledge base's test chat first ([Test it in chat](/documentation/inventory/knowledge-base#test-it-in-chat)). If the answer is wrong there, fix the data before you test the agent.
**2. Test the agent**
Place a test call or chat ([Test an agent](/documentation/build-agents/test-and-improve/test-an-agent)) and ask the same questions, phrased the way a customer would.
**3. Read the transcript**
Open the call in [Logs](/documentation/monitor/logs#the-call-panel) and read the **Transcript** tab to see exactly what the agent answered.
> [!TIP]
>
> The agent's answers match the knowledge base's test chat.
## Next steps
> [card] [Add tools](/documentation/build-agents/customize-agent-behaviour/tools/overview)
>
> Connect the agent to your APIs before, during and after a call.
# Call settings
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/call-settings
Set an agent's call duration, inactivity timeouts, calling window, voicemail handling, interruption sensitivity, rate limits and chat session timeouts in Ringg AI.
In the dashboard: Agents (listed under **Assistants** in the sidebar) → open an agent → **Call Settings → Call** or **Chat**. On a [multi-prompt agent](/documentation/build-agents/agents/multi-prompt-agents/overview) it is **Global Settings → Call** or **Chat**; on a [WhatsApp agent](/documentation/build-agents/agents/whatsapp-agents/create-an-agent), **Calls → Settings** and **Chat → Settings**.
Switches and menus save as soon as you change them. **Noise Suppression Level** and **Exit Timing** save when you leave the field or press Enter. **Custom message**, **Exit Message** and the rate-limit fields have their own **Save** button.
These pages cover the settings around the prompt and what comes out of each conversation:
| Page | What you set |
| - | - |
| Call settings (this page) | Duration, inactivity timeouts, calling window, voicemail, interruption sensitivity, rate limits and chat session timeouts |
| [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) | The typed variables Ringg extracts after each conversation, and the goal |
| [Event Subscription](/documentation/build-agents/customize-agent-behaviour/event-subscription) | The call, chat and analysis events Ringg sends to your server |
| [Webhooks](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors), [Webhook payloads](/documentation/build-agents/customize-agent-behaviour/webhooks/call-events) | The endpoint side: subscribe by API, retries and errors, and the JSON for each call and chat event |
## Before you start
> [card] [An agent](/documentation/build-agents/agents/create-an-agent)
>
> The agent whose call or chat behaviour you are setting.
> [card] [A workspace call limit](/documentation/manage-account/call-limits)
>
> Optional: needed only for **Maximum calls to one person**.
## Which sections an agent shows
On a single-prompt agent, the **Call** page depends on the [agent type](/documentation/build-agents/agents/agent-types#agent-types-by-channel). "Outbound" includes Outbound-Inbound agents.
| Section | Outbound | Inbound | Webcall, WhatsApp |
| - | - | - | - |
| Call limits | Yes | No | No |
| Call duration | Yes | Yes | Yes |
| Calling window | Yes | No | No |
| Voicemail | Yes | Yes | No |
| Rate Limiting | No | Yes | No |
| Interruption sensitivity | Yes | Yes | Yes |
| Other settings | Yes | Yes | Yes |
Every multi-prompt agent shows the outbound set (no Rate Limiting), in a compact list without section headings or helper text.
Changing call duration, inactivity, calling window, voicemail and interruption sensitivity
## Call limits
**Maximum calls to one person** caps how often this agent may call the same person: **No limit**, or 1 call up to the workspace limit (50 at most). It can only tighten the [workspace limit](/documentation/manage-account/call-limits#set-the-workspace-limit) and uses the same period. With a workspace limit of 10 calls per 24 hours, setting 3 shows "Call one person up to 3 times in any 24-hour period."
With no workspace limit, the field is disabled and the link under it reads **Set limit**. **No limit** means the agent follows the workspace limit. See [Per-agent limits](/documentation/manage-account/call-limits#per-agent-limits).
The limit applies to the agent's outbound calls however they start: campaigns, API calls and workflows. Dashboard test calls are never held by it.
## Call duration
| Control | Values |
| - | - |
| **Maximum Call Duration** | 2 to 20 minutes. The call ends at this length. |
| **Inactivity Warning** | **Off (no warning)**, or 3, 5, 7, 10, 15, 20, 25 or 30 seconds of silence before the agent checks in |
| **Inactivity Duration** | 10 to 60 seconds, in steps of 5. The call ends after this much silence. |
| **Timezone** | The zone the [calling window](#calling-window) is read in. Default IST (UTC+5:30). |
| **Noise Filtering** | On or off. **Noise Suppression Level** (0 to 100, default 80) shows when it is on. |
The menu offers only warnings shorter than the inactivity duration. If you lower the duration to or below the current warning, the warning drops to the highest value still allowed: a 15-second warning with a 15-second duration becomes 10 seconds.
**Timezone** offers IST, EST, CST, MST, PST, GMT, CET (Paris), CET (Berlin), GST, SGT, JST, AEST, NZST and UTC.

Call duration settings
## Calling window
The hours an outbound agent may dial, in its **Timezone**. **Call start time** takes whole hours from 00:00 to 23:00; **Call end time** takes a later hour, up to 23:59. 00:00 to 23:59 means no restriction.
An overnight window such as 22:00 to 06:00 can be set only through the [API](#do-this-with-the-api); the dashboard shows it and keeps it.
An individual [API call](/api-reference/calling/individual-calls/initiate-individual-call) can send its own `call_time`: each key it sends replaces the agent's value, and keys it leaves out keep the agent's. A [campaign](/documentation/deploy/campaigns/create-a-campaign) always uses its own window instead of the agent's; a campaign started by API without `call_time` calls from 09:00 to 21:00 IST.
## Voicemail
| Control | Values |
| - | - |
| **Voicemail detection** | On or off |
| **Leave voicemail message** | Off: "Assistant will end the call." On: the agent leaves a summary of the call, or your custom message. |
| **Custom message** | Shown when Leave voicemail message is on. Played word for word instead of the summary; leave it empty to go back to the summary. |
| **Retry call** | On or off: retry the call when voicemail is detected, while the call has retries left |
New single-prompt agents start with **Voicemail detection** and **Retry call** on; new multi-prompt agents start with both off. The agent detects voicemail during the call only while the caller's audio is silenced: during the first message when **Interruptible** is off, or while the agent speaks when **Silence callee when assistant is speaking** is on ([Other settings](#other-settings)).

Voicemail settings
## Rate limiting (inbound)
Rate limiting stops one caller from calling an [inbound agent](/documentation/inventory/phone-numbers/inbound-agent-number) over and over. Switching on **Enable rate limiting** starts with **Terminate Call** at 3 calls per hour; change the fields, then click **Save**.
| Control | Values |
| - | - |
| **Action** | **Terminate Call** or **Transfer Call** |
| **Max calls per hour** | 1 or more; default 3 |
| **Transfer to** | A phone number; required for Transfer Call |
| **Whitelisted numbers** | Numbers that are never rate-limited |
## Interruption sensitivity
How easily the caller's voice cuts the agent off mid-sentence: this is the agent's voice activity detection (VAD (Voice activity detection: how the agent decides the caller has started or stopped speaking.)) threshold. Pick **Strict** for noisy lines where background sounds keep stopping the agent, and **Sensitive** if callers feel the agent talks over them.
| Option | Behaviour |
| - | - |
| **Sensitive** | The agent yields as soon as the caller starts speaking. |
| **Default** | Short sounds like "hello" or "hmm" don't cut the agent off. |
| **Strict** | The caller has to keep speaking before the agent stops. |
New agents start on **Default**.
## Other settings
| Control | What it does |
| - | - |
| **Silence callee when assistant is speaking** | Ignores the caller's voice whenever the agent speaks. |
| **Silence callee during assistant's introduction** | Multi-prompt agents only: the same during the first message. On a single-prompt agent this is the **Interruptible** switch next to **First message** ([The Interruptible switch](/documentation/build-agents/customize-agent-behaviour/agent-prompt#the-interruptible-switch)). |
| **Enable background audio** | Plays office ambience under the agent's voice. **Loop Audio** (on by default) repeats it for the whole call; **Volume** goes from 0 to 100 in steps of 10, default 100. |
| **Enable graceful exit warning** | Plays a message shortly before **Maximum Call Duration** is reached, then ends the call. It doesn't play before an inactivity hang-up. **Exit Timing (seconds)** is how long before the end, at least 1, default 12. **Exit Message** takes one line per [agent language](/documentation/build-agents/customize-agent-behaviour/voice-and-language#languages), such as "We're almost out of time, so I'll wrap up now." |
## Chat settings
The **Chat** page shows **Chat Duration** on every agent except WhatsApp agents. WhatsApp agents show **WhatsApp session** instead: see [Set the session timeouts](/documentation/build-agents/agents/whatsapp-agents/create-an-agent#set-the-session-timeouts).
**Chat Duration** applies to every text chat in an [embedded widget](/documentation/deploy/web-and-apps/web-widget/overview) and every [Live chat test](/documentation/build-agents/test-and-improve/test-an-agent#test-options). Voice web calls use the call settings above.
| Control | Values |
| - | - |
| **Maximum call length (seconds)** | 120 to 1,200, in steps of 120 |
| **Idle Timeout Warning (seconds)** | 10 to 60 in steps of 5, then 90 and 120 |
| **Idle Timeout End (seconds)** | 10 to 60 in steps of 5, then 90 and 120 |
## Do this with the API
[Create Agent](/api-reference/agents/create-agent) (`POST /public/agent`) takes these settings in `call_config`. Any key you leave out takes its default. You need an [API key](/documentation/manage-account/api-key).
**call\_config** `object`
**properties**
**call\_time** `object`
Calling window: `call_start_time` and `call_end_time` as `HH:MM` (the window may cross midnight), and `timezone` as an IANA zone such as `Asia/Kolkata`.
**max\_call\_length** `integer` (default: 240)
Seconds, 10 to 3,600.
**idle\_timeout\_warning** `integer` (default: 5)
Seconds of silence before the agent checks in. `0` turns it off.
**idle\_timeout\_end** `integer` (default: 10)
Seconds of silence before the call ends. Must be greater than `idle_timeout_warning`.
**noise\_filter\_config** `object`
`filter_noise` (default `false`) and `noise_suppression_level` (0 to 100, default 80).
**voicemail** `object`
`detect` (default `true`), `action` (`end`, `summarise` or `static_message`; default `end`), `retry` (default `true`) and `static_message`, the text spoken when `action` is `static_message`.
**background\_audio\_config** `object`
`audio_id` (`office_ambience`), `volume` (0.0 to 1.0), `mixing` and `loop`. Omit it to keep background audio off.
**mute\_during\_intro** `boolean`
`true` means the caller cannot interrupt the first message.
```bash cURL theme={null}
curl -X POST https://prod-api.ringg.ai/ca/api/v0/public/agent \
-H "X-API-KEY: $RINGG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_name": "Payment reminder",
"introduction_and_objective": "You are Riya, calling customers of Acme Finance about an upcoming EMI.",
"response_guidelines": "Be polite and brief. Confirm the due date before ending.",
"task": "Remind the customer of their EMI due date and ask when they will pay.",
"primary_language": "en-IN",
"voice_id": "857e1b18-0adb-4b3e-b150-ce7896a16bf1",
"intro_message": "Hello, this is Riya from Acme Finance. Am I speaking with the account holder?",
"agent_type": "outbound",
"call_config": {
"max_call_length": 300,
"idle_timeout_warning": 7,
"idle_timeout_end": 15,
"call_time": { "call_start_time": "10:00", "call_end_time": "19:00", "timezone": "Asia/Kolkata" },
"voicemail": { "detect": true, "action": "end", "retry": true }
}
}'
```
To override settings for one call, send `call_config` (`max_call_length`, `idle_timeout_warning`, `idle_timeout_end`, `call_time`, `call_retry_config`) with [Initiate Individual Call](/api-reference/calling/individual-calls/initiate-individual-call). On an existing agent, [Edit Assistant](/api-reference/agents/edit-assistant) changes these:
| Operation | Sets |
| - | - |
| `edit_chat_settings` | `chat_settings.whatsapp_session` (`idle_timeout_minutes` 5 to 1,440, `max_duration_minutes` 60 to 10,080) |
| `edit_vad_settings` | **Interruption sensitivity**: `vad_settings.interruption_sensitivity` is `default`, `sensitive` or `strict` |
| `edit_noise_settings` | The two silence switches: `mute_during_intro` and `mute_while_bot_speaking`, both required |
Other call settings on an existing agent are changed in the dashboard.
## Verify it worked
[Test the agent](/documentation/build-agents/test-and-improve/test-an-agent) with a phone call and stay silent. The agent should check in at the **Inactivity Warning** time and hang up at the **Inactivity Duration**. Open the call in [Logs](/documentation/monitor/logs#the-call-panel) to check its duration and how it ended.
## Troubleshooting
> [accordion] The agent keeps getting cut off mid-sentence
>
> Background noise or short sounds on the caller's side are being heard as speech. Set [Interruption sensitivity](#interruption-sensitivity) to **Strict**; if callers still can't be heard over the agent, switch on **Silence callee when assistant is speaking** under [Other settings](#other-settings). To stop interruptions during the greeting only, turn off the first message's **Interruptible** switch ([Prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt#the-interruptible-switch)).
> [accordion] Calls are not going out at night
>
> Check the calling window and the **Timezone** it is read in. Outside the window an outbound call is not dialled immediately. A campaign's calls follow the [campaign's calling window](/documentation/deploy/campaigns/create-a-campaign), not the agent's.
## Next steps
> [card] [Extract data with Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis)
>
> Define the variables Ringg fills in from every conversation.
> [card] [Run a campaign](/documentation/deploy/campaigns/create-a-campaign)
>
> Call a list with its own calling hours.
# Custom variables
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/custom-variables
Add custom variables to a Ringg AI agent, mention them in the prompt with @, and fill them per call by API, per contact from a campaign CSV, or from tools.
A custom variable is a named value that changes from one call to the next, such as the caller's name, an amount due or an appointment date. You write the variable once in the agent's [prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt), and each call fills in its own value.
In the dashboard: **Sidebar → Assistants →** open an agent **→ Custom Variables**. On a [multi-prompt agent](/documentation/build-agents/agents/multi-prompt-agents/overview), open **Global Settings → Custom variables**.
Where values come from, and where they go:
```mermaid theme={null}
flowchart LR
T[Test assistant fields] --> V[Custom variables]
C[Campaign CSV columns] --> V
A[API: custom_args_values] --> V
P[Pre-call tool input] -.reads.-> V
V --> M[Prompt and first message]
V --> I[If Condition blocks]
V --> TP[Tool parameters]
```
## Before you start
> [card] [An agent](/documentation/build-agents/agents/create-an-agent)
>
> Variables belong to it and to each of its [versions](/documentation/build-agents/test-and-improve/drafts-and-versions).
> [card] [An API key](/documentation/manage-account/api-key)
>
> Optional: only to fill or edit variables by API.
## The two permanent variables
Two variables are permanent: `callee_name` and `mobile_number`. The **Custom Variables** panel shows no remove button for them, and a new multi-prompt agent starts with both.
**callee\_name** `string`
The name of the person on the call. On an API call it defaults to the request's `name`. Inbound calls and web calls don't fill it unless you send it.
**mobile\_number** `string`
Their phone number. On an API call it defaults to the request's `mobile_number`; on an inbound call it is the caller's number. Web calls don't fill it.
## Add a variable
Adding a variable and using it in the prompt
**1. Type a name**
In the editor sidebar, click **Custom Variables**. The panel lists the agent's variables in the order they were added. Type into **Enter variable name**: as you type, letters become lowercase and spaces become `_`, so "Due Date" becomes `due_date`.
**2. Add it**
Click **Add** or press Enter. There is no separate Save; the list is saved at once. "Variable already exists" means the name is taken; because input is lowercased, `Due_Date` and `due_date` are the same name.
> [!TIP]
>
> You see "Variables updated successfully". The new variable is at the bottom of the list, and it appears under **Custom Variables** when you type `@` in the [prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt).

The Custom Variables panel after adding loan\_account
Remove a variable with the bin icon on its row. Sort the list alphabetically with the sort icon (tooltip **Sort alphabetically**); click again to return to the order they were added (tooltip **Newest first**).
### Naming rules
Use short, descriptive snake\_case names such as `emi_amount` or `due_date`. A campaign CSV maps columns by exact name, so the same names in your CSV save mapping work ([calling list](/documentation/deploy/campaigns/calling-list)).
You can also create a variable while writing the prompt: type `@{{` and a new name, then choose **Create "…"** from the menu ([Write the prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt#create-a-variable-from-the-menu)). That path keeps the name exactly as typed, so type it in lowercase yourself.
## Use variables in the prompt
Type `@` in the first message or any prompt section and pick the variable under **Custom Variables**. It appears as a chip; its text form is `@{{name}}`.
```text theme={null}
First message:
Hello @{{callee_name}}, this is Asha from Acme Finance. Is this a good time to talk?
Conversation Script:
1. Confirm you are speaking to @{{callee_name}}.
2. Tell them their EMI of @{{emi_amount}} is due on @{{due_date}}.
3. Ask when they will pay.
```

Picking the new variable from the @ menu
A token that names a variable the agent does not have is shown in red with a wavy underline: add the variable or fix the spelling. Variables also work in [tool parameters](/documentation/build-agents/customize-agent-behaviour/tools/api-tools#parameter-sources) and in [If Condition blocks](/documentation/build-agents/customize-agent-behaviour/agent-prompt#if-condition-blocks).
## Fill variables for each call
The same variables are filled in different ways, depending on how the call starts. Values are sent as strings. Write them the way the agent should say them (`15 October`, not `2025-10-15`), or tell the agent in the prompt how to read them.
### From a test call
**Test assistant** shows one optional field per variable (for example **Due date**), except `mobile_number`, which comes from **Callee number** on a phone call. See [Test an agent](/documentation/build-agents/test-and-improve/test-an-agent#test-options).
### From a campaign CSV
Each variable is mapped to a CSV column under **Map variables to CSV columns** ([map variables to columns](/documentation/deploy/campaigns/calling-list#map-variables-to-columns)), and every variable must be mapped before you can continue. Each row then fills the variables for one call:
```text theme={null}
callee_name,mobile_number,emi_amount,due_date
Priya Sharma,9876543210,"₹4,500",15 October
```
The [calling list reference](/documentation/deploy/campaigns/calling-list) covers the CSV format and auto-mapping.
### From the API
[Initiate Individual Call](/api-reference/calling/individual-calls/initiate-individual-call) takes the variables in `custom_args_values`, an object of `name: value` pairs. `name` and `mobile_number` are required request fields. When you send `custom_args_values`, it must include every variable the agent has, or the call fails with `400` "Missing custom arguments: …". When you leave it out, only `callee_name` and `mobile_number` are filled. Send your [API key](/documentation/manage-account/api-key) in `X-API-KEY`; `from_number` is the [caller ID](/documentation/inventory/phone-numbers/inbound-agent-number#outbound-choose-the-caller-id).
```bash cURL theme={null}
curl -X POST "https://prod-api.ringg.ai/ca/api/v0/calling/outbound/individual" \
-H "X-API-KEY: $RINGG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Priya Sharma",
"mobile_number": "+919876543210",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"from_number": "+919876540110",
"custom_args_values": {
"callee_name": "Priya",
"emi_amount": "₹4,500",
"due_date": "15 October"
}
}'
```
```javascript JavaScript theme={null}
const response = await fetch("https://prod-api.ringg.ai/ca/api/v0/calling/outbound/individual", {
method: "POST",
headers: {
"X-API-KEY": process.env.RINGG_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Priya Sharma",
mobile_number: "+919876543210",
agent_id: "00000000-0000-4000-8000-0000000000a1",
from_number: "+919876540110",
custom_args_values: {
callee_name: "Priya",
emi_amount: "₹4,500",
due_date: "15 October",
},
}),
});
console.log(await response.json());
```
```python Python theme={null}
import os
import requests
response = requests.post(
"https://prod-api.ringg.ai/ca/api/v0/calling/outbound/individual",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
json={
"name": "Priya Sharma",
"mobile_number": "+919876543210",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"from_number": "+919876540110",
"custom_args_values": {
"callee_name": "Priya",
"emi_amount": "₹4,500",
"due_date": "15 October",
},
},
)
print(response.json())
```
> [!TIP]
>
> The response echoes the values the call received in `data.custom_args_values`.
The [number pool version](/api-reference/calling/individual-calls/initiate-individual-call-v2) takes the same field.
### From pre-call tools
A pre-call tool runs before the call starts. It can take a variable as an input (offered as `custom_args.`, for example to look up a customer by `custom_args.mobile_number`), and its selected response keys go into the prompt as `@((tool_name.key))`. Use this when the value lives in your system rather than in the CSV or API request. See [Tools](/documentation/build-agents/customize-agent-behaviour/tools/overview) and the [look-up example](/documentation/build-agents/customize-agent-behaviour/tools/api-tools#example-look-up-the-customer-before-the-call).
## When a value is missing
The dashboard does not stop a test call with empty variables. A variable sent as an empty string becomes empty text. A variable that isn't sent at all stays in the prompt as written, for example `@{{due_date}}`, and the call goes ahead.
Write the prompt so a missing value does not derail the call: "If the due date is not known, ask the customer to check their statement." Or wrap the sentence in an [If Condition block](/documentation/build-agents/customize-agent-behaviour/agent-prompt#if-condition-blocks) that checks the variable **is not empty**. That check works only when the variable is sent as an empty string: an unsent variable counts as not empty.
## Variables by API
[Edit Assistant](/api-reference/agents/edit-assistant) with `"operation": "edit_custom_vars"` sets the agent's variable names in `custom_variables`, the same list the **Custom Variables** panel shows. [Create Agent](/api-reference/agents/create-agent) takes `custom_variables` too.
The list you send replaces the agent's list, so include every variable you want to keep, `callee_name` and `mobile_number` too: an outbound agent rejects a list without them with `403`. The API keeps names exactly as sent, so send them in lowercase snake\_case.
```bash cURL theme={null}
curl -X PATCH "https://prod-api.ringg.ai/ca/api/v0/agent/v1" \
-H "X-API-KEY: $RINGG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "edit_custom_vars",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"custom_variables": ["callee_name", "mobile_number", "emi_amount", "due_date"]
}'
```
## Troubleshooting
> [accordion] The agent says the variable name, or nothing, instead of the value
>
> The call did not receive that variable. Check the call's **Custom variables** in [Logs](/documentation/monitor/logs#the-call-panel), and make sure the key in `custom_args_values` or the CSV column matches the variable name exactly.
## Next steps
> [card] [Fetch data with tools](/documentation/build-agents/customize-agent-behaviour/tools/overview)
>
> Look up values before the call starts.
> [card] [Add a knowledge base](/documentation/inventory/knowledge-base)
>
> Let the agent answer from your files and web pages.
> [card] [Prepare a calling list](/documentation/deploy/campaigns/calling-list)
>
> Fill variables for every contact from a CSV.
# Event Subscription
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/event-subscription
Subscribe a Ringg AI agent to call, chat and analysis events from the dashboard: pick events, set the callback URL and headers, and know the per-event limits.
Event Subscription (webhooks) sends an HTTP request to your server when an [agent's](/documentation/build-agents/agents/agent-types) conversation reaches a stage: a call starts or ends, its recording is ready, or its analysis finishes. Use it to update your CRM or trigger follow-ups without polling.
In the dashboard: Agents (listed under **Assistants** in the sidebar) → open an agent → **Advanced Settings → Event Subscription**. On a [multi-prompt agent](/documentation/build-agents/agents/multi-prompt-agents/overview), open **Global Settings → Events subscription** (see [Global Settings](/documentation/build-agents/agents/multi-prompt-agents/global-settings#global-settings)).
On a WhatsApp agent the list offers chat events instead of call events; see [WhatsApp chat events](/documentation/build-agents/customize-agent-behaviour/webhooks/whatsapp-chat-events#whatsapp-chat-events).
## Before you start
> [card] [An agent](/documentation/build-agents/agents/create-an-agent)
>
> The agent whose calls or chats send the events.
> [card] [An HTTPS endpoint](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors#endpoint-requirements)
>
> A URL on your server that accepts the requests and returns a `2xx` status.
## Add a subscription
Adding an event subscription
**1. Open the section**
Open **Event Subscription**. With no subscriptions yet, the **New subscription** form is already open; otherwise click **Create Subscription** (**Add** on a multi-prompt agent).
**2. Set the method and URL**
Pick a **Method**: **GET**, **POST**, **PUT** or **PATCH** (default **POST**). Enter the **Callback URL**, for example `https://api.example.com/webhooks/ringg`.
**3. Select events**
Under **Select Events**, tick one or more. Each is described in [Events](#events).
**4. Add headers (optional)**
Under **Custom Headers**, click **Add Header** and fill in a key and value, such as `Authorization` and `Bearer `. Ringg sends these headers with every event, so your server can check them (see [Authentication patterns](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors#authentication-patterns)).

A filled-in new subscription
**5. Save**
Click **Create Subscription**. It is enabled once the URL and at least one event are set. You see "Event subscription added" and a card with the **Webhook URL**, **Events** and **Headers**.
> [!TIP]
>
> The card shows your URL and every event you ticked.

Saved subscriptions
To manage subscriptions from code instead, see [Configure subscriptions](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors#configure-subscriptions).
## Events
The list matches the agent's channel. Voice and web agents get the call events, WhatsApp agents get **Chat Completed**, and every agent gets the analysis events. Hover the info icon next to an event for the same details as below.
| Event | Fires | Carries |
| - | - | - |
| **Call Started** `call_started` | When an outbound call or web call begins. Not sent for inbound phone calls | Call ID, caller info, custom args, agent info |
| **Call Ringing** `call_ringing` | Dashboard test calls only, together with Call Started, once the carrier accepts the dial | Call ID, custom args, agent and version info |
| **Call Ongoing** `call_ongoing` | Same moment as Call Ringing | Same as Call Ringing |
| **Call Completed** `call_completed` | When every call attempt finishes | Transcript, duration, status, custom args |
| **Recording Ready** `recording_completed` | When the recording is processed and ready | Recording URL, duration |
| **Chat Completed** `chat_completed` | When a WhatsApp conversation ends | Transcript, message counts, status, custom args |
| **Platform Analysis Done** `platform_analysis_completed` | When AI analysis completes | Key points, summary, classification |
| **Advanced Analysis Complete** `client_analysis_completed` | When [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) completes | Your Advanced Analysis results |
| **All Processing Done** `all_processing_completed` | Once all the events above are processed | All data from each event combined |
The `chat_completed` payload is in [WhatsApp events](/documentation/build-agents/customize-agent-behaviour/webhooks/whatsapp-chat-events#whatsapp-chat-events).
## Rules the dashboard enforces
| Rule | What you see |
| - | - |
| At most 4 subscriptions per event on one agent | "Subscription limit reached". **Create Subscription** is hidden once every offered event has 4. |
| The same callback URL and event cannot appear twice | "Duplicate subscription". Remove the duplicate, or add the event to the existing subscription. |
| A header with a key needs a value | "Add a value or remove this header" |
The limit counts subscriptions per event, not in total. One URL subscribed to several events counts once against each of them. The API enforces the same rules with `400`, and also rejects an event the agent's channel can never produce.
## Header values are masked
After you save, Ringg masks the value of any header whose name contains `authorization`, `api-key`, `token`, `bearer`, `secret`, `password`, `auth` or `key` (so `X-Idempotency-Key` is masked too). A masked value shows its first 4 characters, for example `sk_l***`. In the dashboard a masked value is read-only:
* To change it, click the pencil (**Edit header value**) and type the full new value. Leave it blank to keep the stored one.
* If you change the **Callback URL**, or replace all of a subscription's original events, masked values are cleared and you see "Header value cleared": "The secret was tied to the previous target. Re-enter it before saving."
## Edit or remove a subscription
* **Edit**: open the card's menu (**⋮**) and click **Edit**. The card turns into the form; change it and click **Update Subscription**. You see "Event subscription updated".
* **Remove**: open the menu and click **Delete**. It is removed at once, with no confirmation, and you see "Event subscription removed".
On a multi-prompt agent the compact list has pencil and trash buttons instead of the menu. Changes there go into the agent's draft; see [Publish changes on a multi-prompt agent](/documentation/build-agents/test-and-improve/drafts-and-versions#publish-changes-on-a-multi-prompt-agent).
## Verify it worked
Place a [test call](/documentation/build-agents/test-and-improve/test-an-agent). Your endpoint receives each event you subscribed to, with your custom headers.
> [!TIP]
>
> If you subscribed to **Call Completed**, your server logs a `call_completed` request with the call's transcript and status.
## Troubleshooting
> [accordion] "Failed to update subscriptions"
>
> The server rejected the list. Check the URL, the 4-per-event limit and duplicate URL and event pairs, then save again.
> [accordion] My endpoint is not receiving events
>
> Check the endpoint against the [requirements](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors#endpoint-requirements) and the [error handling](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors) guide. Confirm the call reached the stage the event waits for: **Recording Ready** needs a recording, and the analysis events need a completed conversation.
## Next steps
> [card] [Read the payloads](/documentation/build-agents/customize-agent-behaviour/webhooks/call-events)
>
> Every field Ringg sends for each event.
> [card] [Build your endpoint](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors)
>
> Endpoint requirements, idempotency and authentication.
Related topics
# API tools
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/tools/api-tools
Add an API tool to a Ringg AI agent: call your own endpoint before, during or after a call, map parameters from variables or the conversation, and use the response in the prompt.
## Add an API tool
Adding a pre-call API tool and a call transfer tool
**1. Open the phase**
On the **Tools** page, pick **Pre-call**, **On-call** or **Post-call**, then click **API** in the side panel.
**2. Name the request**
Enter a tool name, the method (**GET**, **POST**, **PUT**, **PATCH** or **DELETE**) and your endpoint's URL. The name is saved as lowercase letters, digits and underscores, so `CRM Lookup` becomes `crm_lookup`.
**3. Add parameters**
Fill the **Headers**, **Path**, **Query** and **Body** tabs. Each row has a key, a value and a [source](#parameter-sources); a **Static** row also has a **String**, **Number** or **Boolean** type toggle. **+ Test value** on a Variable, Dynamic or JQ row gives **Test API** a sample value.
The body can be `application/json`, `multipart/form-data` or `x-www-form-urlencoded`. A JSON body has a **Pretty** form view and an **Editor** view: "Use `@` to insert variables, `#` to create dynamic values, and `` `...` `` for jq expressions inside the JSON editor." **Copy cURL** copies the request as a cURL command.
**4. Test and shape the response**
Click **Test API**. The **Response** tab then shows the result and response time (it is not offered for DELETE). Keep only what the agent needs: tick keys in the response, or write a jq transform. On-call outputs are read by the model, and long payloads slow it down.

The Response tab after Test API
**5. Set behaviour and save**
On the **Settings** tab, set the timeout and retries ([Request settings](#request-settings)). Click **Add to assistant** (**Save tool** when editing). For an on-call tool, [mention it in the prompt](/documentation/build-agents/customize-agent-behaviour/tools/overview#use-on-call-tools-in-the-prompt).
> [!TIP]
>
> The tool appears in the phase's list on the **Tools** page.
An API tool's menu has **Enable** or **Disable**, **Share to workspace** ([Workspace tools](/documentation/build-agents/customize-agent-behaviour/tools/workspace-tools#workspace-tools)) and **Delete**.
### Parameter sources
| Source | Value | Phases |
| - | - | - |
| **Static** | A fixed value, such as an auth header | All |
| **Variable** | A value from the call context, picked from a list | All |
| **Dynamic** | Filled by the agent from the conversation; describe it, such as "Order ID the caller reads out" | On-call |
| **JQ** | A jq expression over the call context | All |
The call context has these groups:
**custom\_args** `object`
The agent's [custom variables](/documentation/build-agents/customize-agent-behaviour/custom-variables), such as `callee_name` and `mobile_number`.
**call\_data** `object`
The call record: `id`, `status`, `sub_status`, `call_type`, `call_category`, `to_number`, `from_number`, `call_duration`, `transcript`, `recording_url`, `retry_count`, `hangup_source`, `user_message_count` and more. A pre-call tool gets the fields known when the call is set up, such as `id`, `to_number`, `from_number`, `agent_id` and `retry_count`, with `call_duration` at `0`. An on-call tool also gets the transcript so far, `call_duration` and the message counts. `call_cost`, `recording_url`, `hangup_source` and `call_category` are filled only after the call.
**tool\_output** `object`
Fields another tool returned, as `tool_name.field`.
**platform\_analysis** `object`
Post-call only. Ringg's analysis: `summary`, `classification`, `key_points`, `action_items`, `callback_requested`, `callback_requested_time` and more ([Analysis fields](/documentation/build-agents/customize-agent-behaviour/webhooks/field-reference#analysis-fields)).
**client\_analysis** `object`
Post-call only. Your [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) variables.
In jq, the same groups are `.custom_args`, `.call_data`, `.api_responses.` (or `.tool_outputs`), `.platform_analysis` and `.client_analysis`.
### Request settings
| Setting | Values |
| - | - |
| **Timeout (seconds)** | Max waiting time for the API's response, per attempt. Empty means 60 seconds. |
| **Retry count** | 0 to 10. Retries on timeouts, connection errors, `429`, `500`, `502`, `503` and `504`. Other statuses, such as `404`, are never retried. |
| **Backoff** | Shown when retries are above 0. **Exponential** (default), **Linear** or **Constant**, with **Initial delay (ms)** (default 500) and **Max delay (ms)** (default 5000). |
| **Block call on status codes** | Pre-call only. Codes from 400 to 599 that abort the whole call; other 4xx and 5xx only skip this tool's data. |
| **Trigger on unanswered calls** | Post-call only, off by default. Runs the tool when the call isn't picked up, as long as an attempt was made. |
| **Tool Execution Message** | On-call only. Spoken when the tool triggers, one per [agent language](/documentation/build-agents/customize-agent-behaviour/voice-and-language#languages). Empty means silent. |
## Example: look up the customer before the call
A payment reminder agent for Acme Finance should know the amount due before it says hello.
**1. Create the pre-call tool**
On **Pre-call**, click **API**. Name it `crm_lookup`, method **GET**, URL `https://crm.example.com/api/customers`.
**2. Pass the phone number**
On **Query**, add a **Variable** row with key `phone` and value `custom_args.mobile_number`. On **Headers**, add a **Static** row `Authorization` with your CRM token.
**3. Keep the useful fields**
Click **Test API**. In **Response**, tick `amount_due`, `due_date` and `rm_phone`. Add `404` under **Block call on status codes** so no call goes out for an unknown customer.
**4. Use the fields in the prompt**
Save, then use the fields in the first message and script:
```text theme={null}
Hello @{{callee_name}}, this is Riya from Acme Finance. I'm calling about your EMI of ₹@((crm_lookup.amount_due)), due on @((crm_lookup.due_date)).
If the caller disputes the amount, use @||call_transfer|| to reach their relationship manager.
```
> [!TIP]
>
> A [test call](/documentation/build-agents/test-and-improve/test-an-agent) opens with the customer's real amount and due date.
Set the call transfer **Target** to `@((crm_lookup.rm_phone))` and each caller reaches their own manager.
# Function tools and conditions
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/tools/function-tools-and-conditions
Compute results with jq function tools that make no network call, and group pre-call or post-call tools under conditions that run only when a rule matches.
## Function tools
A function tool runs a jq program for logic that needs no API, such as checking a date against a holiday list or testing business hours. Click **Function** in the side panel.
* **Name** and **Description** say what it does; **Generate** writes the program from the description.
* **Inputs** are **Static**, **Variable**, **JQ** or (on-call) **Dynamic**. Input keys use letters, numbers and `_`. A dynamic input also takes a data type: string, number or boolean.
* **Program** is jq, and the inputs are its input object (`.`).
* **Test function** shows **Input (.)** and **Output**. **View example** loads **Holiday check**, **Business hours** or **Format contact details**.
A function tool has **Share to workspace** and **Delete** buttons.
## Conditions
On pre-call and post-call, **Condition** adds a group of tools that runs only when its rule matches. A rule is "If" a field, an operator and a value; several rules join with **And** or **Or**, or you write a **JQ expression** instead.
| Operators | |
| - | - |
| Compare | equals, not equals, is greater than, is greater than or equal to, is less than, is less than or equal to |
| Text | contains, not contains, starts with, ends with |
| Presence | is empty, is not empty (no value needed) |
| Arrays | array contains, array does not contain, size equals, size is greater than, size is less than |
Put tools in the group by dragging them in, or click **Attach tool** and pick one; **Create new tool** builds a new API tool inside the group. A [workspace tool](/documentation/build-agents/customize-agent-behaviour/tools/workspace-tools#workspace-tools) listed as "Re-save this tool in the library to enable conditions" needs exactly that: open it in the library and click **Save tool**.
For example, a post-call group with "If `platform_analysis.callback_requested` equals true" can create a follow-up task in your CRM.
# Integration tools
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/tools/integration-tools
Add an integration tool to a Ringg AI agent: run an action on a connected app account, such as a calendar event, a sheet row or a Slack post, and bind its parameters.
## Integration tools
An Integration tool runs an action on an app account connected to your workspace, such as creating a calendar event, appending a sheet row or posting to Slack. Which tools each app offers comes from Ringg. For WhatsApp's send-template and send-text tools, see [WhatsApp on-call tools](/documentation/build-agents/customize-agent-behaviour/tools/whatsapp-tools#on-call).
**1. Pick the account**
Click **Integration** in the side panel. **Select an integration** lists each connected app; expand one and pick the account. An expired account shows **Reconnect** instead until it is re-authorized on the sidebar **Tools** page.
**2. Bind the parameters**
Pick a tool from the account's list. Each parameter takes a **Static**, **Variable** or **JQ** value, plus **Dynamic** on-call, the same [sources](/documentation/build-agents/customize-agent-behaviour/tools/api-tools#parameter-sources) as an API tool. **Add test value** gives a sample for the run.
**3. Run, then import**
Click **Run**. **Import** is disabled until the run returns a response, so you always see the real result before the tool goes on the agent.
> [!TIP]
>
> The tool appears in the phase's list. Its card has a pencil (edit the bindings, **Run** again, then **Save**) and a bin (**Delete integration tool**, with a confirmation).
Related topics
# Tools
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/tools/overview
How Ringg AI agent tools work: the pre-call, on-call and post-call phases, the kinds of tool on each, using on-call tools in the prompt, and managing tools from an AI assistant.
Each tool on an [agent](/documentation/build-agents/agents/agent-types) runs in one of three phases, and the phase decides when it runs and what data it can read.
In the dashboard: Agents (listed under **Assistants** in the sidebar) → open an agent → **Advanced Settings → Tools**. On a [multi-prompt agent](/documentation/build-agents/agents/multi-prompt-agents/overview), pre-call and post-call tools are under [Global Settings](/documentation/build-agents/agents/multi-prompt-agents/global-settings#global-settings) and on-call tools are attached to each Agent node.
## Before you start
> [card] [An agent](/documentation/build-agents/agents/create-an-agent)
>
> The agent the tools run for.
> [card] [Custom variables](/documentation/build-agents/customize-agent-behaviour/custom-variables)
>
> Optional: per-call values tools can send, such as `mobile_number`.
For an API tool you also need the endpoint's URL and any auth header it expects. For an Integration tool, [connect the app](/documentation/inventory/tools-integrations/connect-an-app) on the sidebar **Tools** page first; accounts are connected once per workspace.
## The three phases
The **Tools** page has a tab per phase. Each tab has a side panel listing what you can add.
| Tab | Runs | Use it to |
| - | - | - |
| **Pre-call** | Before the call connects | Fetch what the agent needs from its first word: name, dues, order status. The output goes into the prompt. |
| **On-call** | When the agent decides to call it | Act on what the caller says: check a slot, create a ticket, transfer, hang up. The [prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt) must say when. |
| **Post-call** | After the call | Send results to your systems, with the transcript and analysis available. Never talks to the caller. |
| Kind | Phases | What it is |
| - | - | - |
| **API** | All | An HTTP request to a URL you configure |
| **Integration** | All | An action on a connected app account, such as a calendar, a sheet or Slack |
| **Function** | All | A jq (A small language for filtering and reshaping JSON.) program that computes a result with no network call |
| **Condition** | Pre-call, post-call | A group of tools that runs only when a rule matches |
| **Workspace tools** | Per tool | Shared tools from your [workspace library](/documentation/build-agents/customize-agent-behaviour/tools/workspace-tools#workspace-tools) |
| **System Tools** | On-call | [Built-in actions](/documentation/build-agents/customize-agent-behaviour/tools/system-tools#system-tools) such as transfer and end call |
On pre-call and post-call, the panel also lists **Frequently used integrations**: calendar, sheets and Slack apps you have connected, with a warning icon on an expired account.
## Use on-call tools in the prompt
An on-call tool runs only when the agent decides to call it, so the prompt must say when. Type `@` in the [prompt editor](/documentation/build-agents/customize-agent-behaviour/agent-prompt) and pick the tool; it is inserted as `@||tool_name||`. Pre-call results go in as `@((tool_name.field))`.
```text theme={null}
When the caller gives an order ID, use @||check_order_status|| and read out the status.
If the caller asks for a human, use @||call_transfer||.
When the caller says goodbye or asks to stop, use @||end_call||.
```
## Manage tools from an AI assistant
The [Ringg MCP server](/resources/mcp-server/workspace-mcp-server/overview) ([connect it](/resources/mcp-server/workspace-mcp-server/connect-an-assistant)) can list an agent's tools, add or change API and function tools, test them and their jq, and remove them.
## Verify it worked
[Test the agent](/documentation/build-agents/test-and-improve/test-an-agent), then open the call in [Logs](/documentation/monitor/logs#the-call-panel) and read the transcript.
> [!TIP]
>
> The first message contains the pre-call values, and the transcript shows each on-call tool's **Tool Execution Message** where it ran.
## Troubleshooting
> [accordion] Calls are aborted before they connect
>
> A pre-call tool returned a code listed in **Block call on status codes**. Test the tool with the same input, or remove the code.
## Next steps
> [card] [Call settings](/documentation/build-agents/customize-agent-behaviour/call-settings)
>
> Call duration, calling window, voicemail and interruptions.
> [card] [Test the agent](/documentation/build-agents/test-and-improve/test-an-agent)
>
> Place a test call and check the tool calls in Logs.
> [card] [Attach a number](/documentation/inventory/phone-numbers/inbound-agent-number)
>
> Put the agent on a phone number.
# Post-call tools
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/tools/post-call-tools
Run Ringg AI tools after a call ends: when each post-call tool fires, what data it can read, and how callback scheduling calls the person back.
## Post-call tools
You don't pick when a post-call tool runs: Ringg derives its trigger point from the data it references.
| Trigger point | Runs when | Tool can read |
| - | - | - |
| `call_completed` | The call ends | `custom_args`, `call_data`, `tool_output` |
| `platform_analysis` | Platform analysis is done | Also `platform_analysis` |
| `client_analysis` | Advanced Analysis is done | Also `platform_analysis` and `client_analysis` |
A tool that reads `call_data.recording_url` waits until the recording is ready. When the call never connected, it runs without waiting and the URL is empty.
### Callback scheduling
The **Post-call** tab also has a **Callback scheduling** row with **Enable** or **Disable** and **Configure**, which calls the person back.
* **Triggers**: **Callee requested callback** (always on) and **No response from callee** (fewer than 2 messages from the caller), each with a delay as `hh:mm` (default `24:00`). Custom triggers test a [call data](/documentation/build-agents/customize-agent-behaviour/tools/api-tools#parameter-sources) or [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) field with the [condition operators](/documentation/build-agents/customize-agent-behaviour/tools/function-tools-and-conditions#conditions).
* **Schedule callback instructions** (required): how the agent decides when to offer and confirm a callback.
* **Callback message** (required): spoken when the callback connects, such as "Hi, calling you back as requested."
* **Maximum callback attempts**: 1 or more, default 3.
Callbacks show in [Logs](/documentation/monitor/logs#call-types) with the **Callback** call type.
# System tools
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/tools/system-tools
Ringg AI's built-in on-call tools: call transfer, wait for keypad input, stay on line, end call and end chat, with each tool's settings and how to mention it in the prompt.
## System tools
System tools are built-in on-call actions under **System Tools** on the **On-call** tab. The list comes from Ringg; WhatsApp agents also get **End chat**. A new agent starts with Stay on line and End call (plus End chat on a WhatsApp agent); add the others from the panel. A [WhatsApp agent](/documentation/build-agents/agents/whatsapp-agents/create-an-agent) splits them into **Call Tools** and **Chat Tools**; to send templates during a chat, see [WhatsApp on-call tools](/documentation/build-agents/customize-agent-behaviour/tools/whatsapp-tools#on-call).
Every system tool except end chat has a **Tool name** (lowercase letters, numbers and underscores), a **Description** and a **Tool Execution Message**.
| Tool | What it does and its own settings |
| - | - |
| Call transfer | Transfers the caller to a number or SIP URI (An address for a call over SIP, such as sip:[billing@pbx.example.com](mailto:billing@pbx.example.com).). Destinations, business hours and an unavailability message ([below](#call-transfer)). |
| Wait for DTMF (The tones sent when a caller presses keys on the phone keypad.) | Waits for the caller to type digits on the keypad. **Digits** and **Timeout** (seconds). |
| Stay on line | Waits silently when the caller asks the agent to hold, then resumes. **Duration** (seconds). |
| End call | Hangs up after a closing line. With no execution message, the agent says goodbye in its own words. |
| End chat | Closes a WhatsApp chat; the agent writes its own farewell. Mention it as `@end_chat`. |
| Capture code | Captures an alphanumeric code, such as an AWB or booking number. You can add more than one. **Output variable**, **Length** (min and max), **Examples**, **Repeat while listening** (on), **Read back & confirm** (on), **Pause before confirming** (7 seconds). |
| DTMF | Sends keypad tones into the call, for example to get through another company's phone menu. It doesn't listen for keys; that is Wait for DTMF. Works on Plivo and Vobiz numbers (Plivo only on multi-prompt agents). Common fields only. |
| Collect long input | Lets the caller speak at length, such as an address, without the agent replying. Collection ends when the caller presses the end key (`#` by default) or after a timeout (45 seconds by default); the agent then gets everything said as one message. |
A system tool's menu has **Enable** or **Disable** and **Delete**.

On-call tools with the side panel
### Call transfer
**1. Add destinations**
Click **New destination**. In **Target**, enter a number such as `+91 98765 4xxxx` or a SIP URI, or type `@` to pick a [variable](/documentation/build-agents/customize-agent-behaviour/custom-variables) (`@{{customer_phone}}`) or a pre-call result (`@((crm_lookup.rm_phone))`), resolved at transfer time. In **Description**, say who it reaches: "Billing team for payment disputes".
**2. Set business hours**
**Business hours** takes a start hour, an end hour and a timezone. The default is 08:00 to 16:00 IST.
**3. Write the unavailability message**
What the agent says when a transfer is requested outside business hours, one per agent language, such as "Transfers are unavailable outside business hours."
**4. Save**
Click **Save tool**, then mention `@||call_transfer||` in the prompt. With an empty **Tool Execution Message**, the agent announces the transfer in its own words.

Call transfer settings
# WhatsApp tools
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/tools/whatsapp-tools
Send a WhatsApp template or text from any Ringg AI agent, during a call or chat with an on-call tool, or after it ends with a post-call tool, and see each send in Logs.
**Send WhatsApp Template** and **Send WhatsApp Text** are integration tools for any agent, voice or WhatsApp, once [WhatsApp Business is connected](/documentation/inventory/tools-integrations/connect-whatsapp) with a **Ready** number (and, for templates, a **Ready** template). They work on-call, where the agent sends at the point your prompt names, and post-call, where Ringg sends after the call or chat ends. Each send appears in the call's transcript in [Logs](/documentation/monitor/logs) as a tool call, with the sender, recipient, template and Meta's result.
To send a template in the middle of a WhatsApp chat, don't use these tools: pick the template under **WhatsApp Templates** instead ([how](/documentation/build-agents/agents/whatsapp-agents/create-an-agent#send-a-template-during-a-chat)).
## On-call
### The two tools
| Tool | Sends | Phases |
| - | - | - |
| **Send WhatsApp Template** | An approved template with its variables filled. Delivered at any time. | On-call and [post-call](/documentation/build-agents/customize-agent-behaviour/tools/whatsapp-tools#post-call) |
| **Send WhatsApp Text** | Free-form text. Delivered only within 24 hours of the customer's last WhatsApp message. | On-call only |
Neither runs as a pre-call tool. A customer who has never messaged your number is outside the 24-hour window, so for a first contact use the template tool.
### Add the tool
Adding Send WhatsApp Template as an on-call and a post-call tool
**1. Open the On-call tab**
In the agent editor, select **Tools** in the left menu, then the **On-call** tab.
**2. Pick WhatsApp Business**
In the side panel, expand **Integration** and select **WhatsApp Business** (your account name is shown beneath it). The account's **Available Tools** are listed.
**3. Choose the sender and recipient**
Expand **Send WhatsApp Template** or **Send WhatsApp Text**:
* **Send from**: a registered number on the account. If the field is empty with **No registered WhatsApp numbers on this account**, [register one](/documentation/inventory/tools-integrations/connect-whatsapp#add-a-number) first.
* **Send to**: leave blank to message the customer on the call. To send elsewhere, set it to **Variable** and pick a custom variable, or to **Static** and enter a number such as `+919876543210`.
**4. Choose the content**
* Template tool: pick the **Template**; its language and variable count show beneath it. Under **Body variables**, set each variable to **Variable** (a custom variable, filled when the call runs) or **Static** (a fixed value).
* Text tool: write the **Message text**.

Send WhatsApp Template configured with a sender, template and body variables
**5. Test and import**
**Add test value** gives a variable a sample value. **Run test** sends a real message with those values and reports "Test message sent." **Import** stays disabled until the sender, the template and every variable are set; a test run isn't required.
> [!TIP]
>
> The tool appears in the **On-call** list as **Send WhatsApp Template** (or **Send WhatsApp Text**) from your WhatsApp Business account.

The On-call tab after importing the tool
### Tell the agent when to use it
The agent calls an on-call tool only where the prompt says to. In the prompt editor, type `@` and pick the tool under **On-Call API Settings**; it is inserted as `@||tool_name||` with the tool's own name. Next to it, say when to send and what to say afterwards:
```text theme={null}
If the customer asks for the brochure, send it on WhatsApp with
@||Acme Lending_send_template_message|| and tell them it is on its way to their WhatsApp.
Don't read the link out loud.
```
The template tool is named `_send_template_message` and the text tool `_send_text_message`, where the account name is your WhatsApp Business account's name in Ringg, as shown under **WhatsApp Business**, spaces included. Use the mention the `@` menu inserts.
### Map template variables
Variables are filled from the conversation's [custom variables](/documentation/build-agents/customize-agent-behaviour/custom-variables), so declare them in the agent. They can be passed when the call starts or set by a pre-call tool. For a template `Hi {{1}}, your {{2}} link: {{3}}`:
| Variable row | Type | Value |
| - | - | - |
| `{{1}}` | Variable | `name` |
| `{{2}}` | Static | `renewal` |
| `{{3}}` | Variable | `renewal_url` |
With named variables (`{{customer_name}}`), the rows are labelled with those names instead of numbers.
### Troubleshooting
> [accordion] Outside the 24-hour customer service window… send an approved template instead
>
> Shown on the tool call in Logs. **Send WhatsApp Text** was used more than 24 hours after the customer's last message. Use **Send WhatsApp Template**.
> [accordion] "template\_name" is no longer available. Pick another template.
>
> Shown in the tool editor. The template was deleted or is no longer approved. Pick another and save.
## Post-call
### Add the tool
The same video as the on-call page; the post-call part starts at 45 seconds.
Adding Send WhatsApp Template as an on-call and a post-call tool
**1. Open the Post-call tab and pick WhatsApp Business**
In the agent editor, select **Tools**, then the **Post-call** tab, and expand **Integration** → **WhatsApp Business** in the side panel, as for the [on-call tool](/documentation/build-agents/customize-agent-behaviour/tools/whatsapp-tools#on-call).
**2. Configure the message**
| Field | What to enter |
| - | - |
| **Send from** | A registered number on the account. |
| **Send to** | Blank sends to the customer: the number on a voice call, their WhatsApp number on a chat. Or set a **Variable** or **Static** number. |
| **Template** | An approved template. |
| **Body variables** | One row per variable, each **Variable** (a custom variable of the conversation) or **Static**. |

The post-call Send WhatsApp Template configuration
**3. Test and import**
**Add test value**, **Run test** and **Import** work as on the [on-call tool](/documentation/build-agents/customize-agent-behaviour/tools/whatsapp-tools#on-call).
> [!TIP]
>
> The tool is listed on the **Post-call** tab, and the template is sent after every conversation this agent handles.
### Common set-ups
> [accordion] Follow up on WhatsApp after a voice call
>
> Add the tool to a voice agent's post-call tools with a Utility template such as:
>
> ```text theme={null}
> Hi {{1}}, thanks for speaking with us about {{2}}. Reply here if you have any
> questions and we'll pick up where we left off.
> ```
>
> Map `{{1}}` to the `name` custom variable and `{{2}}` to a static product name. Leave **Send to** blank so it goes to the number that was called.
> [accordion] Send a summary when a WhatsApp chat closes
>
> Add the tool to the WhatsApp agent itself. It runs when the chat closes, which for a customer who stops replying is after the agent's idle timeout (3 hours by default). See [when a chat opens and closes](/documentation/build-agents/agents/whatsapp-agents/create-an-agent#when-a-chat-opens-and-closes).
> [accordion] Notify your team instead of the customer
>
> Set **Send to** to **Static** with a team member's number, and use a template whose variables carry the details you need.
## Next steps
> [card] [Call settings](/documentation/build-agents/customize-agent-behaviour/call-settings)
>
> Calling window, voicemail, interruptions and call length.
> [card] [Test the agent](/documentation/build-agents/test-and-improve/test-an-agent)
>
> Call yourself and check the send in Logs.
Related topics
# Workspace tools
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/tools/workspace-tools
Share a tool across your Ringg AI workspace: browse the library, attach a shared tool to an agent, and share a tool you built so other agents can reuse it.
## Workspace tools
A workspace tool lives in the library on the sidebar **Tools** page and is attached to agents by reference, so one edit in the library reaches every agent that uses it. Build a tool once per workspace when several agents call the same API, and keep per-agent values (a team's calendar, a sheet ID) as overridable parameters.
### The library
The **Tools** page lists library tools grouped as **API**, **Integration** and **Function**, each with its phase chips, how many assistants use it, **Enable** or **Disable**, an edit action and a bin. Only **API** and **Function** tools can be created here; Integration tools reach the library through **Share to workspace**.
* **Disable**: "Attached assistants keep the tool but skip it until it is enabled again." The agent's side panel shows it as **Disabled in library** and does not let you attach it.
* The usage count opens **Where is \ used?**, which lists each attached assistant with its overrides, or "Not attached to any assistant yet."
* Deleting a tool that agents still use shows **\ is still in use**. **Delete anyway** removes it from every agent as well.
The library editor is the same API or Function editor as on an agent, with two extra sections:
* **Available stages**: the phases the tool may run in, at least one. Removing a stage that an agent uses it in asks **Some assistants use a removed stage** and offers **Detach & save**. Variables are limited to call data, plus platform analysis when Post-call is the only stage, because those exist on every agent.
* **Overridable parameters**: each entry picks a parameter from **Request**, **Headers**, **Query**, **Path** or **Body**, chooses **Parameter value** (the agent sets the value, type and data type) or **Whole value** (the agent replaces the node as-is), and can be marked required when attaching. **Add override** adds another.
A library tool can't be renamed while attached.
### Attach a workspace tool to an agent
In the agent's side panel, the **Workspace tools** section lists library tools that support the open phase; **Manage workspace tools** opens the library. Click one to open **Attach a workspace tool**, which shows "Used by N assistants" and, if you already attached it here, "already attached N× here" (one tool can be attached more than once with different overrides). Fill any required overrides and click **Attach**. On a multi-prompt agent, the entry is **Workspace tool** in the **Add new tool** menu, on Global Settings or an Agent node.
The attachment card's menu has **Open in library** and **Detach**. Opening the card edits its overrides and an **Alias (optional)**: the name shown on this agent; "Clear it to fall back to the library name." Detaching asks **Detach \?**: "This assistant stops using the tool. The workspace copy and other assistants are unaffected."
### Share a tool to the workspace
**Share to workspace** on an agent's API or function tool moves it into the library and keeps it on this agent by reference, so its `tool_output` references keep working. The dialog asks for:
* **Library name**: spaces become underscores, shown as "Saved as …".
* **Available stages**: the stages are limited by the tool's parameters. A **Dynamic** parameter allows **On-call** only; a **Variable** that reads `platform_analysis` or `client_analysis` allows **Post-call** only; both together leave no stage, so change the parameter first.
* **Overridable parameters**, as in the library editor.
# Voice and language
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/voice-and-language
Choose a Ringg AI agent's languages, pick or clone a voice, set its speed from 0.7x to 1.2x, boost keywords for speech recognition, and change them by API.
In the dashboard: **Sidebar → Assistants →** open an agent **→ Voice**. On a [WhatsApp agent](/documentation/build-agents/agents/whatsapp-agents/create-an-agent), **Voice** is under **Calls**. On a [multi-prompt agent](/documentation/build-agents/agents/multi-prompt-agents/global-settings#global-settings), it is in **Global Settings**.
The section has three parts, **Language**, **Voice** and **Voice speed**, and one **Save** button at the bottom for all of them.
## Before you start
> [card] [An agent](/documentation/build-agents/agents/create-an-agent)
>
> You pick a language and voice when you create one; this page changes them.
## Languages
| Field | Required | What it does |
| - | - | - |
| **Primary Language** | Yes | The language the agent speaks and listens in by default |
| **Secondary Language** | No | A second language the agent can switch to. The first option is **None** |
| **Additional Languages** | No | Extra languages callers may speak. Behind **Add more languages** |
The list of languages comes from Ringg's voice configuration, not a fixed list. **Secondary Language** only offers languages that pair with the primary one; when none do, it is disabled.
Changing **Primary Language** clears the secondary language and the selected voice, because the voice grid is filtered by language. Changing **Secondary Language** clears the voice too. Pick a voice again before you save, or **Save** has nothing to change.
### Additional languages
Click **Add more languages** to open **Additional Languages** (placeholder "None (optional)"). These help the agent recognise speech in other languages; the agent does not speak in them. Mention the languages in the [prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt#write-prompts-for-voice) if callers may switch.
* You can pick up to 4. Once you have 4, the rest of the list is greyed out.
* The list leaves out the primary and secondary languages.
* Only these language families are offered: Arabic, English, Tamil, Kannada, Telugu, Hindi, Bengali, Marathi, Gujarati, Punjabi, Malay, Chinese, Italian and Malayalam.
Saving additional languages switches the agent's speech-to-text (The model that turns the caller's speech into text for the agent.) provider to Soniox. Add them only when callers really mix languages, then [test](/documentation/build-agents/test-and-improve/test-an-agent) again.
## Choose a voice
The **Voice** part ("Choose the tone of the assistant voice.") shows a grid of voices for the selected languages. The voice the agent is saved on stays first in the grid.
* **Provider tabs**: **All**, then one tab per voice provider in the list (for example ElevenLabs, Cartesia, Sarvam or Deepgram). If your workspace can clone voices, an **Uploaded** tab holds your clones.
* **Tag chips** under the tabs (a tone or style from each voice) narrow the grid. Selected tags combine: a voice must have all of them. **Clear** resets them.
* **See more** shows the full grid.
* Clicking a voice selects it and plays its preview. When the agent has a secondary language, the **Preview language** icon next to the tabs switches the preview between the two languages.
If you pick a voice that cannot speak the agent's primary language, a **Change agent language?** dialog explains that the agent's language will switch to the voice's language and the secondary language will be cleared. Click **Yes, switch** or **Cancel**.
The video changes the primary language, filters and previews voices, sets the speed and saves.
Changing language, voice and speed in the dashboard

The Voice section with filters applied
Click **Save**.
> [!TIP]
>
> "Voice settings saved" appears, **Save** is disabled again, and the selected voice is first in the grid. On a [test call](/documentation/build-agents/test-and-improve/test-an-agent) the first message plays in the new voice, language and speed.
### Clone a voice
Workspaces with voice cloning enabled see **Clone a voice** next to the provider tabs. Cloning is off by default; contact Ringg to turn it on. It trains a new voice from a short recording and saves it under **Uploaded**.
| Field | Rule |
| - | - |
| **Voice name** | Free text, for example "Studio Narrator" |
| **Training audio** | One MP3 file, 20 seconds or less (10–20 seconds recommended), one clear speaker, up to 25 MB |
| **Primary language** | One of the languages in the table below; default **English (India)** |
| **Gender** | **Male** (default) or **Female** |
Click **Clone voice**. While it trains the button reads "Training voice…". When it is done you see "Voice cloned" and the voice appears under **Uploaded**, whatever the agent's language. Clones cannot be deleted from the dashboard. "Clip too long" or "MP3 required" means the file breaks the audio rule above: trim or convert it and upload again.
Languages a voice can be cloned in:
| Code | Label in the dialog |
| - | - |
| `en-IN` | English (India) |
| `hi-IN` | Hindi |
| `mr-IN` | Marathi |
| `kn-IN` | Kannada (kn-IN) |
| `te-IN` | Telugu |
| `gu-IN` | Gujarati |
| `bn-IN` | Bengali |
| `ta-IN` | Tamil |
| `es-ES` | Spanish (Spain) |
| `od-IN` | Odia |
| `pa-IN` | Punjabi |
| `my-MM` | Burmese |
| `ar-AE` | Arabic |
## Voice speed
**Voice speed** ("Adjust the speaking speed of your assistant.") has six steps: **0.7x**, **0.8x**, **0.9x**, **1.0x** (default), **1.1x** and **1.2x**. The play button next to it previews the selected voice at that speed.

Voice speed set to 0.9x after saving
## Keyword Boosting
Keyword Boosting gives the speech recogniser a list of words to listen for, so terms it would otherwise mishear reach the agent correctly: brand names, plan or product names, course names, city names, acronyms. Add the words callers actually say and the agent gets wrong; a test call's transcript in [Logs](/documentation/monitor/logs) shows which ones those are.
In the dashboard: **Advanced Settings → Keyword Boosting** in the editor sidebar. On a multi-prompt agent it is **Keywords boosting** in [Global Settings](/documentation/build-agents/agents/multi-prompt-agents/global-settings#global-settings). WhatsApp agents don't have it.
Type into **Add keywords, comma-separated...**, for example `Acme Lending, EMI, NACH`, and click **Add** or press Enter. The list saves straight away; there is no separate **Save**. A word already on the list is skipped with "Word already exists". To remove a word, click the bin icon on its chip.
> [!TIP]
>
> You see "Vocabulary updated successfully", and each word appears as a chip below the field.
## Before a voice agent goes live
* **Write for the ear**: short turns, one question at a time, and a first message that says who is calling and why. See [Write prompts for voice](/documentation/build-agents/customize-agent-behaviour/agent-prompt#write-prompts-for-voice).
* **Script the other answers**: what the agent does on "no", "call me later" and "wrong person", and when to end the call.
* **Call when people answer**: set the [calling window](/documentation/build-agents/customize-agent-behaviour/call-settings#calling-window) and **Timezone** to your callees' hours, and turn on [voicemail detection](/documentation/build-agents/customize-agent-behaviour/call-settings#voicemail) for outbound calls.
* **Match interruption to the line**: **Strict** on noisy lines, **Sensitive** when callers feel talked over ([Interruption sensitivity](/documentation/build-agents/customize-agent-behaviour/call-settings#interruption-sensitivity)).
* **Spread and cap calls**: a [number pool](/documentation/inventory/phone-numbers/number-pools) rotates numbers and skips spam-flagged ones; [call limits](/documentation/manage-account/call-limits) cap calls per person; keep campaign retries modest.
* **Test, then scale**: [test by phone](/documentation/build-agents/test-and-improve/test-an-agent) with realistic values, run a small campaign, read its calls in [Logs](/documentation/monitor/logs), then upload the full list.
## Change voice and language by API
[Edit Agent Settings](/api-reference/agents/edit-assistant) (`PATCH /agent/v1`) changes one setting per request. Send your [API key](/documentation/manage-account/api-key) in `X-API-KEY`, and find the `agent_id` in the editor ([Find the agent ID](/documentation/build-agents/agents/agent-types#find-the-agent-id)).
| Operation | Field | Matches |
| - | - | - |
| `edit_voice` | `voice_id` and `language` | Selecting a voice, and **Primary Language** |
| `edit_voice` | `secondary_voice_id` (`""` clears it) | The voice for the secondary language |
| `edit_voice` | `additional_languages` | **Additional Languages** |
| `edit_voice_speed` | `voice_speed` | **Voice speed** |
| `edit_vocab` | `vocab`: a list of words, 100 words at most in total. It replaces the whole list | **Keyword Boosting** |
Cloning is dashboard-only.
Get voice IDs from [List Voices](/api-reference/agents/get-assistant-voices) (`GET /agent/voices`). Pass `language` to filter; separate several languages with commas to get only voices that speak all of them. Each voice lists the `languages` it speaks and a `voice_previews` URL per language.
```bash cURL theme={null}
curl "https://prod-api.ringg.ai/ca/api/v0/agent/voices?language=en-IN,hi-IN" \
-H "X-API-KEY: $RINGG_API_KEY"
```
```javascript JavaScript theme={null}
const response = await fetch("https://prod-api.ringg.ai/ca/api/v0/agent/voices?language=en-IN,hi-IN", {
headers: { "X-API-KEY": process.env.RINGG_API_KEY },
});
console.log(await response.json());
```
```python Python theme={null}
import os
import requests
response = requests.get(
"https://prod-api.ringg.ai/ca/api/v0/agent/voices",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
params={"language": "en-IN,hi-IN"},
)
print(response.json())
```
Then set the voice:
```bash cURL theme={null}
curl -X PATCH "https://prod-api.ringg.ai/ca/api/v0/agent/v1" \
-H "X-API-KEY: $RINGG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "edit_voice",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"voice_id": "3b5c7d2a-8e9f-4a1b-9c6d-2e5f8a7b3c4d",
"language": "en-IN"
}'
```
```javascript JavaScript theme={null}
const response = await fetch("https://prod-api.ringg.ai/ca/api/v0/agent/v1", {
method: "PATCH",
headers: {
"X-API-KEY": process.env.RINGG_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
operation: "edit_voice",
agent_id: "00000000-0000-4000-8000-0000000000a1",
voice_id: "3b5c7d2a-8e9f-4a1b-9c6d-2e5f8a7b3c4d",
language: "en-IN",
}),
});
console.log(await response.json());
```
```python Python theme={null}
import os
import requests
response = requests.patch(
"https://prod-api.ringg.ai/ca/api/v0/agent/v1",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
json={
"operation": "edit_voice",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"voice_id": "3b5c7d2a-8e9f-4a1b-9c6d-2e5f8a7b3c4d",
"language": "en-IN",
},
)
print(response.json())
```
A voice that does not speak the language is rejected with `400` and "Selected primary voice does not support the specified language".
### Language codes the API accepts
The two endpoints accept different codes. On both, the voice must speak the language you set.
| Endpoint | Accepted codes |
| - | - |
| [Create Agent](/api-reference/agents/create-agent) (`primary_language`, `secondary_language`) | `en-US`, `en-GB`, `en-AU`, `en-IN`, `hi-IN`, `ta-IN`, `te-IN`, `bn-IN`, `mr-IN`, `kn-IN`, `ms-MY`, `zh-CN`, `od-IN`, `pa-IN`, `my-MM` |
| [Edit Agent Settings](/api-reference/agents/edit-assistant) (`language`, `additional_languages`) | `ar-AE`, `bn-IN`, `de-DE`, `en-AU`, `en-GB`, `en-IN`, `en-US`, `es-ES`, `fr-FR`, `gu-IN`, `hi-IN`, `it-IT`, `ja-JP`, `kn-IN`, `ko-KR`, `ml-IN`, `mr-IN`, `ms-MY`, `my-MM`, `nl-NL`, `od-IN`, `pa-IN`, `pt-BR`, `ru-RU`, `ta-IN`, `te-IN`, `zh-CN` |
Kannada is `kn-IN`; `ka-IN` is rejected. To create an agent in a language Create Agent doesn't accept, create it in the dashboard, or change its language afterwards with Edit Agent Settings.
## Troubleshooting
> [accordion] "No voices available for the given language."
>
> No voice speaks the selected primary and secondary languages together. Change **Secondary Language** to **None**, or pick another primary language.
> [accordion] Do I need a different agent per language?
>
> Only when the prompt itself differs by language. One agent with a primary and a secondary language covers bilingual callers; for a separate script per language, create one agent each and name them by language.
## Next steps
> [card] [Add variables](/documentation/build-agents/customize-agent-behaviour/custom-variables)
>
> Personalise every call with values you pass in.
> [card] [Tune call settings](/documentation/build-agents/customize-agent-behaviour/call-settings)
>
> Set call length, inactivity and interruptions.
# Call events
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/webhooks/call-events
The JSON your endpoint receives for each Ringg AI call event, from call started to all processing completed, and how to link retries and callbacks to the original call.
Every example below is one event for the same outbound call, for an endpoint subscribed in [Set up webhooks](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors); WhatsApp's `chat_completed` is in [WhatsApp events](/documentation/build-agents/customize-agent-behaviour/webhooks/whatsapp-chat-events#whatsapp-chat-events).
## Event payloads
### Call started event
Sent when an outbound call is registered and queued for dialling, before it connects, and when a web call starts. Inbound phone calls don't send it. Nothing has been dialled yet, so `call_sid`, `called_on`, `created_at`, `call_cost` and the latency fields are `null`, and the status is `registered` / `QUEUED`. A call that connects very quickly can send a second `call_started` with `ongoing` / `ACCEPTED`; treat it as optional.
```json theme={null}
{
"event_type": "call_started",
"event_id": "7fe697e8-6e38-462b-917a-77bbd367546c",
"version": "1.0",
"timestamp": "2026-08-04T12:25:26.942668Z",
"call_id": "00000000-0000-4000-8000-0000000000c4",
"parent_call_id": null,
"call_sid": null,
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"workspace_id": "00000000-0000-4000-8000-0000000000c3",
"status": "registered",
"sub_status": "QUEUED",
"call_type": "outbound",
"calling_source": "plivo",
"custom_args_values": {
"callee_name": "Priya",
"emi_amount": "4500",
"due_date": "12 August"
},
"to_number": "+919876543210",
"from_number": "+919876540111",
"bulk_list_id": null,
"called_on": null,
"created_at": null,
"agent_name": "EMI Reminder",
"version_id": "00000000-0000-4000-8000-0000000000c1",
"version_slug": "v1",
"version_description": "Initial version",
"call_cost": null,
"overall_latency_seconds": null,
"first_utterance_seconds": null,
"tool_call_logs": []
}
```
### Call ringing and call ongoing events
Sent only for dashboard test calls, together with `call_started`, once the carrier accepts the dial. They don't track real ringing or answering. The payload is smaller than `call_started`: no `event_id`, `timestamp`, `version`, `call_type`, numbers or cost fields. `call_ongoing` is identical apart from `event_type`.
```json theme={null}
{
"event_type": "call_ringing",
"call_id": "00000000-0000-4000-8000-0000000000c4",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"workspace_id": "00000000-0000-4000-8000-0000000000c3",
"call_sid": "00000000-0000-4000-8000-0000000000c2",
"custom_args_values": {
"callee_name": "Priya"
},
"status": "ongoing",
"sub_status": "ACCEPTED",
"agent_name": "EMI Reminder",
"version_id": "00000000-0000-4000-8000-0000000000c1",
"version_slug": "v1",
"version_description": "Initial version",
"tool_call_logs": [],
"parent_call_id": null
}
```
### Call completed event
Sent when a call attempt finishes, for every outcome: `completed`, `failed`, `error`, `cancelled`, `forwarded`, and the interim `retry`. When the call never connected, `transcript` is empty, `call_duration`, latency and cost are `null`, and `sub_status` carries the reason (see [Status and sub-status reference](/documentation/build-agents/customize-agent-behaviour/webhooks/field-reference#status-and-sub-status-reference)).
```json theme={null}
{
"event_type": "call_completed",
"call_id": "00000000-0000-4000-8000-0000000000c4",
"parent_call_id": null,
"call_sid": "00000000-0000-4000-8000-0000000000c2",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"workspace_id": "00000000-0000-4000-8000-0000000000c3",
"status": "completed",
"sub_status": "ACCEPTED",
"call_type": "outbound",
"call_duration": 15.73,
"agent_message_count": 3,
"user_message_count": 2,
"custom_args_values": {
"callee_name": "Priya",
"emi_amount": "4500",
"due_date": "12 August"
},
"to_number": "+919876543210",
"from_number": "+919876540111",
"bulk_list_id": null,
"called_on": "2026-08-04T12:29:13.310707Z",
"created_at": "2026-08-04T12:29:13.315211Z",
"agent_name": "EMI Reminder",
"version_id": "00000000-0000-4000-8000-0000000000c1",
"version_slug": "v1",
"version_description": "Initial version",
"call_cost": 0.15,
"overall_latency_seconds": 0.892345,
"first_utterance_seconds": 0.456789,
"transcript": [
{ "bot": "Hi Priya, this is Riya from Acme Lending. Your EMI of 4,500 rupees is due on 12 August." },
{ "user": "Yes, I know. I'll pay it this week." },
{ "bot": "Thank you. Have a good day." }
],
"retry_count": 0,
"attempts": [
{ "status": "Busy Line", "called_on_time": "2026-08-04T12:25:30.006699Z" },
{ "status": "ACCEPTED", "called_on_time": "2026-08-04T12:29:13.310707Z" }
],
"recording_url": null,
"tool_call_logs": []
}
```
`attempts` is the dial history; the top-level `sub_status` is the final attempt's reason, lower-cased for failures.
### Recording completed event
Sent when the recording is processed. `recording_url` may expire about a day after the event is sent; download the file if you need to keep it, or fetch a fresh link from [Get Call Details](/api-reference/monitoring/call-history/get-call-details).
```json theme={null}
{
"event_type": "recording_completed",
"call_id": "00000000-0000-4000-8000-0000000000c4",
"parent_call_id": null,
"call_sid": "00000000-0000-4000-8000-0000000000c2",
"sub_status": "ACCEPTED",
"recording_url": "https://recordings.example.com/00000000-0000-4000-8000-0000000000c4.mp3",
"recording_duration": 16.28,
"custom_args_values": {
"callee_name": "Priya",
"emi_amount": "4500",
"due_date": "12 August"
},
"bulk_list_id": null,
"agent_name": "EMI Reminder",
"version_id": "00000000-0000-4000-8000-0000000000c1",
"call_cost": 0.15,
"overall_latency_seconds": 0.892345,
"first_utterance_seconds": 0.456789,
"tool_call_logs": []
}
```
### Platform analysis event
Sent when Ringg's built-in analysis completes, for every call whatever its outcome, so the top-level `status` and `sub_status` describe the call (for example `failed` / `busy line`), not the analysis. `analysis_data.status` is `analyzed` when analysis ran; a call that never connected has nothing to analyse.
```json theme={null}
{
"event_type": "platform_analysis_completed",
"entity_type": "call",
"call_id": "00000000-0000-4000-8000-0000000000c4",
"parent_call_id": null,
"call_sid": "00000000-0000-4000-8000-0000000000c2",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"workspace_id": "00000000-0000-4000-8000-0000000000c3",
"status": "completed",
"sub_status": "ACCEPTED",
"call_type": "outbound",
"analysis_data": {
"key_points": [
"Reminded the customer of the 4,500 rupee EMI due on 12 August.",
"The customer said they will pay this week."
],
"action_items": [],
"summary": "The agent reminded Priya of her EMI due on 12 August. She confirmed she will pay this week.",
"classification": "payment_confirmed",
"callback_requested": false,
"callback_requested_time": null,
"status": "analyzed",
"call_disconnect_reason": "agent_hangup",
"timezone": "Asia/Kolkata"
},
"custom_args_values": {
"callee_name": "Priya",
"emi_amount": "4500",
"due_date": "12 August"
},
"to_number": "+919876543210",
"from_number": "+919876540111",
"bulk_list_id": null,
"called_on": "2026-08-04T12:29:13.310707Z",
"created_at": "2026-08-04T12:29:13.315211Z",
"agent_name": "EMI Reminder",
"version_id": "00000000-0000-4000-8000-0000000000c1",
"version_slug": "v1",
"version_description": "Initial version",
"call_cost": 0.15,
"overall_latency_seconds": 0.892345,
"first_utterance_seconds": 0.456789,
"transcript": [
{ "bot": "Hi Priya, this is Riya from Acme Lending. Your EMI of 4,500 rupees is due on 12 August." },
{ "user": "Yes, I know. I'll pay it this week." },
{ "bot": "Thank you. Have a good day." }
],
"call_duration": 15.73,
"agent_message_count": 3,
"user_message_count": 2,
"tool_call_logs": []
}
```
### Client analysis event
Sent when your [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) completes. `analysis_data` holds the keys you defined; the other fields match the platform analysis event.
```json theme={null}
{
"event_type": "client_analysis_completed",
"entity_type": "call",
"call_id": "00000000-0000-4000-8000-0000000000c4",
"parent_call_id": null,
"call_sid": "00000000-0000-4000-8000-0000000000c2",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"workspace_id": "00000000-0000-4000-8000-0000000000c3",
"status": "completed",
"sub_status": "ACCEPTED",
"call_type": "outbound",
"analysis_data": {
"payment_intent": "will_pay",
"promised_date": "this week",
"dispute_raised": false
},
"custom_args_values": {
"callee_name": "Priya",
"emi_amount": "4500",
"due_date": "12 August"
},
"to_number": "+919876543210",
"from_number": "+919876540111",
"bulk_list_id": null,
"called_on": "2026-08-04T12:29:13.310707Z",
"created_at": "2026-08-04T12:29:13.315211Z",
"agent_name": "EMI Reminder",
"version_id": "00000000-0000-4000-8000-0000000000c1",
"version_slug": "v1",
"version_description": "Initial version",
"call_cost": 0.15,
"overall_latency_seconds": 0.892345,
"first_utterance_seconds": 0.456789,
"transcript": [
{ "bot": "Hi Priya, this is Riya from Acme Lending. Your EMI of 4,500 rupees is due on 12 August." },
{ "user": "Yes, I know. I'll pay it this week." },
{ "bot": "Thank you. Have a good day." }
],
"call_duration": 15.73,
"agent_message_count": 3,
"user_message_count": 2,
"tool_call_logs": []
}
```
### All processing completed event
Sent once recording, transcript and both analyses are done.
```json theme={null}
{
"event_type": "all_processing_completed",
"call_id": "00000000-0000-4000-8000-0000000000c4",
"parent_call_id": null,
"call_sid": "00000000-0000-4000-8000-0000000000c2",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"workspace_id": "00000000-0000-4000-8000-0000000000c3",
"status": "completed",
"sub_status": "ACCEPTED",
"call_type": "outbound",
"call_duration": 15.73,
"called_on": "2026-08-04T12:29:13.310707Z",
"created_at": "2026-08-04T12:29:13.315211Z",
"to_number": "+919876543210",
"from_number": "+919876540111",
"custom_args_values": {
"callee_name": "Priya",
"emi_amount": "4500",
"due_date": "12 August"
},
"bulk_list_id": null,
"agent_name": "EMI Reminder",
"version_id": "00000000-0000-4000-8000-0000000000c1",
"version_slug": "v1",
"version_description": "Initial version",
"call_cost": 0.15,
"agent_message_count": 3,
"user_message_count": 2,
"overall_latency_seconds": 0.892345,
"first_utterance_seconds": 0.456789,
"transcript": [
{ "bot": "Hi Priya, this is Riya from Acme Lending. Your EMI of 4,500 rupees is due on 12 August." },
{ "user": "Yes, I know. I'll pay it this week." },
{ "bot": "Thank you. Have a good day." }
],
"recording_url": "https://recordings.example.com/00000000-0000-4000-8000-0000000000c4.mp3",
"platform_analysis": {
"key_points": [
"Reminded the customer of the 4,500 rupee EMI due on 12 August.",
"The customer said they will pay this week."
],
"action_items": [],
"summary": "The agent reminded Priya of her EMI due on 12 August. She confirmed she will pay this week.",
"classification": "payment_confirmed",
"callback_requested": false,
"callback_requested_time": null,
"status": "analyzed",
"call_disconnect_reason": "agent_hangup",
"timezone": "Asia/Kolkata"
},
"platform_analysis_status": "success",
"client_analysis": {
"payment_intent": "will_pay",
"promised_date": "this week",
"dispute_raised": false
},
"client_analysis_status": "success",
"tool_call_logs": []
}
```
## Linking retries and callbacks to the original call
A scheduled callback and a redial after voicemail are each a separate call with their own `call_id` and their own webhooks. Each carries `parent_call_id`, the `call_id` of the call it came from. A retry after an unanswered attempt keeps the call's `call_id`; its dial history is in `attempts`.
```json theme={null}
{
"event_type": "call_completed",
"call_id": "77aa2802-22d3-4d3d-9e9c-44d67c3d89d7",
"parent_call_id": "00000000-0000-4000-8000-0000000000c4",
"status": "completed",
"sub_status": "ACCEPTED"
}
```
* `parent_call_id` is on every event type, so a child call is linkable from its `call_started`.
* It is `null` for a call dialled directly, never absent: `parent_call_id != null` is a complete test for "this call came from another".
* Scheduled callbacks are flat: every callback points at the original call. Voicemail redials are nested: each attempt points at the one before. To find the original call, follow `parent_call_id` upward until it is `null`, and cap the number of steps.
* The webhook has no flag to tell a callback from a voicemail redial; the [call history API](/api-reference/monitoring/call-history/get-call-history) has the category.
## Example handler
A minimal Express receiver that acknowledges first and branches on `event_type`:
```javascript server.js theme={null}
const express = require("express");
const app = express();
app.use(express.json());
app.post("/webhooks/ringg", (req, res) => {
const event = req.body;
res.status(200).json({ received: true });
switch (event.event_type) {
case "call_completed":
console.log(`Call ${event.call_id}: ${event.status} / ${event.sub_status}`);
break;
case "recording_completed":
console.log(`Recording: ${event.recording_url}`);
break;
case "all_processing_completed":
console.log(`Summary: ${event.platform_analysis?.summary}`);
console.log(`Advanced Analysis: ${JSON.stringify(event.client_analysis)}`);
break;
}
});
app.listen(3000);
```
To have an AI coding tool write the production version for your stack:
Generate a webhook handler for `all_processing_completed`
Write a webhook handler for Ringg AI's `all_processing_completed` event in my project's language and framework. The field reference is at [https://docs.ringg.ai/webhooks/payloads.md](https://docs.ringg.ai/webhooks/payloads.md); read it first. Requirements: respond `200` within 30 seconds before doing any processing; reject requests whose `Authorization` header doesn't match a secret read from an environment variable; deduplicate on `call_id` plus `event_type`, updating the existing record instead of inserting a second one; store `call_id`, `parent_call_id`, `status`, `sub_status`, `call_duration`, `transcript`, `platform_analysis`, `client_analysis`, `platform_analysis_status` and `client_analysis_status`; download `recording_url` to my own storage, because the link may expire. Show the handler, the storage schema and a curl command that posts a sample payload to test it.
Related topics
# Webhook field reference
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/webhooks/field-reference
Every field in Ringg AI webhook payloads, by event, plus the status and sub-status values a call can end with and what each one means.
## Status and sub-status reference
`status` is the call's lifecycle state and `sub_status` refines it. Every call event carries both, except `recording_completed`, which has only `sub_status`.
### `status`
| Value | Meaning |
| - | - |
| `registered` | Registered and queued, not dialled yet. Usual on `call_started`. |
| `ongoing` | Connected, in progress |
| `retry` | The attempt didn't connect; the call will be retried |
| `completed` | Answered and a conversation took place |
| `failed` | Retries exhausted without success |
| `error` | Terminal error, often because the call could never be placed |
| `cancelled` | Ended before connecting (ended by the caller, or rate-limited) |
| `forwarded` | Transferred before connecting (rare) |
### `sub_status`
The values depend on `status`.
* On `registered` and `retry`: `QUEUED`.
* On `ongoing`: `ACCEPTED`.
On `completed`, upper-case:
| Value | Meaning |
| - | - |
| `ACCEPTED` | Connected normally |
| `VOICEMAIL_DETECTED` | Voicemail detected by the telephony provider |
| `VOICEMAIL_DETECTED_VIA_LLM` | Voicemail detected from the transcript |
| `MAX_CALL_DURATION` | Reached the maximum call duration |
| `PHONOS_TIMEOUT` | The voice agent runtime timed out |
On `cancelled`:
| Value | Meaning |
| - | - |
| `USER_TERMINATED` | The caller ended the call before it connected |
| `RATE_LIMITED` | Blocked by rate limiting before connecting |
On `failed` and `error`, `sub_status` is the telephony provider's hangup cause, lower-cased, plus a few Ringg reasons. Treat it as a free-form string, not an enum. Common values:
| Value | Meaning |
| - | - |
| `busy line` | The line was busy |
| `rejected` | Rejected by the callee or carrier |
| `no answer` or `no_answer` | Not picked up |
| `ring timeout reached` | Rang until the timeout |
| `request timeout` | The dial request timed out |
| `declined` | Declined by the callee or carrier |
| `forbidden` | The carrier refused the call (blocked route or number) |
| `unallocated_number` | The number is unallocated or invalid |
| `invalid destination address` | The carrier rejected the destination |
| `network congestion from carrier` | Carrier network congestion |
| `internal error from carrier` | Carrier-side error |
| `routing error` | The carrier could not route the call |
| `network error` | Generic network failure |
| `busy everywhere` | All endpoints busy |
| `loop detected` | The carrier detected a routing loop |
| `not_able_to_call` | Ringg could not place the call (typical with `error`) |
| `retry_limit_reached` | All retries used |
| `user_did_not_join` | The user never joined (for example, a web call) |
| `failed` | The carrier gave no specific reason |
## Field reference
### Common fields
Present on every event unless the per-event notes below say otherwise.
**event\_type** `string` *required*
One of `call_started`, `call_ringing`, `call_ongoing`, `call_completed`, `chat_completed`, `recording_completed`, `platform_analysis_completed`, `client_analysis_completed`, `all_processing_completed`.
**event\_id** `string`
Unique ID of this event. On `call_started`; `call_ringing` and `call_ongoing` don't carry it.
**timestamp** `string`
ISO 8601 time the event was generated, UTC.
**version** `string`
Event schema version, for example `"1.0"`.
**call\_id** `string` *required*
The call's ID.
**parent\_call\_id** `string | null` *required*
The call this one was created from; `null` if dialled directly. See [Linking retries and callbacks](/documentation/build-agents/customize-agent-behaviour/webhooks/call-events#linking-retries-and-callbacks-to-the-original-call).
**call\_sid** `string | null`
The telephony provider's call ID. `null` until the call is dialled.
**agent\_id** `string`
The agent that handled the call. Not on `recording_completed`.
**workspace\_id** `string`
Your workspace ID. Not on `recording_completed`.
**calling\_source** `string`
Telephony provider of the number that placed the call, for example `plivo`, `twilio`, `exotel`, `vobiz`. Only on `call_started` for API, campaign and scheduled calls; not on test calls, web calls or any other event. Can be `null`.
**custom\_args\_values** `object`
The variables you sent when starting the call.
**bulk\_list\_id** `string | null`
The campaign list the call belongs to; `null` for single calls.
**agent\_name** `string`
The agent's display name.
**version\_id** `string`
The agent version used.
**version\_slug** `string`
Slug of the agent version, for example `v1`. Not on `recording_completed`.
**version\_description** `string | null`
Description of the agent version. Not on `recording_completed`.
**call\_cost** `number | null`
Cost of the call in credits; `null` until calculated.
**overall\_latency\_seconds** `number | null`
Total response latency in seconds (sum of the median latencies across metrics).
**first\_utterance\_seconds** `number | null`
Time to the agent's first spoken response, in seconds.
**tool\_call\_logs** `array`
Logs of the [tools](/documentation/build-agents/customize-agent-behaviour/tools/overview) run before and during the call.
### Call started fields
**status** `string`
Normally `registered`; `ongoing` on the second `call_started` a fast-connecting call can send.
**sub\_status** `string`
Normally `QUEUED`; `ACCEPTED` on the `ongoing` variant.
**call\_type** `string`
`outbound` or `webcall`; inbound phone calls don't send `call_started`.
**to\_number** `string`
The number being called.
**from\_number** `string`
The caller ID.
### Call completed fields
Also present on `platform_analysis_completed`, `client_analysis_completed` and `all_processing_completed`.
**status** `string`
`completed`, `failed`, `error`, `cancelled`, `forwarded`, or the interim `retry`. See [Status and sub-status reference](#status-and-sub-status-reference).
**sub\_status** `string`
The reason, for example `ACCEPTED`, `busy line`, `not_able_to_call`.
**call\_type** `string`
`inbound`, `outbound` or `webcall`.
**call\_duration** `number | null`
Seconds; `null` if the call never connected.
**to\_number** `string`
The number that received the call.
**from\_number** `string`
The number that placed the call.
**called\_on** `string`
ISO 8601 time this attempt was dialled, UTC.
**created\_at** `string`
ISO 8601 time the call record was created, UTC.
**transcript** `array`
Turns as `{ "bot": "…" }` and `{ "user": "…" }` entries. Empty if the call never connected.
**agent\_message\_count** `number`
Messages spoken by the agent.
**user\_message\_count** `number`
Messages spoken by the user.
**retry\_count** `number`
Retries so far; `0` on the first attempt. `call_completed` only.
**attempts** `array`
Dial history, oldest first. `call_completed` only.
**attempt**
**status** `string`
That attempt's outcome in the provider's original casing, for example `"Busy Line"` or `"ACCEPTED"`.
**called\_on\_time** `string`
ISO 8601 time the attempt was dialled, UTC.
**recording\_url** `string | null`
`null` on `call_completed`; the recording arrives with `recording_completed` and `all_processing_completed`.
### Recording fields
`recording_completed` carries the common fields except `status`, `agent_id`, `workspace_id`, `version_slug` and `version_description`, plus:
**recording\_url** `string`
Recording URL. It may expire about a day after the event is sent; [Get Call Details](/api-reference/monitoring/call-history/get-call-details) always returns a fresh link.
**recording\_duration** `number`
Recording length in seconds.
**sub\_status** `string`
The call's sub-status.
### Analysis fields
**entity\_type** `string`
`call` for calls, `chat` for WhatsApp chats.
**analysis\_data** `object`
The results. On `client_analysis_completed` the keys are the ones you defined in [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis). On `platform_analysis_completed`:
**platform analysis**
**summary** `string`
Summary of the conversation's purpose and outcome.
**classification** `string`
Category label, for example `payment_confirmed`.
**key\_points** `string[]`
Main takeaways.
**action\_items** `string[]`
Follow-up tasks.
**callback\_requested** `boolean`
Whether the customer asked to be called back.
**callback\_requested\_time** `string | null`
ISO 8601 time of the requested callback.
**status** `string`
`analyzed` when analysis ran.
**call\_disconnect\_reason** `string`
`agent_hangup` or `user_hangup`.
**timezone** `string`
Time zone used for the call.
### All processing completed fields
Every common field, the call completed fields, plus:
**recording\_url** `string`
Same as `recording_completed`'s `recording_url`.
**platform\_analysis** `object`
Same shape as `platform_analysis_completed`'s `analysis_data`.
**platform\_analysis\_status** `string`
`success`, `failed`, `not_enabled` or `cancelled`.
**client\_analysis** `object`
Same shape as `client_analysis_completed`'s `analysis_data`: the keys you defined.
**client\_analysis\_status** `string`
`success`, `failed`, `not_enabled` or `cancelled`.
Related topics
# Webhook setup and errors
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors
Receive Ringg AI call and chat events on your server: subscribe an endpoint, meet the endpoint requirements, use the idempotency key, and handle retries and errors.
Webhooks push an [agent's](/documentation/build-agents/agents/agent-types) call events to your backend as they happen, so you don't poll the Ringg API. The dashboard calls a subscription an **Event Subscription**.
## Before you start
> [card] [An API key](/documentation/manage-account/api-key)
>
> To manage subscriptions with the API.
> [card] [An agent ID](/documentation/build-agents/agents/agent-types)
>
> Subscriptions belong to one agent.
## Event types
| Event type | Fires when | Offered to |
| - | - | - |
| `call_started` | An outbound call or web call begins (not inbound phone calls) | Voice and web agents |
| `call_ringing` | A dashboard test call is dialled; sent with `call_started` | Voice and web agents |
| `call_ongoing` | Same moment as `call_ringing` | Voice and web agents |
| `call_completed` | A call attempt finishes | Voice and web agents |
| `chat_completed` | A WhatsApp conversation ends | WhatsApp agents |
| `recording_completed` | The recording is processed and ready | Voice and web agents |
| `platform_analysis_completed` | Ringg's built-in analysis completes | All agents |
| `client_analysis_completed` | Your [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) completes | All agents |
| `all_processing_completed` | All of the above processing is done | All agents |
Subscribing an agent to an event its channel never fires, such as `chat_completed` on a voice agent, is rejected with `400`.
For most integrations, `all_processing_completed` is enough: one request with the transcript, recording and both analyses. Add earlier events only when your product shows live progress. WhatsApp payloads are in [WhatsApp events](/documentation/build-agents/customize-agent-behaviour/webhooks/whatsapp-chat-events#whatsapp-chat-events).
## Configure subscriptions
### In the dashboard
Open the agent's **Event Subscription** tab, add the callback URL, the events and any headers, and save. The full walkthrough, including the rules the form enforces, is in [Event Subscription](/documentation/build-agents/customize-agent-behaviour/event-subscription).
Adding an event subscription in the dashboard
### With the API
Send [Edit Assistant](/api-reference/agents/edit-assistant) (`PATCH /agent/v1`) with `operation: "edit_event_subscriptions"` and the agent's complete subscription list in `event_subscriptions`.
```bash Subscribe to all_processing_completed theme={null}
curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/agent/v1" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"operation": "edit_event_subscriptions",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"event_subscriptions": [
{
"event_type": ["all_processing_completed"],
"callback_url": "https://api.example.com/webhooks/ringg",
"method_type": "POST",
"headers": {
"Authorization": "Bearer your-webhook-receiver-token"
}
}
]
}'
```
A successful request returns:
```json theme={null}
{
"message": "Agent updated successfully!",
"agent_id": "00000000-0000-4000-8000-0000000000a1"
}
```
Each subscription takes:
**event\_type** `string[]` *required*
One or more events from the table above, delivered to this URL. Put several in one subscription to get live progress and the final result at the same endpoint, for example `["call_started", "call_completed", "all_processing_completed"]`.
**callback\_url** `string` *required*
Your HTTPS endpoint.
**method\_type** `string` *required*
`GET`, `POST`, `PUT` or `PATCH`. Use `POST` unless your endpoint needs otherwise.
**headers** `object`
String keys and values Ringg sends to your endpoint with every event. They don't authenticate your call to Ringg; `X-API-KEY` does that.
Rules for the list:
* The list you send replaces the agent's existing subscriptions. Include every subscription you want to keep; one you leave out is removed. Send `[]` to remove them all.
* Up to 4 subscriptions per event type on one agent, and no `callback_url` and event type pair twice; either fails with `400` ([limits and duplicates](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors#subscription-limits-and-duplicates)).
## Endpoint requirements
* Use HTTPS and accept the method you configured.
* Return a `2xx` status within 30 seconds; see [success criteria](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors#success-criteria). Store the event first, then process it in your own queue.
* Handle the same event arriving twice (next section).
* Log `call_id`, `event_type` and the time you received it, for debugging.
## Idempotency key
Deduplicate on `call_id` plus `event_type` (`chat_id` plus `event_type` for WhatsApp). If a record with that key exists, update it instead of inserting a new one.
```javascript Deduplicate on call_id + event_type theme={null}
app.post("/webhooks/ringg", async (req, res) => {
const event = req.body;
const dedupeKey = `${event.call_id}:${event.event_type}`;
await saveWebhookEventOnce(dedupeKey, event);
res.status(200).send();
});
```
Voicemail redials and callbacks are separate calls with their own `call_id`. Link them with `parent_call_id`; see [Linking retries and callbacks](/documentation/build-agents/customize-agent-behaviour/webhooks/call-events#linking-retries-and-callbacks-to-the-original-call).
## Authentication patterns
Put a secret you control in the subscription's `headers`, which Ringg sends with every event, and reject requests that don't carry it. For example:
* `Authorization: Bearer your-webhook-receiver-token`
* `X-Webhook-Secret: your-shared-secret`
* Authentication at an API gateway in front of your service
## Success criteria
| | Requirement |
| - | - |
| Status | Any `2xx` |
| Response time | Under 30 seconds |
| Body | Optional; any valid JSON |
Anything else is a failed delivery: another status code, no answer within 30 seconds, a refused connection, an invalid TLS certificate or a DNS failure.
## Retry logic
A `4xx` response other than `429` is final and never retried. Other failures are retried:
| Events | Retries |
| - | - |
| `call_started`, `call_ringing`, `call_ongoing` and every WhatsApp chat event | 3 attempts in all, over about 30 seconds. After a `429`, the next attempt waits for your `Retry-After`. |
| `call_completed`, the analysis events and `all_processing_completed` | One attempt straight away, then more attempts later, spread over a longer period |
So return a `5xx` for a temporary problem, not a `4xx`. Because deliveries are retried:
* **The same event can arrive more than once.** Deduplicate on `call_id` plus `event_type` ([idempotency key](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors#idempotency-key)).
* **An event can be lost if your endpoint stays down.** After an outage, fetch the calls you missed with [Get Call History](/api-reference/monitoring/call-history/get-call-history) and [Get Call Details](/api-reference/monitoring/call-history/get-call-details).
Keep the handler fast: store the event, return `2xx`, and do the work afterwards.
## Common configuration issues
### Subscription limits and duplicates
| Situation | Result |
| - | - |
| Several callback URLs for the same event type | Allowed, up to 4 subscriptions per event type on one agent |
| A fifth subscription for the same event type | `400` |
| The same `callback_url` and event type listed twice | `400` |
To send `call_completed` to two URLs, list both in one request:
```bash Two URLs for call_completed theme={null}
curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/agent/v1" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"operation": "edit_event_subscriptions",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"event_subscriptions": [
{
"event_type": ["call_completed"],
"callback_url": "https://crm.example.com/webhooks/calls",
"method_type": "POST"
},
{
"event_type": ["call_completed"],
"callback_url": "https://reports.example.com/webhooks/calls",
"method_type": "POST"
}
]
}'
```
`event_subscriptions` is the agent's complete list, so a later request that sends only the second subscription removes the first. Keep the full list in your own configuration and send it whole on every change.
When several internal services need the same event, one URL that fans out is simpler than several subscriptions:
```javascript Fan out one delivery theme={null}
app.post("/webhooks/unified", async (req, res) => {
const event = req.body;
if (event.event_type === "call_completed") {
await enqueue("crm-sync", event);
await enqueue("reporting", event);
}
res.status(200).json({ received: true });
});
```
### Agent ID errors
A subscription request with a wrong or deleted `agent_id` fails with `404`. List your agents with [Get Assistants](/api-reference/agents/get-assistants) and copy the right `id`:
```bash List agents theme={null}
curl "https://prod-api.ringg.ai/ca/api/v0/agent/all" \
--header "X-API-KEY: $RINGG_API_KEY"
```
### Events not arriving
> [accordion] No requests reach my server
>
> Check that the subscription lists your URL and the event (in the dashboard under the agent's **Event Subscription**, or with [Get Assistant by ID](/api-reference/agents/get-assistant-by-id)). Then confirm the URL is reachable over HTTPS from the public internet with a valid certificate.
> [accordion] recording\_completed never arrives
>
> It fires only for a call that has a recording. Calls that never connected have none; check the call's status in [Logs](/documentation/monitor/logs).
> [accordion] My server rejects the requests with 401
>
> The secret in the subscription's `headers` doesn't match what your endpoint expects. Update the header value and save the full list again.
## Next steps
> [card] [Read the payloads](/documentation/build-agents/customize-agent-behaviour/webhooks/call-events)
>
> Every field Ringg sends for each event, and a handler prompt.
> [card] [Handle failures](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors)
>
> Success criteria, retries and common setup mistakes.
Related topics
# WhatsApp chat events
Source: https://docs.ringg.ai/documentation/build-agents/customize-agent-behaviour/webhooks/whatsapp-chat-events
The chat events a Ringg AI WhatsApp agent sends to your endpoint: chat completed, analysis done and all processing done, with the payload fields and examples.
## WhatsApp chat events
A [WhatsApp agent](/documentation/build-agents/agents/whatsapp-agents/create-an-agent) sends chat events instead of call events. You subscribe in the same [Event Subscription](/documentation/build-agents/customize-agent-behaviour/event-subscription) screen; only the event list and payload differ.
### Events
| Event | Label in the dashboard | Fires when |
| - | - | - |
| `chat_completed` | **Chat Completed** | The chat closes, before any analysis. |
| `platform_analysis_completed` | **Platform Analysis Done** | Platform analysis (summary, key points, action items) succeeds. |
| `client_analysis_completed` | **Advanced Analysis Complete** | Your [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) succeeds. |
| `all_processing_completed` | **All Processing Done** | Everything after the chat has finished. |
They arrive in that order. An analysis event is skipped when its analysis didn't succeed, but `all_processing_completed` still fires and carries the status.
`chat_completed` fires when the chat [closes](/documentation/build-agents/agents/whatsapp-agents/create-an-agent#when-a-chat-opens-and-closes), not after each message.
Call events (`call_started`, `call_ringing`, `call_ongoing`, `call_completed`, `recording_completed`) never fire for a chat and aren't offered on a WhatsApp agent. Subscribing to one through the API returns `400`: *Event type 'call\_completed' is not available for a WhatsApp agent — it can only be produced by a voice call.* Likewise, `chat_completed` can't be added to a voice agent.
### Chat payload
Every chat event carries these base fields. None of them has `call_id` or `call_sid`; use `entity_type` to tell chat events from call events on a shared endpoint.
| Field | Type | Description |
| - | - | - |
| `event_type` | string | One of the four events above. |
| `entity_type` | string | Always `"chat"`. |
| `chat_id` | string | Ringg's chat ID, as shown in **Logs → WhatsApp**. |
| `channel` | string | `"whatsapp"`. |
| `agent_id`, `agent_name` | string | The agent that handled the chat. |
| `version_id`, `version_slug`, `version_description` | string | The [agent version](/documentation/build-agents/test-and-improve/drafts-and-versions) that handled it. |
| `workspace_id` | string | Your workspace. |
| `status` | string | Chat status, for example `completed`. |
| `from_number` | string | The customer's WhatsApp number in E.164, for example `+919876543210`. |
| `to_number` | string | Your business number's Meta phone number ID, not the phone number itself. |
| `custom_args_values` | object | Custom variables for the chat, including values set by pre-call tools. |
| `created_at` | string | When the chat started, ISO 8601. |
| `transcript` | array | Messages in order, each an object with one key, `user` or `bot`. Text only. |
Each event adds:
| Event | Extra fields |
| - | - |
| `chat_completed` | none beyond the base fields |
| `platform_analysis_completed` | `analysis_data`, `platform_analysis_status` |
| `client_analysis_completed` | `analysis_data`, `client_analysis_status` |
| `all_processing_completed` | `platform_analysis`, `platform_analysis_status`, `client_analysis`, `client_analysis_status`, `classification` |
```json chat_completed theme={null}
{
"event_type": "chat_completed",
"entity_type": "chat",
"chat_id": "b6107fbd-1f1a-4382-88f6-781c2f6ea787",
"channel": "whatsapp",
"agent_id": "d81e3938-b8e1-42e4-bc5b-f8ea754a81c5",
"agent_name": "Acme Renewals WhatsApp",
"workspace_id": "0e9d8c7b-6a5f-4e3d-2c1b-0a9f8e7d6c5b",
"status": "completed",
"version_id": "6a3e05c1-51f0-4e54-b01c-bf8b15909120",
"version_slug": "v1",
"version_description": null,
"from_number": "+919876543210",
"to_number": "109876543210987",
"custom_args_values": { "name": "Priya" },
"created_at": "2026-09-24T10:29:46.123+00:00",
"transcript": [
{ "user": "Hi, I want to renew my policy" },
{ "bot": "Hi Priya! Happy to help. Which plan are you on?" },
{ "user": "Family Health Plus" },
{ "bot": "I've sent your renewal link on WhatsApp. It's valid for 7 days." }
]
}
```
```json all_processing_completed theme={null}
{
"event_type": "all_processing_completed",
"entity_type": "chat",
"chat_id": "b6107fbd-1f1a-4382-88f6-781c2f6ea787",
"channel": "whatsapp",
"agent_id": "d81e3938-b8e1-42e4-bc5b-f8ea754a81c5",
"agent_name": "Acme Renewals WhatsApp",
"workspace_id": "0e9d8c7b-6a5f-4e3d-2c1b-0a9f8e7d6c5b",
"status": "completed",
"version_id": "6a3e05c1-51f0-4e54-b01c-bf8b15909120",
"version_slug": "v1",
"version_description": null,
"from_number": "+919876543210",
"to_number": "109876543210987",
"custom_args_values": { "name": "Priya" },
"created_at": "2026-09-24T10:29:46.123+00:00",
"transcript": [
{ "user": "Hi, I want to renew my policy" },
{ "bot": "Hi Priya! Happy to help. Which plan are you on?" }
],
"platform_analysis": {
"summary": "Customer asked to renew Family Health Plus and received the renewal link.",
"key_points": ["Wants to renew", "On Family Health Plus"],
"action_items": ["Follow up if not renewed in 7 days"]
},
"platform_analysis_status": "success",
"client_analysis": { "renewal_intent": "high" },
"client_analysis_status": "success",
"classification": "renewal_link_sent"
}
```
### Common questions
> [accordion] Why did chat\_completed arrive hours after the last message?
>
> The chat closes only when the agent calls **End Chat** or the agent's idle timeout passes (3 hours by default). Lower **End the chat after no messages for** under **Chat → Settings** if you need the event sooner.
> [accordion] Can one endpoint receive both call and chat events?
>
> Yes. Subscribe it on each agent and branch on `entity_type` ([payload](#chat-payload)). To read a chat while it is still open, use [Logs → WhatsApp](/documentation/monitor/logs#whatsapp-chats).
Related topics
# Drafts and versions
Source: https://docs.ringg.ai/documentation/build-agents/test-and-improve/drafts-and-versions
Save and publish Ringg AI agent changes, create versions, split call traffic for A/B tests, compare results and finalize a winner, or call a version by API.
A version is a complete copy of an agent's configuration (prompt or flow, voice, tools and settings) that you can edit and send calls to on its own. Every agent starts with one version, `v1`. Add more versions when you want to A/B test a change on real traffic before you commit to it; for a one-off fix, edit the agent and save or publish instead.
In the dashboard: **Sidebar → Assistants →** open an agent. Single-prompt agents use **Create Versions** in the editor sidebar; [multi-prompt agents](/documentation/build-agents/agents/multi-prompt-agents/overview) use the version tabs above the canvas.
## Before you start
> [card] [An agent](/documentation/build-agents/agents/create-an-agent)
>
> Ideally already [tested](/documentation/build-agents/test-and-improve/test-an-agent) with the change you want to split traffic on.
> [card] [An API key](/documentation/manage-account/api-key)
>
> Optional: only to call a specific version from your backend.
## How changes go live
Single-prompt and multi-prompt agents save changes differently.
| | Single-prompt agent | Multi-prompt agent |
| - | - | - |
| Prompt or flow edits | Held as unsaved edits until you click **Save** (or press Cmd/Ctrl+S) | Written to a draft as you edit |
| Other settings | Most save as soon as you change them | Saved to the draft |
| Top bar while changes are pending | **Discard** and **Save** | **Discard** and **Publish** |
| What makes changes live | **Save** | **Publish**, then confirm |
| Testing | Save first; **Test assistant** returns after saving | Publish or discard first; **Test assistant** returns after |
### Save changes on a single-prompt agent
**Save** (or Cmd/Ctrl+S) stores the prompt on the version you are viewing; **Discard** throws the unsaved edits away. The editor's save behaviour is in [Save or discard](/documentation/build-agents/customize-agent-behaviour/agent-prompt#save-or-discard).
### Publish changes on a multi-prompt agent
Edits on the canvas, in node panels and in **Global Settings** go into a draft, and a banner above the canvas reads **This workflow has unpublished changes** (or **This workflow has not yet been published** for a new agent). Callers keep getting the last published flow until you publish.
**1. Publish**
Click **Publish** in the top bar. The **Publish Changes** dialog asks: "Are you sure you want to publish these changes? This will make them live." Click **Publish**.
**2. Fix issues if the publish is rejected**
Ringg checks the flow on every publish. If it finds problems, the banner turns red with "Review and resolve each issue before publishing." Click **Review issues**, open each issue to jump to the node or connection, fix it and publish again ([connection rules](/documentation/build-agents/agents/multi-prompt-agents/node-types-and-connections#connection-rules)).
> [!TIP]
>
> The draft banner disappears and **Test assistant** returns to the top bar. [Test the agent](/documentation/build-agents/test-and-improve/test-an-agent) to hear the published flow.
**Discard** reverts the draft to the last published version. Its dialog warns: "Are you sure you want to discard all changes? This action cannot be undone." Discard stays available even when the draft has issues.
If a draft already exists when you open the agent (for example, from an earlier session or the [MCP server](/resources/mcp-server/workspace-mcp-server/overview)), the editor opens in draft mode and shows **Draft Mode Enabled**.
## A/B test a single-prompt agent
An A/B test (Sending part of real call traffic to each of two or more versions and comparing results.) splits calls between versions of the same agent:
```mermaid theme={null}
flowchart LR
C[Calls to the agent] -->|70%| V1[V1]
C -->|30%| V2[V2]
V1 --> A[A/B Analytics]
V2 --> A
A -->|Finalize| W[Winner gets 100%]
```
The video turns on Create Versions, adds V2, adds a note to it, and splits traffic 70/30.
Adding a version and splitting traffic in the dashboard
**1. Turn on versions**
In the editor sidebar under **Advanced Settings**, switch on **Create Versions** ("A/B Testing Enabled — You can now create multiple versions"). A version bar appears above the editor, showing **V1**.
**2. Add a version**
Click **+** in the version bar. With one version, the new one copies it. With two or more, pick the **Base** version to copy from. An agent can have up to 5 versions.

The version bar after adding V2
**3. Edit the new version**
Click a version to switch to it, then change its prompt or settings. Each version keeps its own configuration ([prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt), [voice](/documentation/build-agents/customize-agent-behaviour/voice-and-language), [variables](/documentation/build-agents/customize-agent-behaviour/custom-variables), [knowledge base](/documentation/build-agents/customize-agent-behaviour/attach-a-knowledge-base)). Open a version's menu to **Add notes**, **Copy version ID** ([use it in the API](#call-a-specific-version-with-the-api)), or **Delete version** (offered when more than one version exists).
**4. Assign traffic**
Click the gear in the version bar and choose **Assign Traffic** ("Split calls among different assistant versions"). Set each version's share with its slider and click **Save**; it stays greyed out until the running total reads 100%.

Assign Traffic with a 70/30 split
**5. Compare results**
From the same gear menu, choose **View Analytics**. **A/B Analytics** compares the versions over the last 7 days.
**6. Finalize the winner**
Once two or more versions exist, the sidebar row reads **A/B Tests Live!** with a **Finalize** button. Click it, select the winning version in the analytics table, and click **Confirm & Finalize**. All traffic goes to that version and A/B testing is turned off ("Version \[slug] is now live. A/B testing has been disabled.").
> [!TIP]
>
> New calls use the winning version only. Review the calls in [Logs](/documentation/monitor/logs).
A green dot next to a version means it receives traffic; a red dot means 0%. Deleting a version asks for confirmation and warns: "If you delete, all traffic will shift to other versions uniformly." Its share is split equally among the remaining versions: delete the 50% version of a 50/30/20 split and the others get 55/45.
WhatsApp agents do not offer **Create Versions**; the row appears only while a test is already live, so you can finalize it.
## A/B test a multi-prompt agent
The multi-prompt editor has no switch that starts an A/B test; to start one on a multi-prompt agent, contact Ringg. On a multi-prompt agent where A/B testing is already live, version tabs (`V1`, `V2` …) appear above the canvas:
* **Switch versions:** click a tab. The canvas and Global Settings load that version, and your edits apply to it.
* **Add a version:** click **+** at the end of the tabs. The editor switches to the new version.
* **Delete a version:** open the tab's **…** menu and choose **Delete version** (shown when more than one version exists). It is deleted at once, with no confirmation.
* **Split traffic:** click the gear to open **Manage Traffic Split**, set each version's slider and click **Save Changes**.
The multi-prompt editor has no **Finalize** action. To send all calls to one version, delete the others.
## Traffic split rules
| Rule | Single-prompt (**Assign Traffic**) | Multi-prompt (**Manage Traffic Split**) |
| - | - | - |
| Total | Must equal exactly 100% to save | Must equal exactly 100% to save |
| Step | 5% | 5% |
| Minimum per version | 0% | 5% |
| Maximum versions | 5 | 5 |
Calls are shared between versions in proportion to their traffic. Each API, inbound or workflow call picks a version at random, weighted by the split. A campaign divides its contact list by count, in list order: with 70/30, roughly the first 70% of the list goes to one version, so shuffle the list if its order matters. A retry keeps its call's version, and a callback uses the version of the call it follows up. Each call records the version it used: see `version_slug` in [webhook payloads](/documentation/build-agents/customize-agent-behaviour/webhooks/call-events) (sent by [Event Subscription](/documentation/build-agents/customize-agent-behaviour/event-subscription)) and `agent.version` in [call history](/api-reference/monitoring/call-history/get-call-history).
## Call a specific version with the API
[Initiate Individual Call](/api-reference/calling/individual-calls/initiate-individual-call) accepts an optional `version_id`. With it, the call uses that version and skips the traffic split. Without it, the call uses the agent's active version, or follows the traffic split while an A/B test runs. Campaigns can't pin a version. Copy a single-prompt version's ID from its menu in the version bar.
Send your [API key](/documentation/manage-account/api-key) in `X-API-KEY`. `from_number` is the [caller ID](/documentation/inventory/phone-numbers/inbound-agent-number#outbound-choose-the-caller-id).
```bash cURL theme={null}
curl -X POST https://prod-api.ringg.ai/ca/api/v0/calling/outbound/individual \
-H "X-API-KEY: $RINGG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Priya Sharma",
"mobile_number": "+919876543210",
"agent_id": "b1972188-038e-4605-916c-3926e9d7bde4",
"from_number": "+919876500000",
"version_id": "e301689c-3701-4665-9b1a-06cc12a88974"
}'
```
```javascript JavaScript theme={null}
const response = await fetch("https://prod-api.ringg.ai/ca/api/v0/calling/outbound/individual", {
method: "POST",
headers: {
"X-API-KEY": process.env.RINGG_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Priya Sharma",
mobile_number: "+919876543210",
agent_id: "b1972188-038e-4605-916c-3926e9d7bde4",
from_number: "+919876500000",
version_id: "e301689c-3701-4665-9b1a-06cc12a88974",
}),
});
console.log(await response.json());
```
```python Python theme={null}
import os
import requests
response = requests.post(
"https://prod-api.ringg.ai/ca/api/v0/calling/outbound/individual",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
json={
"name": "Priya Sharma",
"mobile_number": "+919876543210",
"agent_id": "b1972188-038e-4605-916c-3926e9d7bde4",
"from_number": "+919876500000",
"version_id": "e301689c-3701-4665-9b1a-06cc12a88974",
},
)
print(response.json())
```
[Initiate Individual Call v2](/api-reference/calling/individual-calls/initiate-individual-call-v2) takes the same optional `version_id` and calls from a [number pool](/documentation/inventory/phone-numbers/number-pools). Pinning a version lets you test a new version from your backend before you give it traffic.
## Next steps
> [card] [Before a voice agent goes live](/documentation/build-agents/customize-agent-behaviour/voice-and-language#before-a-voice-agent-goes-live)
>
> The checklist before a phone agent goes live.
> [card] [Run a campaign](/documentation/deploy/campaigns/create-a-campaign)
>
> Send real traffic through the split.
> [card] [Compare versions in Analytics](/documentation/monitor/analytics)
>
> Tick the agent, then untick all but the ones you want in the charts.
# Test an agent
Source: https://docs.ringg.ai/documentation/build-agents/test-and-improve/test-an-agent
Test a Ringg AI agent before going live: place a phone call to a verified number, run a web call or live chat in the browser, then review the call in Logs.
Test after every prompt or settings change, and always before you attach a live number or start a campaign. Repeat the loop until the agent behaves: edit, save or publish, test, check the call in [Logs](/documentation/monitor/logs).
In the dashboard: **Sidebar → Assistants →** open an agent **→ Test assistant**.
This section is the loop between a change and going live: test here, ship the change with [drafts and versions](/documentation/build-agents/test-and-improve/drafts-and-versions) (A/B test it on live traffic if you want), and run through [go-live checklist](/documentation/build-agents/customize-agent-behaviour/voice-and-language#before-a-voice-agent-goes-live) before an agent that makes or answers phone calls goes live. After it, [Workflows](/documentation/build-agents/workflows/overview) chains several conversations per contact, and **Inventory** covers the [phone numbers](/documentation/inventory/phone-numbers/overview) your agents call from.
## Before you start
> [card] [An agent](/documentation/build-agents/agents/create-an-agent)
>
> Saved or published with the change you want to hear.
## Ways to open a test
| From | Click | What opens |
| - | - | - |
| The agent editor | **Test assistant** (top bar) | The test dialog |
| The **Agents** list | The row's options menu **→ Test** | The editor, with the test dialog open |
| A call in [Logs](/documentation/monitor/logs) | The call's menu **→ Test this agent** | The editor, with the test dialog open on the same channel and pre-filled with that call's number and variables |
**Test assistant** is hidden while you have unsaved changes. In a single-prompt agent the top bar shows **Discard** and **Save** instead; in a multi-prompt agent it shows **Discard** and **Publish**. Save or publish first, then test.
## Test options
The dialog is titled **Test** followed by the agent name, with the line "Run a live test before you go to production." It has three tabs.
| Tab | What happens | What you need |
| - | - | - |
| **Phone call** | Ringg calls a real phone from a number you pick | A caller number (The number your phone shows when the agent calls.) and a callee number you control ([verification](#test-numbers-and-verification)) |
| **Web call** | You talk to the agent in the browser | A microphone and browser permission to use it |
| **Live chat** | You type to the agent and it replies in text | Nothing extra |
Each tab shows one field per [custom variable](/documentation/build-agents/customize-agent-behaviour/custom-variables), so you can test with realistic values (for example `callee_name` = Priya, `due_date` = 15 October). Variables are optional. On a web call or live chat with no variables, the tab says "Nothing to fill in".
In a [multi-prompt agent](/documentation/build-agents/agents/multi-prompt-agents/test-and-convert#test-a-multi-prompt-agent), **Test assistant** is a menu of the same three modes; web call and live chat run in a side panel next to the canvas.
## In the dashboard
The video opens the test dialog, looks at the three tabs, and places a phone call with variables filled in.
Testing an agent with a phone call in the dashboard
**1. Choose the caller number**
Under **Choose a number**, pick the number the agent calls from. The list is grouped into **Test numbers**, **Your numbers** and **In use** (already attached to an agent; listed but not selectable). When a Ringg test number is available, it is picked by default ([test number rules](#test-numbers-and-verification)). To call from your own number, [buy or import one](/documentation/inventory/phone-numbers/buy-or-import-a-number) first.
**2. Enter the callee number**
In **Callee number**, enter a phone you can answer, in international format (`+91 98765 43210`). The field's hint reads "Use a number you control for testing. Don't use customer numbers." Numbers you have verified before are in the field's dropdown under **Verified numbers**.
If you picked a test number for the wrong region, the dialog says "To call India, use the IN test number or one of your purchased numbers." (or the outside-India version) and **Start** stays disabled.
**3. Fill in variables (optional)**
Enter values for the agent's [variables](/documentation/build-agents/customize-agent-behaviour/custom-variables). `mobile_number` is filled from **Callee number**.
**Smart formatter** "Cleans up the callee name before the call." Its settings: **Extract first name** (on by default; skips prefixes like Mr, Mrs, Dr, Shri) and **Transliteration** (off by default; converts the name to a target language; enter **Source** and **Target** codes such as `en` and `hi`). Campaigns offer the same option ([Transliteration](/documentation/deploy/campaigns/calling-list#transliteration)).

The Phone call tab, ready to start
**4. Click Start and verify the number**
If the callee number is not yet verified, Ringg sends a 6-digit code to that number on WhatsApp. The **Verify number** screen opens: enter the code and the call is placed straight away. **Resend** sends a new code; the pencil next to the number lets you change it. Workspaces that have completed KYC (Company details you submit under Settings so Ringg can verify your business.) skip this screen.
**5. Answer the call**
The dialog shows the call's status, the number being called and the agent's caller number. **Call details** lists the variables sent. The status refreshes until the call ends. **Redial** places the call again; there is no hang-up button, so end the call from your phone.
> [!TIP]
>
> Your phone rings, the agent speaks its first message, and the call appears in [Logs](/documentation/monitor/logs) when it ends.
A test call is dialled at once: it ignores the calling window and call limits, and it is never retried. It costs credits like any other call, so it needs enough balance to start. Test calls are rate-limited; if you place many in a row, wait a minute and try again.

A placed test call with Call details open
For a **Web call** or **Live chat**, fill in variables and click **Start**. During a web call, the button at the bottom mutes and unmutes your microphone. Closing the dialog asks "End this call?" (or "End this chat?"); the form keeps what you typed.

The Web call tab
### WhatsApp agents
A WhatsApp agent's dialog has no tabs. It says "Scan to start a WhatsApp chat" and shows a QR code for the agent's WhatsApp number, with **Open in WhatsApp**. If no number is attached, it says "No number attached" and "Attach a WhatsApp number, then reopen Test assistant." See [attach a WhatsApp number](/documentation/build-agents/agents/whatsapp-agents/create-an-agent#attach-a-whatsapp-number) and [test from your phone](/documentation/build-agents/agents/whatsapp-agents/create-an-agent#test-from-your-phone).
## With the API
Place one call with [Initiate Individual Call](/api-reference/calling/individual-calls/initiate-individual-call), sending your [API key](/documentation/manage-account/api-key) in `X-API-KEY`. The dialog's **cURL** button copies the request for the test you set up.
```bash cURL theme={null}
curl -X POST "https://prod-api.ringg.ai/ca/api/v0/calling/outbound/individual" \
-H "X-API-KEY: $RINGG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Priya Sharma",
"mobile_number": "+919876543210",
"agent_id": "b1972188-038e-4605-916c-3926e9d7bde4",
"from_number_id": "",
"custom_args_values": {
"callee_name": "Priya",
"due_date": "15 October"
}
}'
```
```javascript JavaScript theme={null}
const response = await fetch("https://prod-api.ringg.ai/ca/api/v0/calling/outbound/individual", {
method: "POST",
headers: {
"X-API-KEY": process.env.RINGG_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Priya Sharma",
mobile_number: "+919876543210",
agent_id: "b1972188-038e-4605-916c-3926e9d7bde4",
from_number_id: "",
custom_args_values: {
callee_name: "Priya",
due_date: "15 October",
},
}),
});
console.log(await response.json());
```
```python Python theme={null}
import os
import requests
response = requests.post(
"https://prod-api.ringg.ai/ca/api/v0/calling/outbound/individual",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
json={
"name": "Priya Sharma",
"mobile_number": "+919876543210",
"agent_id": "b1972188-038e-4605-916c-3926e9d7bde4",
"from_number_id": "",
"custom_args_values": {
"callee_name": "Priya",
"due_date": "15 October",
},
},
)
print(response.json())
```
* `name`, `mobile_number` and `agent_id` are required, plus exactly one of `from_number_id` or `from_number` ([choose the caller ID](/documentation/inventory/phone-numbers/inbound-agent-number#outbound-choose-the-caller-id)). Find the `agent_id` in the editor ([Find the agent ID](/documentation/build-agents/agents/agent-types#find-the-agent-id)).
* Get `from_number_id` from [Get Workspace Numbers](/api-reference/inventory/numbers/get-workspace-numbers).
* `version_id` is optional. Without it the call uses the agent's active version, or follows the traffic split while an A/B test runs. Pass it to test a specific [version](/documentation/build-agents/test-and-improve/drafts-and-versions).
* A call placed with an API key is a live call, not a test call: it follows the calling window, call limits and retries, and it can't use a Ringg test number.
> [!TIP]
>
> The response includes `data.call_id` and `data.call_status` (for example `registered` or `ongoing`). Use the `call_id` with [Get Call Details](/api-reference/monitoring/call-history/get-call-details) to read the transcript and analysis.
## Test numbers and verification
| Rule | Detail |
| - | - |
| Ringg test numbers are region-bound | The +91 test number calls only Indian numbers; the other test numbers call only outside India ([test numbers](/documentation/inventory/phone-numbers/overview#test-numbers)). Your own numbers can call anywhere. |
| Default caller number | A test number that matches your workspace's currency (INR picks the +91 number) |
| Callee verification | Each callee number is verified once, with a 6-digit WhatsApp code, then remembered for the workspace |
| Skip verification | Workspaces that have completed KYC, and enterprise workspaces, skip it. **Complete KYC** in the dialog opens **Company details** ([Company details (KYC)](/documentation/manage-account/members#company-details-kyc)) and brings you back to the test after you save. |
## Check the result in Logs
Open [Logs](/documentation/monitor/logs) in the sidebar, or use **History** in the agent's row menu to see only that agent's calls. Click the test call to open its details ([the call panel](/documentation/monitor/logs#the-call-panel)):
| Tab | What to check |
| - | - |
| **Call details** | The recording, call latency (when the first utterance began), the **Custom variables** the call received, and any call transfer |
| **Advanced analysis** | Shown when the agent has [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) set up: did it extract the right values? |
| **Transcript** | The full conversation, turn by turn |
| **Evals** | Shown when [evals](/documentation/monitor/evals) ran on the call |
Analysis runs after the call ends, so for a short while you may see "General analysis is currently under process!". Logs doesn't mark a call as a test: its **Origin** shows **API**.
A quick checklist for every test:
* The [first message](/documentation/build-agents/customize-agent-behaviour/agent-prompt#what-the-prompt-section-holds) plays, and variables are spoken with the values you entered.
* The agent follows the script and answers questions from its [knowledge base](/documentation/build-agents/customize-agent-behaviour/attach-a-knowledge-base).
* [Tools](/documentation/build-agents/customize-agent-behaviour/tools/overview) fire when expected, and transfers reach the right number.
* The agent switches language when you do, if it has a [secondary language](/documentation/build-agents/customize-agent-behaviour/voice-and-language#languages).
* The call ends cleanly, and the [analysis fields](/documentation/build-agents/customize-agent-behaviour/advanced-analysis#where-results-appear) are filled in.
## Troubleshooting
> [accordion] The verification code never arrived
>
> The code goes to the callee number on WhatsApp, so that number must use WhatsApp. Click **Resend**, or use the pencil next to the number to change it.
> [accordion] Do I need a number of my own before I can test?
>
> Only to call outside the test number's region, or to place calls from the API or a campaign.
## Next steps
> [card] [Attach a number](/documentation/inventory/phone-numbers/inbound-agent-number)
>
> Put an inbound agent live on a phone number.
> [card] [Run a campaign](/documentation/deploy/campaigns/create-a-campaign)
>
> Call a list of contacts once your tests pass.
> [card] [Read call logs](/documentation/monitor/logs)
>
> Filter, search and inspect every call.
# Workflow block reference
Source: https://docs.ringg.ai/documentation/build-agents/workflows/block-reference
Every Ringg AI workflow block and its settings: Agent in call or chat mode (WhatsApp, SMS, email), Conditional, Await and Action, with what each passes to later steps.
## Block reference
| Block | Purpose | Required to publish |
| - | - | - |
| **Agent**, **Call** mode | Voice call with one of your [agents](/documentation/build-agents/agents/create-an-agent). One branch out. | An agent and at least one caller [number](/documentation/inventory/phone-numbers/buy-or-import-a-number) |
| **Agent**, **Chat** mode | WhatsApp, SMS or email message, optionally with a chat agent ([WhatsApp agent](/documentation/build-agents/agents/whatsapp-agents/create-an-agent)). One branch out. | A channel, plus a template or chat agent (WhatsApp), or a body or chat agent (SMS, email). Email also needs **To** and **Subject**. To send, a WhatsApp block needs both a template and a chat agent. |
| **Conditional** (card titled **Condition**) | Branch on data from earlier steps, including [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) fields. Branches out to **Match** or **No match**. | At least one complete rule |
| **Await** | Pause the run. One branch out; Event mode adds **Timeout**. | A duration, a resume time, or an event name |
| **Action** | HTTP request to any API or CRM, authenticated through a [workspace tool](/documentation/build-agents/customize-agent-behaviour/tools/workspace-tools#workspace-tools) if needed. One branch out. | A URL; a valid JSON body for POST, PUT, PATCH |
Each block's full settings:
> [accordion] Agent: Call
>
> Switching between **Call** and **Chat** keeps the block's position, connections and the other mode's settings.
>
> | Setting | Values and defaults |
> | - | - |
> | Agent | Pick an agent, or **Add new** to [create one](/documentation/build-agents/agents/create-an-agent). Changing the agent clears its variable mapping. If a [call limit](/documentation/manage-account/call-limits) applies to the agent or workspace, a line under the picker states it, for example "Workspace call limit 3 calls / 24 hours per person. Retries count toward it." |
> | **Variables** | Shows `mapped/total`. Opens **Map variables** to fill every variable the agent's prompt uses. See [Feed an agent its variables](/documentation/build-agents/workflows/build-a-workflow#feed-an-agent-its-variables). |
> | **From** | One or more workspace numbers to call from. [Buy or import a number](/documentation/inventory/phone-numbers/buy-or-import-a-number) if the list is empty. |
> | **Call window** (The hours of the day in which this block may place calls.) | Earliest and latest call time. Default 09:00 to 18:00, in your browser's time zone when you edit it. The block waits up to 6 hours for the call's result; after that the run moves on without it. |
> | **Retries** | 0 to 10. Default 0. |
> | Retry gaps (when Retries is above 0) | Minutes to wait after **Busy** (default 15), **No answer** (default 30) and **Failed** (default 60). Minimum 1. |
> [accordion] Agent: Chat
>
> | Setting | Values and defaults |
> | - | - |
> | **Channel** | **WhatsApp** (default), **SMS**, **Email**. |
> | **Chat assistant (optional)** | A chat agent that takes over the conversation. See [Create a WhatsApp agent](/documentation/build-agents/agents/whatsapp-agents/create-an-agent). |
> | **Template** (WhatsApp) | WhatsApp template name. Needed to send, together with a chat agent on the **From** number. Template variables can't be filled from the block. The message goes to the contact's number from the campaign list. |
> | **From** (WhatsApp) | Your WhatsApp phone number ID. See [WhatsApp](/documentation/build-agents/agents/whatsapp-agents/overview) and [connect WhatsApp Business](/documentation/inventory/tools-integrations/connect-whatsapp). |
> | **To** (SMS, email) | Recipient. Accepts variables, for example `{{callee.mobile_number}}`. |
> | **Subject** (email) | Required for email. |
> | **Body** (SMS, email) | Message text with variables. Optional when a chat agent is selected. |
> | **Via** (SMS, email) | A connected integration ([workspace tools](/documentation/build-agents/customize-agent-behaviour/tools/workspace-tools#workspace-tools)) to send through, or **None**. SMS needs one whose credentials include an `endpoint` and an `api_key`: Ringg sends `POST` `{"to": …, "text": …}` to the endpoint with `Authorization: Bearer `, and only HTTP `200` counts as sent. Email ignores **Via**; Ringg sends it. |
> [accordion] Conditional
>
> A Condition block checks its rules and sends the run down **Match** or **No match**. With two or more rules, choose **All** or **Any**. With no rules, every run takes **Match**.
>
> Each rule has a source, a field and a comparison:
>
> | Source | Reads | Pick |
> | - | - | - |
> | **Call status** | Status of an earlier Agent block's call, typed as free text. Usually `completed`, `failed`, `error` or `cancelled`, in lowercase | The block |
> | **Call duration** | Seconds the call lasted | The block |
> | **Retry count** | Retries the call used | The block |
> | **Custom variable** | A workflow input variable or the callee's name or number | The variable |
> | **Custom analysis** | A field from the agent's [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) | The block, then the field |
> | **Platform analysis** | **Call sentiment** or **Call summary** | The block, then the field |
> | **Tool response** | A field of an earlier Action block's JSON response | The block, then the field name |
> | **Custom path** | Any path, typed or picked | The path |
>
> Comparisons: **is**, **is not**, **contains**, **does not contain**, **is over**, **is at least**, **is under**, **is at most**, **is one of**, **is none of**. Text comparisons are exact and case-sensitive: `Completed` doesn't match `completed`. For **is one of** and **is none of**, separate values with commas (`paid, promised`). **Call duration** and **Retry count** take numbers and offer only **is**, **is not**, **is over**, **is at least**, **is under** and **is at most**.
>
> If exactly one suitable block is upstream, it is picked for you. "Connect an agent upstream" means the Condition has no Agent block before it.
> [accordion] Await
>
> | Mode | Settings |
> | - | - |
> | **Duration** | Amount and unit (**minutes**, **hours**, **days**). Default 1 hour. Presets: 15m, 30m, 1h, 2h, 1d. |
> | **Time**, **Fixed** | A date and time to resume at. |
> | **Time**, **Variable** | A date field from an upstream agent's [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis), plus an offset **before** or **after** it (for example, 2 hours before the promised payment date). |
> | **Event** | An event name (for example `crm_interview_done`) and a **Fallback timeout** (default 48 hours). "If the event never arrives, the run takes the Timeout branch after this long." |
>
> Leaving Event mode removes the Timeout branch and its connection. The dashboard doesn't show how an outside system sends the event to a waiting run, so ask Ringg support before you build on Event mode.
> [accordion] Action
>
> | Setting | Values and defaults |
> | - | - |
> | Method | **GET** (default), **POST**, **PUT**, **PATCH**, **DELETE**. |
> | Request URL | Required. Accepts variables, for example `https://api.example.com/leads/{{callee.custom_args.id}}`. |
> | **Headers** | Name and value rows. **Add header** adds one. |
> | **Body** | POST, PUT and PATCH only. Must be a valid JSON object. Accepts variables. |
> | **Timeout** | 1 to 120 seconds. Default 15. |
> | **Auth** | A connected integration to authenticate with, or **None**. See [workspace tools](/documentation/build-agents/customize-agent-behaviour/tools/workspace-tools#workspace-tools). |
>
> Later blocks can read fields from the Action's JSON response, under **Tool response** in a Condition or from the [variable menu](/documentation/build-agents/workflows/build-a-workflow#insert-a-variable) in any text field.
Related topics
# Build a workflow
Source: https://docs.ringg.ai/documentation/build-agents/workflows/build-a-workflow
Create a Ringg AI workflow on the canvas: add call, wait, condition, action and message blocks, pass variables and data between steps, duplicate or archive it.
This page covers building a [workflow](/documentation/build-agents/workflows/overview). [Test and publish](/documentation/build-agents/workflows/test-and-publish) and the [block reference](/documentation/build-agents/workflows/block-reference#block-reference), with every setting, have their own pages; launching it at a list of contacts is [Launch a workflow campaign](/documentation/deploy/campaigns/workflow-campaign#workflow-campaigns), in the Campaigns section of **Deploy**. If you only need one conversation with several stages, a [multi-prompt agent](/documentation/build-agents/agents/multi-prompt-agents/overview) is simpler.
In the dashboard: **Sidebar → Workflows → Create workflow**.
## Before you start
> [card] [An agent for each Agent block](/documentation/build-agents/agents/create-an-agent)
>
> Voice agents for calls, WhatsApp agents for chats.
> [card] [A phone number](/documentation/inventory/phone-numbers/buy-or-import-a-number)
>
> Every call step needs a caller number from your workspace.
> [card] [WhatsApp Business connected](/documentation/inventory/tools-integrations/connect-whatsapp)
>
> Optional: only for Chat steps on WhatsApp.
## Create a workflow
The video builds a payment-reminder workflow with every block type (a call, a branch on whether the customer promised to pay, a CRM update, a one-day wait and a WhatsApp nudge), then saves, publishes and tests it.
Building, publishing and testing a workflow
**1. Open a blank canvas**
Go to **Workflows** and click **Create workflow**. The editor opens with a **Start** marker. Nothing is saved yet.
**2. Name it**
Click the name in the breadcrumb at the top, type a name such as "Payment reminder follow-up", and press Enter.
**3. Add blocks**
* Drag a block from the **Blocks** panel (bottom left) onto the canvas, or click it to drop it in the middle of the view.
* Click the **+** connector on the right of a block (or of Start) and pick the next block: it is added and connected in one step.
* Drag from a connector into empty canvas: the most likely next block is added, already connected.
**4. Connect the blocks**
Drag from a block's right-hand connector to the next block's left edge. Start must connect to your first block.
**5. Configure each block**
Every setting is edited on the block's card; the [block reference](/documentation/build-agents/workflows/block-reference#block-reference) lists them.

A call, a branch, then a CRM update or a wait and a WhatsApp nudge
**6. Save**
Click **Save** in the top bar. There is no autosave. The first save creates the workflow as a **Draft**.
\[!TIP] You see "Workflow saved".
### Editor controls
| Control | What it does |
| - | - |
| **Variables** (top bar) | Declares the workflow's input variables. See [Variables](#variables-and-data-between-steps). |
| **Save** | Shown while you have unsaved changes. |
| **Test** | Starts one run. Shown once the workflow is saved and has no unsaved changes. |
| **Publish** | Shown while a draft version is waiting to be published. |
| **2 issues** chip (count varies) | Opens the **Issues** panel. Click an issue to jump to its block. |
| Canvas controls (bottom) | Hand tool (pan or select), **Organize nodes**, **Fit to screen**, **Zoom in**, **Zoom out**. |
| Keyboard | Delete or Backspace removes the selected blocks (Start cannot be deleted). Cmd/Ctrl + C, V, A, Z, Shift + Z and Y copy, paste, select all, undo and redo. |
Connection rules:
| Rule | Behaviour |
| - | - |
| A block connecting to itself | Refused: "A block cannot connect to itself". |
| Anything connecting into Start | Refused: "Nothing can connect into Start". |
| Several blocks into one block | Allowed (paths can merge). |
| Loops back to an earlier block | Allowed by the editor. |
| A second edge from the same connector | Moves the edge instead of adding one. |
| A block with nothing after it | Allowed. The run ends there. |
## Variables and data between steps
### Input variables
Click **Variables** in the top bar. **Input variables** are "Values each run starts with": each row has a **Name** and an optional **Default**. Two rows are always present and cannot be renamed or removed: `callee_name` and `callee_number`. `callee.*` fields and block outputs need no declaration.
A [workflow campaign](/documentation/deploy/campaigns/workflow-campaign#workflow-campaigns) fills input variables from [CSV columns](/documentation/deploy/campaigns/calling-list#map-variables-to-columns); a [test run](/documentation/build-agents/workflows/test-and-publish#test-a-run) asks you for them.
### Insert a variable
Text fields that accept variables have a `{}` button listing what that block can use, grouped as **Workflow variables**, **Callee**, **Agent outputs** and **Application responses**. Pick from the menu rather than typing paths: block references contain the block's internal ID.
| What | Example |
| - | - |
| A workflow input variable | `{{plan}}` |
| Callee name and number | `{{callee.name}}`, `{{callee.mobile_number}}` |
| An earlier call's summary, duration or retry count | Pick *Block name* · **Summary**, **Call duration** or **Retry count** |
| An earlier call's Advanced Analysis field | Pick *Block name* · *field name* |
| A field from an earlier Action's response | Pick *Block name* · **response**, then type the field |
### Feed an agent its variables
An agent's prompt reads [variables](/documentation/build-agents/customize-agent-behaviour/custom-variables) such as `callee_name` or `due_amount`. On an Agent (Call) block, click **Variables** to open **Map variables** ("Assign values from earlier blocks, or type a literal."): one row per variable the agent uses, each filled from the menu or with a literal value.
If an earlier Agent block exists, the summary row is pre-filled ("Filled in from the previous call unless you change it."). Saving with an empty row fails with "2 agent inputs need a value" (the count varies) and highlights the block.
## Duplicate or archive
On the **Workflows** list, hover a card and open its menu. **Duplicate** creates a draft named "Copy of …". **Archive** asks for confirmation: "Archived workflows stop appearing in the main list and can't start new runs. This can't be undone."
## Troubleshooting
> [accordion] My workflow is greyed out when creating a campaign
>
> Only Active workflows can run as a campaign. Open it and click **Publish**.
> [accordion] Cancel on a running run shows a warning
>
> Runs can't be cancelled from the dashboard. The run continues to its end.
> [accordion] I can't select Webhook URL or Event trigger
>
> Both are marked **Coming soon**. Use **File upload**, or **Test** for single runs.
## Next steps
> [card] [Prepare a calling list](/documentation/deploy/campaigns/calling-list)
>
> Format the CSV that starts one run per row.
> [card] [Launch a workflow campaign](/documentation/deploy/campaigns/workflow-campaign#workflow-campaigns)
>
> Each row of the list starts one run of the published workflow.
> [card] [Read the runs](/documentation/monitor/logs#workflow-runs)
>
> Each run's path and calls in Logs.
Related topics
# Workflows
Source: https://docs.ringg.ai/documentation/build-agents/workflows/overview
Chain voice calls, chats, waits, API requests and branches into one Ringg AI workflow that runs for each contact, then launch it at a CSV list as a campaign.
A workflow is a graph of steps that Ringg runs once for each contact: call them with one [agent](/documentation/build-agents/agents/agent-types), branch on how the call went, wait a day, update your CRM, then follow up with another agent or a message. Use one when the journey spans several conversations; a single agent, even a [multi-prompt](/documentation/build-agents/agents/multi-prompt-agents/overview) one, holds one conversation. This section has four pages: this overview, [Build a workflow](/documentation/build-agents/workflows/build-a-workflow), [Test and publish](/documentation/build-agents/workflows/test-and-publish) and the [Block reference](/documentation/build-agents/workflows/block-reference).
In the dashboard: **Sidebar → Workflows**.
The Workflows list, one workflow's canvas, and a run in Logs
## Workflow, agent or campaign?
| You want to… | Use |
| - | - |
| Hold one conversation (phone, web or WhatsApp) | An [agent](/documentation/build-agents/agents/create-an-agent) |
| Move one call through stages (greet, qualify, transfer) | A [multi-prompt agent](/documentation/build-agents/agents/multi-prompt-agents/overview): one conversation, several prompts on a canvas |
| Call a [CSV list](/documentation/deploy/campaigns/calling-list) with one agent, with retries and calling hours | A [campaign](/documentation/deploy/campaigns/create-a-campaign) of type **Assistant** |
| Call, then follow up on the result (call again, message, wait a day) | A workflow |
| Update your CRM or call your API between conversations | A workflow with an **Action** block |
| Run that multi-step journey for every row of a CSV | A workflow launched as a [campaign](/documentation/deploy/campaigns/workflow-campaign#workflow-campaigns) of type **Workflow** |
The trade-off: a workflow gives you logic between conversations, but you build and test each agent separately, and every run can place several calls.
## How a workflow runs
```mermaid theme={null}
flowchart LR
T[Test or workflow campaign] --> S[Start]
S --> C[Agent: Call]
C --> D{Conditional}
D -- Match --> A[Action: update CRM]
D -- No match --> W[Await]
W --> M[Agent: Chat]
A --> E[Run ends]
M --> E
```
* You build on a canvas, from a **Start** marker, connecting blocks left to right.
* Each contact gets their own **run**: one pass through the graph, carrying that contact's name, number and [variables](/documentation/build-agents/workflows/build-a-workflow#variables-and-data-between-steps).
* A Conditional block sends the run down **Match** or **No match**. An Await block in Event mode adds a **Timeout** branch.
* A run ends at a block with nothing connected after it. There is no "end" block. A run still going after 3 days is cancelled.
* [**Logs → Workflows**](/documentation/monitor/logs#workflow-runs) records every run, with the path it took and the calls it placed.
## Building blocks
The **Blocks** panel offers four blocks. The Agent block has a **Call** and a **Chat** mode.
| Block | What it does | Branches out |
| - | - | - |
| **Agent** (Call) | Calls the contact with one of your [agents](/documentation/build-agents/agents/create-an-agent), from your [numbers](/documentation/inventory/phone-numbers/buy-or-import-a-number), inside a call window (The hours of the day in which calls may be placed.), with retries. | One |
| **Agent** (Chat) | Sends a WhatsApp, SMS or email message, optionally handing the conversation to a chat agent. | One |
| **Conditional** | Checks rules against earlier steps: call status, duration, [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) fields, API responses, variables. | **Match** / **No match** |
| **Await** | Pauses the run for a duration, until a time, or until a named event arrives. | One, plus **Timeout** in Event mode |
| **Action** | Calls any HTTP API (GET, POST, PUT, PATCH, DELETE); later steps can read its JSON response. | One |
Every setting is in the [block reference](/documentation/build-agents/workflows/block-reference#block-reference).
## How a workflow starts
| Trigger | Where | Available |
| - | - | - |
| **Test** | Workflow editor, top bar ([Test a run](/documentation/build-agents/workflows/test-and-publish#test-a-run)) | Yes. One run with values you type. |
| **File upload** | [**Campaigns → Create campaign**](/documentation/deploy/campaigns/workflow-campaign#workflow-campaigns), type **Workflow** | Yes. One run per CSV row, now or at a scheduled time. |
| **Webhook URL** | Same campaign screen | No, marked **Coming soon** |
| **Event trigger** | Same campaign screen | No, marked **Coming soon** |
## Statuses and versions
| Status | Meaning |
| - | - |
| **Draft** | Saved but never published. You can edit and test it. |
| **Active** | Published. It can be picked for a workflow campaign. |
| **Archived** | Read-only and can't start new runs. Archiving can't be undone. |
The list groups workflows into **Active**, **Drafts** and a collapsed **Archived** section. A card can also carry **Scheduled**, **Triggering** or **Paused**; those workflows sit under **Active**, and nothing in the editor sets these three states.

The Workflows list, grouped into Active and Drafts
Each publish creates a version (`v1`, `v2`, shown in the breadcrumb); see [Publish and versions](/documentation/build-agents/workflows/test-and-publish#publish-and-versions).
## Next steps
> [card] [Build and run a workflow](/documentation/build-agents/workflows/build-a-workflow)
>
> Add blocks, pass data between steps, test a run, publish and launch it at a list.
> [card] [Launch a workflow campaign](/documentation/deploy/campaigns/workflow-campaign#workflow-campaigns)
>
> Each row of a calling list starts one run of the published workflow.
Related topics
# Test and publish a workflow
Source: https://docs.ringg.ai/documentation/build-agents/workflows/test-and-publish
Test a Ringg AI workflow with a single run before it goes live, then publish it as a version so workflow campaigns can use it, and update it safely later.
## Test a run
**1. Start the run**
Save, then click **Test**. **Start a test run** shows one field per input variable. Fill `callee_name` and `callee_number` (your own number, for example `+91 98765 4xxxx`), then click **Start run**.
**2. Watch it**
The canvas switches to run view. A banner shows **Running**, then **Completed**, **Failed** or **Cancelled**. Blocks the run has finished show a green check; a failed block shows a red cross. Click **Exit** to return to the editor.

A completed test run
> [!TIP]
>
> The banner shows **Completed** and every block on the path has a green check. The run also appears in [**Logs → Workflows**](/documentation/monitor/logs#workflow-runs).
> [!WARNING]
>
> A test run is not a simulation: it places real calls with the values you typed, charged like any other call. Each call follows its Agent block's call window and retries, so a test started outside the window waits for it to open. A test run may call from a Ringg test number. An Await block in the path holds the run for its full wait.
## Publish and versions
**1. Click Publish**
The editor checks the graph first. If anything blocks publishing, you see a message such as "3 issues block publishing", the **Issues** panel opens and each affected block shows a red count.
**2. Confirm**
The dialog reads "Publishing makes the workflow available to run." Click **Publish**.

The publish confirmation
> [!TIP]
>
> You see "Workflow published" and the status becomes **Active**.
| Issue | Message | Fix |
| - | - | - |
| Start not connected | "Connect the Start marker to the first block" | Connect Start to a block. |
| Orphan block | "'Block' is not reachable from Start" | Connect it or delete it. |
| Missing setting | For example "'Block': select an assistant", "select at least one caller number", "add at least one rule", "set a wait duration", "add the endpoint to call" | Fill the named setting. |
| Bad reference | "'Block' references '…', which does not resolve to an upstream block" | Pick a variable from a block that runs earlier. |
Each publish creates a version. The version picker sits next to the name in the breadcrumb, listing each version with **Active** or **Draft**. To change a published workflow, edit it and click **Save**: your edits become a draft version and runs keep using the active one. Click **Publish** again to make the draft active. Older versions open read-only, with a bar saying "A newer version of this workflow exists".
Related topics
# Calling list
Source: https://docs.ringg.ai/documentation/deploy/campaigns/calling-list
Format a Ringg AI campaign calling list: CSV rules, the 20 MB limit, mobile_number and callee_name, country code, variable mapping and invalid rows.
A calling list is the CSV a [campaign](/documentation/deploy/campaigns/overview) dials: one row per contact, one column per value. Each of your [agent's variables](/documentation/build-agents/customize-agent-behaviour/custom-variables) is filled from a column you map to it, so `@{{callee_name}}` in the prompt becomes the right name on every call.
In the dashboard: **Sidebar → Monitor → Campaigns → Create campaign → Upload calling list**.
Uploading a list, setting the country code, mapping a variable by hand, ticking Remove invalid rows and transliteration, then the verification result
## Before you start
> [card] [An outbound agent](/documentation/build-agents/agents/create-an-agent)
>
> The campaign's agent. Its variables decide the columns you need.
> [card] [The agent's variables](/documentation/build-agents/customize-agent-behaviour/custom-variables#add-a-variable)
>
> Add a variable for each value that changes per contact.
## File rules
| Rule | Value |
| - | - |
| Format | `.csv` only. Other files are rejected with "Please upload a CSV file". |
| Maximum file size | 20 MB. Larger files are rejected with "File exceeds 20MB limit". |
| Maximum rows | 100 per list, or 5,000 once [Company details](/documentation/manage-account/members#company-details-kyc) are saved. Invalid rows count toward it. A longer list is rejected with "You can only upload up to N contacts." Contact Ringg for a higher limit. |
| Header row | Required. The first row holds the column names; every later row is one contact. |
| Separator | Comma. Wrap a value that contains a comma in double quotes (`"Sharma, Priya"`). |
| Blank lines | Ignored. |
| Columns | Any number. You map the ones the agent needs; the rest are not mapped to any variable. |
## Required columns
Every agent has [two variables that cannot be removed](/documentation/build-agents/customize-agent-behaviour/custom-variables#the-two-permanent-variables), so every CSV needs at least two columns:
**mobile\_number** `string` *required*
The phone number to call ([format](#phone-numbers-and-country-code)). The column can have any header; you map it to `mobile_number`.
**callee\_name** `string` *required*
The person's name. The column can have any header; you map it to `callee_name`.
Add a column for each other variable the agent's [prompt](/documentation/build-agents/customize-agent-behaviour/agent-prompt) uses. If the prompt says "your payment of `@{{amount_due}}` is due on `@{{due_date}}`", the CSV needs columns for `amount_due` and `due_date`.
> [!TIP]
>
> Name each column exactly after its variable (`mobile_number`, `callee_name`, `due_date`) and the dashboard maps them for you. Matching is exact, including case: `Mobile Number` is not auto-mapped to `mobile_number`.
## Example
A calling list for a "Payment reminder" agent whose prompt uses `callee_name`, `mobile_number`, `amount_due` and `due_date`:
```text payment-reminders.csv theme={null}
callee_name,mobile_number,amount_due,due_date,customer_id
Priya Sharma,9876543210,"₹4,500",12 October,CUST-1042
Rahul Verma,9876540123,"₹1,200",15 October,CUST-1043
Ananya Iyer,9876540124,"₹8,999",15 October,CUST-1044
```
The agent doesn't use `customer_id`, so it stays in the file unmapped.
## Map variables to columns
After you choose a file, the **Calling list settings** card shows **Map variables to CSV columns**: one row per agent variable, each with a column dropdown (**Select CSV column**).
* Auto-mapped variables are filled in ([exact-name rule](#required-columns)); map the rest by hand. **Next** stays disabled until every variable has a column.
* The variables listed are those of the agent's latest [version](/documentation/build-agents/test-and-improve/drafts-and-versions). A variable added to the agent later is asked for on the next campaign.

Calling list settings after mapping variables
Through the API, the same mapping is the `variables_map` field of [Upload campaign contact list](/api-reference/calling/campaigns/upload-campaign-contact-list) and [Upload large campaign CSV](/api-reference/calling/large-campaigns/upload-large-campaign-csv):
**variables\_map** `string` *required*
A JSON string of `{"variable_name": "CSV column"}`, one entry per agent variable.
```json theme={null}
{"callee_name": "callee_name", "mobile_number": "mobile_number", "amount_due": "amount_due", "due_date": "due_date"}
```
> [!TIP]
>
> After **Next**, the dashboard shows "CSV verified successfully" and opens step 2 of [Create a campaign](/documentation/deploy/campaigns/create-a-campaign).
## Phone numbers and country code
You pick one **Country code** for the whole list ("Set a country code for mobile number"). It defaults to **+91**. Choose the country of the people on the list, for example **+1** for a US list.
Write numbers in national format, `9876543210` for an Indian mobile under **+91**, or with the code: `+919876543210`, `919876543210` and `09876543210` are read the same way. Spaces, dashes, dots and brackets are ignored.
In an **Assistant** campaign, the selected code replaces any code already on a number. Under **+91**, `+447700900123` is dialled as `+917700900123`. To call several countries, create one campaign per country code.
## Invalid rows
During verification, Ringg checks each row and counts the ones it can't call as invalid. A row is invalid when its phone number is missing, when the number is not valid for the chosen **Country code**, or when its `callee_name` could not be [transliterated](#transliteration). Duplicate numbers are not invalid: each row gets its own call.
* Invalid rows are never called; the rest of the list is used. **Remove invalid rows** is on by default. Off, you also get an email with the invalid rows attached.
* Through the API, [Upload campaign contact list](/api-reference/calling/campaigns/upload-campaign-contact-list) (`POST /campaign/save`) with `remove_invalid_rows` set to `false` fails the whole upload if any row is invalid.
* When verification finishes, step 2 shows **Total rows**, **Valid contacts**, **Successful upload** (for example `98/100 uploaded`) and, if any, **Invalid rows** with a **Download invalid rows** button. The download is a CSV of the rejected rows (`invalid_entries.csv`).
* After launch, the campaign's detail panel shows "N invalid entries" with a **Download** button.
* If every row is invalid, the campaign gets the status [**No Valid Contacts**](/documentation/deploy/campaigns/overview#campaign-statuses) and a "No valid contacts" message appears ([what to do](#troubleshooting)).

Upload summary after verification
## Transliteration
**Transliterate variables** rewrites the values of the variables you tick into the agent's [primary language](/documentation/build-agents/customize-agent-behaviour/voice-and-language#languages) before the calls. Use it when the list holds names in Latin script and the agent speaks Hindi, so `Priya Sharma` is read out naturally.
It is off by default. Tick the parent checkbox to select every variable, or tick single ones. `mobile_number` is not offered.
Through the API:
* `transliterate_fields` is a JSON string array of the agent's variable names (not CSV headers), such as `["callee_name"]`. Each must be mapped in `variables_map`; `mobile_number` is refused with `400`. This is the field the dashboard sends.
* `transliterate_callee_name` (`true` or `false`) covers `callee_name` only. Sent with `transliterate_fields`, the two are combined.
Both [Upload large campaign CSV](/api-reference/calling/large-campaigns/upload-large-campaign-csv) (`POST /campaign/upload-csv`) and [Upload campaign contact list](/api-reference/calling/campaigns/upload-campaign-contact-list) (`POST /campaign/save`) accept both fields. If the agent has no language set, values are left as they are.
## Troubleshooting
> [accordion] Next stays disabled after I upload the file
>
> A variable is still unmapped: every variable needs a column in **Map variables to CSV columns**. Other causes are in [Create a campaign](/documentation/deploy/campaigns/create-a-campaign#troubleshooting).
> [accordion] A column is not auto-mapped
>
> Auto-mapping needs the header to match the variable name exactly, including case and underscores. Rename the header (`callee_name`, not `Name`) or pick the column by hand.
> [accordion] Campaign shows No Valid Contacts
>
> Every row failed verification. Check the phone numbers against the chosen **Country code** first. Download the invalid rows, fix them, and create a new campaign.
## Next steps
> [card] [Create a campaign](/documentation/deploy/campaigns/create-a-campaign)
>
> Upload this file, set calling windows and retries, and launch.
> [card] [Launch a workflow campaign](/documentation/deploy/campaigns/workflow-campaign#workflow-campaigns)
>
> Start one workflow run per row of the same kind of list.
# Campaigns by API
Source: https://docs.ringg.ai/documentation/deploy/campaigns/campaigns-by-api
Create and start Ringg AI campaigns from your backend: the standard save-then-start flow and the large-campaign flow that verifies uploads before scheduling calls.
## With the API
All requests go to `https://prod-api.ringg.ai/ca/api/v0` with the header `X-API-KEY: $RINGG_API_KEY` ([API key](/documentation/manage-account/api-key), [Authentication](/api-reference/introduction/authentication)). You need the agent's ID ([Find an agent's ID](/documentation/build-agents/agents/agent-types#find-the-agent-id)) and either caller numbers ([Get Workspace Numbers](/api-reference/inventory/numbers/get-workspace-numbers)) or a pool ID (**Copy pool ID** on [the pool list](/documentation/inventory/phone-numbers/number-pools#the-pool-list)). Campaign times use the format `DD/MM/YYYY, HH:MM` and are read in `call_config.call_time.timezone`.
Two flows exist: the standard one (save, then start) and the large-campaign one (upload, poll verification, then schedule), which the dashboard uses for every campaign. Both apply the same [row limit](/documentation/deploy/campaigns/calling-list#file-rules).
### Standard flow: save, then start
**1. Upload the list and settings**
[Upload campaign contact list](/api-reference/calling/campaigns/upload-campaign-contact-list) (`POST /campaign/save`) takes the CSV and the campaign settings as `multipart/form-data`. The response includes `list_id`, `total_rows`, `successful_rows` and `failed_rows`.
```bash cURL theme={null}
curl --request POST "https://prod-api.ringg.ai/ca/api/v0/campaign/save" \
--header "X-API-KEY: $RINGG_API_KEY" \
--form 'campaign_name="October payment reminders"' \
--form 'agent_id="b1972188-038e-4605-916c-3926e9d7bde4"' \
--form 'country_code="+91"' \
--form 'variables_map="{\"callee_name\":\"callee_name\",\"mobile_number\":\"mobile_number\",\"amount_due\":\"amount_due\"}"' \
--form 'campaign_start_time="18/10/2026, 09:00"' \
--form 'campaign_end_time="19/10/2026, 09:00"' \
--form 'call_config="{\"call_retry_config\":{\"retry_count\":3,\"retry_busy\":30,\"retry_not_picked\":30,\"retry_failed\":30},\"call_time\":{\"call_start_time\":\"08:00\",\"call_end_time\":\"20:00\",\"timezone\":\"Asia/Kolkata\"}}"' \
--form 'remove_invalid_rows="true"' \
--form "file=@payment-reminders.csv"
```
```javascript JavaScript theme={null}
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("campaign_name", "October payment reminders");
form.append("agent_id", "b1972188-038e-4605-916c-3926e9d7bde4");
form.append("country_code", "+91");
form.append("variables_map", JSON.stringify({ callee_name: "callee_name", mobile_number: "mobile_number", amount_due: "amount_due" }));
form.append("campaign_start_time", "18/10/2026, 09:00");
form.append("campaign_end_time", "19/10/2026, 09:00");
form.append("call_config", JSON.stringify({
call_retry_config: { retry_count: 3, retry_busy: 30, retry_not_picked: 30, retry_failed: 30 },
call_time: { call_start_time: "08:00", call_end_time: "20:00", timezone: "Asia/Kolkata" },
}));
form.append("remove_invalid_rows", "true");
form.append("file", new Blob([await readFile("payment-reminders.csv")]), "payment-reminders.csv");
const res = await fetch("https://prod-api.ringg.ai/ca/api/v0/campaign/save", {
method: "POST",
headers: { "X-API-KEY": process.env.RINGG_API_KEY },
body: form,
});
console.log(await res.json());
```
```python Python theme={null}
import json
import os
import requests
with open("payment-reminders.csv", "rb") as f:
res = requests.post(
"https://prod-api.ringg.ai/ca/api/v0/campaign/save",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
data={
"campaign_name": "October payment reminders",
"agent_id": "b1972188-038e-4605-916c-3926e9d7bde4",
"country_code": "+91",
"variables_map": json.dumps({"callee_name": "callee_name", "mobile_number": "mobile_number", "amount_due": "amount_due"}),
"campaign_start_time": "18/10/2026, 09:00",
"campaign_end_time": "19/10/2026, 09:00",
"call_config": json.dumps({
"call_retry_config": {"retry_count": 3, "retry_busy": 30, "retry_not_picked": 30, "retry_failed": 30},
"call_time": {"call_start_time": "08:00", "call_end_time": "20:00", "timezone": "Asia/Kolkata"},
}),
"remove_invalid_rows": "true",
},
files={"file": ("payment-reminders.csv", f)},
)
print(res.json())
```
**2. Start the calls**
Pass the `list_id` to [Start campaign (number pool)](/api-reference/calling/campaigns/start-campaign-v2) (`POST /campaign/v2/start`) with a `number_pool_id`. `email_completion_user_ids` (workspace user IDs to email when the campaign is scheduled and when it completes) is optional; an ID that isn't a member of the workspace returns `404`.
```bash cURL theme={null}
curl --request POST "https://prod-api.ringg.ai/ca/api/v0/campaign/v2/start" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"agent_id": "b1972188-038e-4605-916c-3926e9d7bde4",
"list_id": "123e4567-e89b-12d3-a456-426614174000",
"number_pool_id": "5f0c2a8e-1d3b-4c6e-9a7f-2b8d4e6f1a3c"
}'
```
```javascript JavaScript theme={null}
const res = await fetch("https://prod-api.ringg.ai/ca/api/v0/campaign/v2/start", {
method: "POST",
headers: { "X-API-KEY": process.env.RINGG_API_KEY, "Content-Type": "application/json" },
body: JSON.stringify({
agent_id: "b1972188-038e-4605-916c-3926e9d7bde4",
list_id: "123e4567-e89b-12d3-a456-426614174000",
number_pool_id: "5f0c2a8e-1d3b-4c6e-9a7f-2b8d4e6f1a3c",
}),
});
console.log(await res.json());
```
```python Python theme={null}
import os
import requests
res = requests.post(
"https://prod-api.ringg.ai/ca/api/v0/campaign/v2/start",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
json={
"agent_id": "b1972188-038e-4605-916c-3926e9d7bde4",
"list_id": "123e4567-e89b-12d3-a456-426614174000",
"number_pool_id": "5f0c2a8e-1d3b-4c6e-9a7f-2b8d4e6f1a3c",
},
)
print(res.json())
```
To pass explicit caller numbers instead, use [Start campaign](/api-reference/calling/campaigns/start-campaign) (`POST /campaign/start`) with `from_numbers`: number IDs, or numbers written exactly as [Get Workspace Numbers](/api-reference/inventory/numbers/get-workspace-numbers) returns them. Retries rotate through the list in order. It is deprecated in favour of the pool version.
### Large-campaign flow
The upload is verified in the background, and you schedule the calls once it is ready. It works for a list of any size, from one row. These endpoints are Beta.
**1. Upload the CSV**
[Upload large campaign CSV](/api-reference/calling/large-campaigns/upload-large-campaign-csv) (`POST /campaign/upload-csv`) takes `campaign_name`, `agent_id`, `country_code`, `variables_map`, `file` and optionally `remove_invalid_rows`, `transliterate_fields` and `transliterate_callee_name`. It returns `bulk_list_id`, `status` (`verifying`), `total_rows` and `campaign_name`. Save the `bulk_list_id`; it is also the campaign ID. A list over your [row limit](/documentation/deploy/campaigns/calling-list#file-rules) returns `402`.
```bash cURL theme={null}
curl --request POST "https://prod-api.ringg.ai/ca/api/v0/campaign/upload-csv" \
--header "X-API-KEY: $RINGG_API_KEY" \
--form 'campaign_name="October payment reminders"' \
--form 'agent_id="b1972188-038e-4605-916c-3926e9d7bde4"' \
--form 'country_code="+91"' \
--form 'variables_map="{\"callee_name\":\"callee_name\",\"mobile_number\":\"mobile_number\",\"amount_due\":\"amount_due\"}"' \
--form 'remove_invalid_rows="true"' \
--form "file=@payment-reminders.csv"
```
```javascript JavaScript theme={null}
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("campaign_name", "October payment reminders");
form.append("agent_id", "b1972188-038e-4605-916c-3926e9d7bde4");
form.append("country_code", "+91");
form.append("variables_map", JSON.stringify({ callee_name: "callee_name", mobile_number: "mobile_number", amount_due: "amount_due" }));
form.append("remove_invalid_rows", "true");
form.append("file", new Blob([await readFile("payment-reminders.csv")]), "payment-reminders.csv");
const res = await fetch("https://prod-api.ringg.ai/ca/api/v0/campaign/upload-csv", {
method: "POST",
headers: { "X-API-KEY": process.env.RINGG_API_KEY },
body: form,
});
console.log(await res.json());
```
```python Python theme={null}
import json
import os
import requests
with open("payment-reminders.csv", "rb") as f:
res = requests.post(
"https://prod-api.ringg.ai/ca/api/v0/campaign/upload-csv",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
data={
"campaign_name": "October payment reminders",
"agent_id": "b1972188-038e-4605-916c-3926e9d7bde4",
"country_code": "+91",
"variables_map": json.dumps({"callee_name": "callee_name", "mobile_number": "mobile_number", "amount_due": "amount_due"}),
"remove_invalid_rows": "true",
},
files={"file": ("payment-reminders.csv", f)},
)
print(res.json())
```
**2. Wait for verification**
Poll [Get large campaign upload status](/api-reference/calling/large-campaigns/get-large-campaign-upload-status) (`GET /campaign/upload-status/{bulk_list_id}`) every few seconds (the dashboard uses 5). Continue when `status` is `draft`; stop on `failed`, `no_valid_contacts` or `insufficient_balance`. The response also gives `campaign_name`, `total_callees` (valid contacts loaded) and `invalidated_rows_count`. The invalid rows can be downloaded from the campaign's [detail panel](/documentation/deploy/campaigns/manage-a-campaign#the-detail-panel).
**3. If balance is short**
On `insufficient_balance`, [add balance](/documentation/manage-account/billing#add-balance-prepaid), then call [Check large campaign balance](/api-reference/calling/large-campaigns/check-large-campaign-balance) (`POST /campaign/check-balance/{bulk_list_id}`). Nothing resumes on its own. If the balance now covers it, the response has `status: "draft"` and `total_callees`, and you continue to the next step with the same `bulk_list_id`. If it is still short, `status` stays `insufficient_balance` and the response gives `required_credits` and `additional_balance_required`.
**4. Schedule the calls**
[Make large campaign calls async](/api-reference/calling/large-campaigns/make-large-campaign-calls-async) (`POST /campaign/make-call-async`) takes the schedule and exactly one of `from_numbers` or `number_pool_id`; both or neither returns `422`. `email_completion_user_ids` and `concurrency_percentage` are optional. The balance is checked again here: if it no longer covers the campaign, the response is `402` and the campaign goes back to `insufficient_balance`. Caller numbers and `email_completion_user_ids` are checked after the request is accepted, so a number or user that isn't found sets the campaign to `failed` instead of returning an error.
```bash cURL theme={null}
curl --request POST "https://prod-api.ringg.ai/ca/api/v0/campaign/make-call-async" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"bulk_list_id": "123e4567-e89b-12d3-a456-426614174000",
"agent_id": "b1972188-038e-4605-916c-3926e9d7bde4",
"country_code": "+91",
"campaign_start_time": "18/10/2026, 09:00",
"campaign_end_time": "19/10/2026, 09:00",
"number_pool_id": "5f0c2a8e-1d3b-4c6e-9a7f-2b8d4e6f1a3c",
"call_config": {
"call_retry_config": { "retry_count": 3, "retry_busy": 30, "retry_not_picked": 30, "retry_failed": 30 },
"call_time": { "call_start_time": "08:00", "call_end_time": "20:00", "timezone": "Asia/Kolkata" }
}
}'
```
```javascript JavaScript theme={null}
const res = await fetch("https://prod-api.ringg.ai/ca/api/v0/campaign/make-call-async", {
method: "POST",
headers: { "X-API-KEY": process.env.RINGG_API_KEY, "Content-Type": "application/json" },
body: JSON.stringify({
bulk_list_id: "123e4567-e89b-12d3-a456-426614174000",
agent_id: "b1972188-038e-4605-916c-3926e9d7bde4",
country_code: "+91",
campaign_start_time: "18/10/2026, 09:00",
campaign_end_time: "19/10/2026, 09:00",
number_pool_id: "5f0c2a8e-1d3b-4c6e-9a7f-2b8d4e6f1a3c",
call_config: {
call_retry_config: { retry_count: 3, retry_busy: 30, retry_not_picked: 30, retry_failed: 30 },
call_time: { call_start_time: "08:00", call_end_time: "20:00", timezone: "Asia/Kolkata" },
},
}),
});
console.log(await res.json());
```
```python Python theme={null}
import os
import requests
res = requests.post(
"https://prod-api.ringg.ai/ca/api/v0/campaign/make-call-async",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
json={
"bulk_list_id": "123e4567-e89b-12d3-a456-426614174000",
"agent_id": "b1972188-038e-4605-916c-3926e9d7bde4",
"country_code": "+91",
"campaign_start_time": "18/10/2026, 09:00",
"campaign_end_time": "19/10/2026, 09:00",
"number_pool_id": "5f0c2a8e-1d3b-4c6e-9a7f-2b8d4e6f1a3c",
"call_config": {
"call_retry_config": {"retry_count": 3, "retry_busy": 30, "retry_not_picked": 30, "retry_failed": 30},
"call_time": {"call_start_time": "08:00", "call_end_time": "20:00", "timezone": "Asia/Kolkata"},
},
},
)
print(res.json())
```
Body fields of `POST /campaign/make-call-async`:
**bulk\_list\_id** `string` *required*
The draft list ID returned by `/campaign/upload-csv`.
**agent\_id** `string` *required*
The agent ID used during upload.
**country\_code** `string` *required*
Phone number country code, for example `+91`.
**campaign\_start\_time** `string`
Start time in `DD/MM/YYYY, HH:MM` format. Required unless you send `call_slots`. Send it together with `campaign_end_time`.
**campaign\_end\_time** `string`
End time in `DD/MM/YYYY, HH:MM` format. Required unless you send `call_slots`. Send it together with `campaign_start_time`.
**from\_numbers** `string[]`
Caller number IDs or phone numbers. Send exactly one of `from_numbers` or `number_pool_id`.
**number\_pool\_id** `string`
A [number pool](/documentation/inventory/phone-numbers/number-pools) ID. Send exactly one of `from_numbers` or `number_pool_id`.
**call\_config** `object` *required*
Retries and calling window. They replace the agent's own [call settings](/documentation/build-agents/customize-agent-behaviour/call-settings#calling-window) for this campaign.
**properties**
**call\_retry\_config.retry\_count** `integer` (default: 0)
Number of retries.
**call\_retry\_config.retry\_busy** `integer` (default: 30)
Cooldown in minutes after a busy attempt.
**call\_retry\_config.retry\_not\_picked** `integer` (default: 30)
Cooldown in minutes after an attempt that was not picked up.
**call\_retry\_config.retry\_failed** `integer` (default: 30)
Cooldown in minutes after a failed attempt.
**call\_time.call\_start\_time** `string` (default: 09:00)
Start of the daily calling window.
**call\_time.call\_end\_time** `string` (default: 21:00)
End of the daily calling window.
**call\_time.timezone** `string` (default: Asia/Kolkata)
IANA timezone for the campaign times and the calling window.
**call\_time.scheduled\_at** `string | null`
Optional ISO 8601 date and time for a scheduled call, read in `call_time.timezone`.
**call\_slots** `object`
Optional calling slots, read in `call_time.timezone`. A call is placed only inside a slot and inside the daily `call_time` window. Without `campaign_start_time` and `campaign_end_time`, the campaign runs from the first slot's start to the last slot's end; with them, every slot must fit inside. Use one of two shapes:
* `{"mode": "absolute", "intervals": [{"start": "18/10/2026, 10:00", "end": "18/10/2026, 13:00"}]}`, up to 500 intervals.
* `{"mode": "weekly", "until": "31/10/2026, 21:00", "windows": [{"days": ["mon", "tue"], "start": "10:00", "end": "13:00"}]}`, up to 21 windows, repeated from the campaign start (or now) until `until`, at most 90 days.
Each slot lasts 1 minute to 24 hours and can't be in the past, the last must end at least 5 minutes from now, and overlapping slots are merged, up to 100 in all. Mixing the two shapes returns `422`.
**concurrency\_percentage** `integer` (default: 0)
0 to 100. This campaign's share of campaign concurrency. See [Manage concurrency](/documentation/deploy/campaigns/manage-a-campaign#manage-concurrency).
**email\_completion\_user\_ids** `string[]`
Optional. Workspace members to email when the campaign is scheduled and when it completes.
Through the API you can set a different cooldown per outcome (`retry_busy`, `retry_not_picked`, `retry_failed`, in minutes). `call_time` sets one daily window; for several windows or weekly hours, send `call_slots`. Without `call_time`, the campaign calls 09:00–21:00 in `Asia/Kolkata`, whatever the agent's calling window, and without `call_retry_config` it makes no retries, unlike the dashboard's default of 3.
Before a real run, send a 5-row list first and listen to a few calls in [Logs](/documentation/monitor/logs), and set `call_time` in the timezone of the people you are calling.
# Create a campaign
Source: https://docs.ringg.ai/documentation/deploy/campaigns/create-a-campaign
Create a Ringg AI campaign in the dashboard: upload a calling list, map columns to variables, set the calling window, retries and caller numbers, then go live.
The dashboard and the API take the same [campaign](/documentation/deploy/campaigns/overview) settings; both are on this page. [Test the agent](/documentation/build-agents/test-and-improve/test-an-agent) with a real call before you launch to a full list.
In the dashboard: **Sidebar → Monitor → Campaigns → Create campaign**.
## Before you start
> [card] [An outbound agent](/documentation/build-agents/agents/create-an-agent)
>
> The agent that makes the calls. Note its variables.
> [card] [A number or number pool](/documentation/inventory/phone-numbers/buy-or-import-a-number)
>
> The caller ID: a bought or imported number, or a [pool](/documentation/inventory/phone-numbers/number-pools#create-a-pool) of them.
> [card] [A calling list (CSV)](/documentation/deploy/campaigns/calling-list)
>
> One row per contact, with a column for each variable.
You also need enough [balance](/documentation/manage-account/billing#add-balance-prepaid), or the campaign stops at Insufficient Balance, and for the API an [API key](/documentation/manage-account/api-key).
## In the dashboard
The page is titled **Campaign Setup** and has two steps: **Upload details** and **Configure campaign**.
Both steps, from the campaign name to Create campaign
**1. Upload details**
1. In the **Campaign details** card, enter a **Campaign name** that names the audience, month and purpose, for example `October payment reminders`; it is how you find the campaign later in Logs and Analytics filters.
2. Leave **Campaign type** on **Assistant**. (**Workflow** runs a multi-step workflow per contact instead: [Workflow campaigns](/documentation/deploy/campaigns/workflow-campaign#workflow-campaigns).)
3. In **Select assistant**, search for and pick your [agent](/documentation/build-agents/agents/create-an-agent), for example "Payment reminder".
4. In the **Upload calling list** card, drag your CSV onto the box or click **Select File** ([format](/documentation/deploy/campaigns/calling-list)).
5. In the **Calling list settings** card that appears, set the [**Country code**](/documentation/deploy/campaigns/calling-list#phone-numbers-and-country-code), map each variable in [**Map variables to CSV columns**](/documentation/deploy/campaigns/calling-list#map-variables-to-columns), and choose [**Remove invalid rows**](/documentation/deploy/campaigns/calling-list#invalid-rows) and [**Transliterate variables**](/documentation/deploy/campaigns/calling-list#transliteration).
6. Click **Next**. Ringg uploads and verifies the list ("Processing CSV...", then "CSV verified successfully") and opens step 2. If your balance doesn't cover the campaign, you are sent back to the campaigns list instead ([troubleshooting](#troubleshooting)).

Step 1, Upload details, with a CSV chosen
**2. Configure campaign**
1. Under **Select number**, choose **Individual numbers** and pick one or more **Numbers**, or choose **Number pool** and pick a pool. These set the caller ID (The number the person you call sees on their phone.). No numbers yet? [Buy or import a number](/documentation/inventory/phone-numbers/buy-or-import-a-number) or [create a number pool](/documentation/inventory/phone-numbers/number-pools#create-a-pool).
2. Under **Campaign settings**, set the **Timezone**, **Start date & time** and **End date & time**.
3. Next to **Calling windows**, click **Edit** to change the hours the campaign may call (see [Calling windows rules](#calling-windows-rules)). The campaign's windows replace the agent's own calling window (The hours of the day in which calls may be placed.) ([Calling window](/documentation/build-agents/customize-agent-behaviour/call-settings#calling-window)) for this campaign's calls.
4. Set the **Retry count** and **Cooldown Period** (the cooldown (The wait before a contact who was not reached is called again.) between attempts). More retries reach more people, but every retry counts toward [call limits](/documentation/manage-account/call-limits) and takes a concurrency slot; the connectivity-by-attempt chart in [Analytics](/documentation/monitor/analytics#connectivity) shows whether later attempts still connect.
5. In **Email notifications**, pick the workspace members to notify. They get one email when the campaign is set up and its calls are scheduled, and one when it completes, with the totals, credits used and a link to download the report (valid for 7 days). A terminated campaign sends no completion email. To add someone, first [invite them](/documentation/manage-account/members#invite-a-member).
6. Click **Create campaign**.

Step 2, Configure campaign
> [!TIP]
>
> You see "Campaign created successfully!" and the campaign appears on the campaigns list.
### Upload details fields
Every field is required unless marked optional.
| Field | Default | Allowed values |
| - | - | - |
| **Campaign name** | Empty | Any text |
| **Campaign type** | **Assistant** | **Assistant**, **Workflow** |
| **Select assistant** | None | Agents in this workspace |
| **Upload calling list** | None | One `.csv` file, up to 20 MB |
| **Country code** | **+91** | One dial code for the whole list |
| **Map variables to CSV columns** (each variable needs a column) | Auto-mapped where a header equals the variable name | Any column of the file |
| **Remove invalid rows** (optional) | On | On, off |
| **Transliterate variables** (optional) | Off | Any variable except `mobile_number` |
The right side previews your file, 15 rows per page.
### Configure campaign fields
| Field | Default | Allowed values |
| - | - | - |
| **Select number** | **Individual numbers** | **Individual numbers** (one or more workspace numbers) or **Number pool** (one pool) |
| **Timezone** | `Asia/Kolkata` | Any IANA timezone. Start, end and calling windows are read in this timezone. |
| **Start date & time** | 10 minutes from now | A date and time |
| **End date & time** | 1 day after the default start | A date and time |
| **Calling windows** | 08:00–20:00, every day | See the rules below |
| **Retry count** | **3 Retries** | **No Retry**, **1 Retry**, **2 Retries** … **20 Retries** |
| **Cooldown Period** | **30 Minutes** | **5**, **10**, **15**, **16** or **30 Minutes**; **1**, **2**, **3**, **4** or **6 Hours**. **0 Minutes** only with **No Retry**. |
| **Email notifications** | You | Members of this workspace. You can't type other addresses. |
The dashboard uses one **Cooldown Period** whether the last attempt was busy, not picked up, or failed. Raising **Retry count** from **No Retry** while the cooldown is **0 Minutes** changes the cooldown to **5 Minutes**.
### Calling windows rules
**Edit** opens the **Calling windows** editor. Choose **Daily** (the same hours every day the campaign runs) or **Weekly** (different hours per weekday), drag on the calendar to add a window, then click **Save**.

The Calling windows editor in Weekly mode
* At least 1 window and at most 25.
* Each window is at least 30 minutes long, in 15-minute steps.
* Windows on the same day can't overlap.
* A window can't cross midnight. For 22:00–02:00, add 22:00–24:00 and 00:00–02:00 as two windows.
If a call limit applies to the agent, a read-only **Call limits** card ("How often this campaign can call one person") appears below the settings. See [Call limits](/documentation/manage-account/call-limits).
## Verify it worked
* The new campaign appears with a status such as **Preparing**, **Scheduled** or **Ongoing**. See [Campaign statuses](/documentation/deploy/campaigns/overview#campaign-statuses).
* Once the start time passes inside a calling window, calls appear in [Logs](/documentation/monitor/logs). The campaign's **History** button opens them. See [Manage a running campaign](/documentation/deploy/campaigns/manage-a-campaign).
* By API, [Get all campaigns](/api-reference/calling/campaigns/get-all-campaigns) lists the campaign and its status.
## Troubleshooting
> [accordion] Next is disabled
>
> **Next** needs a campaign name, an [agent](/documentation/build-agents/agents/create-an-agent), a CSV, a country code and a column for every variable. See [Map variables to columns](/documentation/deploy/campaigns/calling-list#map-variables-to-columns).
> [accordion] After Next, I'm sent back to the campaigns list with Insufficient balance
>
> Your balance doesn't cover the campaign, so it is kept with the status **Insufficient Balance**. Select it and click **Add Balance**, which opens billing with the amount needed. Once the balance covers it, the campaign returns to **Draft**: select it and click **Complete Setup**. You don't need to upload the list again. See [When balance runs out](/documentation/manage-account/billing#when-balance-runs-out).
> [accordion] My number is missing from Numbers
>
> Test numbers can't be used in campaigns and are not listed. If you have no other numbers, the card says "No numbers available." with a **Buy numbers** link. See [Buy or import a number](/documentation/inventory/phone-numbers/buy-or-import-a-number).
> [accordion] A number pool can't be selected
>
> Pools with no numbers are greyed out. Add numbers to the pool first. See [Number pools](/documentation/inventory/phone-numbers/number-pools).
> [accordion] Create campaign is disabled
>
> Pick a number or a pool, set a timezone and both dates, and check that no calling windows overlap. See [Calling windows rules](#calling-windows-rules).
> [accordion] I left the page after Next
>
> The campaign is saved as a **Draft**. On the campaigns list, click its name, or select it and click **Complete Setup**, to return to **Configure campaign**. Settings you already entered in step 2 are kept only in the same browser.
## Next steps
> [card] [Manage a running campaign](/documentation/deploy/campaigns/manage-a-campaign)
>
> Watch status, split concurrency, terminate and open the campaign's calls.
> [card] [Read call logs](/documentation/monitor/logs)
>
> Open each campaign call's transcript, recording and analysis.
# Manage a campaign
Source: https://docs.ringg.ai/documentation/deploy/campaigns/manage-a-campaign
Manage Ringg AI campaigns: filter the list, read the detail panel, split concurrency, terminate by dashboard or API, and open a campaign's calls in Logs.
Once a [campaign](/documentation/deploy/campaigns/overview) is launched, its per-call results live in [Logs](/documentation/monitor/logs), or reach your server through [Event Subscription (webhooks)](/documentation/build-agents/customize-agent-behaviour/event-subscription); the campaign itself is managed from the **Campaigns** page.
In the dashboard: **Sidebar → Monitor → Campaigns**.
Filtering the list, opening a campaign's details, splitting concurrency and opening its calls in Logs
## The campaigns list
The **Campaigns** page shows 50 campaigns per page:
| Column | Shows |
| - | - |
| **ID** | A copy button for the campaign ID, which is the `bulk_list_id` in the API and webhooks. |
| **Campaign** | The campaign name. A **Draft** campaign's name is a link that reopens setup. |
| **Status** | The current status. See [Campaign statuses](/documentation/deploy/campaigns/overview#campaign-statuses). |
| **Campaign Time** | Start → end, for example `18 Oct 2026, 09:00 AM → 19 Oct 2026, 09:00 AM`. |
| **Total Calls** | The number of valid contacts loaded from the list, not the calls placed so far. |
The list refreshes every 30 seconds, and every 2 seconds while a campaign is **Preparing**. Terminated campaigns that never placed a call are not listed.
### Search and filters
* **Search...** matches campaign names.
* **Filters → Status** narrows the list. Each option covers several statuses:
| Filter option | Includes |
| - | - |
| **Draft** | Draft |
| **Ongoing** | Ongoing, Scheduled, Processing, Verifying, Preparing |
| **Completed** | Completed |
| **Insufficient balance** | Insufficient Balance |
| **Failed / Terminated** | Failed, Terminated, No Valid Contacts |
With no option ticked, every campaign is shown.
## The detail panel
Click a row to open its details on the right. Under the campaign name and its ID (click to copy), the panel shows:
* **Status** ([what each status means](/documentation/deploy/campaigns/overview#campaign-statuses)) and **Assistant** (a link to the agent).
* **Call time**: each calling window by day, and the **Timezone**.
* **Retry configuration**: **Retry count** and **Cooldown period**.
* Invalid rows, if any: "N invalid entries" with a **Download** button for the rejected rows.

The detail panel of an ongoing campaign
The buttons at the bottom depend on the status:
| Status | Buttons |
| - | - |
| Draft | **Complete Setup**, **Terminate** |
| Processing, Verifying, Preparing | **Processing...** (disabled) |
| Insufficient Balance | **Add Balance** (opens [billing](/documentation/manage-account/billing#add-balance-prepaid) with the amount needed) |
| Scheduled, Ongoing | **Analytics**, **History**, **Terminate** |
| Completed | **Analytics**, **History**, **Export report** |
| Terminated, Failed, No Valid Contacts | **History**, **Analytics** |
**Export report** has two options: **Download** ("Download a ZIP of the call report") and **Email (queued)** ("Queue the report and email it to you"). The dashboard offers the report for 60 days after the campaign's end time.
## Manage concurrency
Concurrency is the number of calls your workspace can run at the same time. **Manage concurrency** decides how that capacity is shared. Raise the total itself on the billing page ([Change concurrency](/documentation/manage-account/billing#change-concurrency)). In a Ringg Space, see [Ringg Space concurrency](/documentation/manage-account/ringg-spaces/create-and-manage#concurrency).
**1. Open the panel**
On the **Campaigns** page, click **Manage concurrency**. The panel reads "If not set, campaign concurrency will be equally distributed."
**2. Split between API calls and campaigns**
On the **Workspace** tab, drag the **API** or **Campaigns** slider. The two always add up to 100%. For example, 30% API leaves 70% for campaigns.
**3. Split between campaigns**
On the **Campaigns** tab, set a percentage for each ongoing campaign. The tab needs at least two ongoing campaigns ([troubleshooting](#troubleshooting)).

The Campaigns tab of Manage Concurrency
**4. Save**
Click **Save**. Only the tab you have open is saved, so save each tab separately.
Through the API, [Make large campaign calls async](/api-reference/calling/large-campaigns/make-large-campaign-calls-async) accepts a `concurrency_percentage` for the campaign you are starting.
## Terminate a campaign
Terminating cancels the campaign's calls that are still queued (**Registered**) or waiting for a **Retry**. A call already in progress is not hung up: it finishes normally and is not retried. Terminating can't be undone from the dashboard.
### Terminate in the dashboard
**1. Select the campaign**
Click its row on the **Campaigns** list.
**2. Terminate and confirm**
Click **Terminate** in the detail panel. The dialog asks "Termination will stop all future calls. Are you sure you want to proceed?" Click **Confirm**.
> [!TIP]
>
> You see "Campaign terminated" and the status changes to **Terminated**.
### Terminate with the API
Call [Terminate calls by campaign ID](/api-reference/calling/campaigns/stop-campaign) (`PATCH /campaign/terminate`) with the campaign ID (the **ID** column's copy button, or `bulk_list_id`). You need an [API key](/documentation/manage-account/api-key).
```bash cURL theme={null}
curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/campaign/terminate" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{ "campaign_id": "1b2efee1-a940-4170-a1e4-51f59097ba10" }'
```
```javascript JavaScript theme={null}
const res = await fetch("https://prod-api.ringg.ai/ca/api/v0/campaign/terminate", {
method: "PATCH",
headers: { "X-API-KEY": process.env.RINGG_API_KEY, "Content-Type": "application/json" },
body: JSON.stringify({ campaign_id: "1b2efee1-a940-4170-a1e4-51f59097ba10" }),
});
console.log(await res.json());
```
```python Python theme={null}
import os
import requests
res = requests.patch(
"https://prod-api.ringg.ai/ca/api/v0/campaign/terminate",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
json={"campaign_id": "1b2efee1-a940-4170-a1e4-51f59097ba10"},
)
print(res.json())
```
The response is `200` with `{"message": "Calls terminated successfully!"}`, even when no call matched. Only calls created in the last 7 days are cancelled.
The same endpoint can also stop calls by `agent_id`, `call_ids` or `mobile_numbers`. See [Terminate calls by call IDs](/api-reference/calling/individual-calls/stop-calls-by-id).
## Find campaign calls in Logs
Click **History** in the detail panel. It opens [Logs](/documentation/monitor/logs) filtered to this campaign, at `/logs?bulk_list_id=`. The usual date range does not apply, so you see every call of the campaign, with its transcript, recording and analysis. You can also pick the campaign under **Campaigns** in the Logs filters.

Logs filtered to one campaign
**Analytics** opens [Analytics](/documentation/monitor/analytics) for the same campaign, at `/analytics?bulk_list_id=`.
By API, pass the campaign ID as `bulk_list_id` to [Get call history](/api-reference/monitoring/call-history/get-call-history):
```bash cURL theme={null}
curl --request GET "https://prod-api.ringg.ai/ca/api/v0/calling/history?bulk_list_id=1b2efee1-a940-4170-a1e4-51f59097ba10&limit=100&offset=0" \
--header "X-API-KEY: $RINGG_API_KEY"
```
```javascript JavaScript theme={null}
const res = await fetch(
"https://prod-api.ringg.ai/ca/api/v0/calling/history?bulk_list_id=1b2efee1-a940-4170-a1e4-51f59097ba10&limit=100&offset=0",
{ headers: { "X-API-KEY": process.env.RINGG_API_KEY } },
);
console.log(await res.json());
```
```python Python theme={null}
import os
import requests
res = requests.get(
"https://prod-api.ringg.ai/ca/api/v0/calling/history",
headers={"X-API-KEY": os.environ["RINGG_API_KEY"]},
params={"bulk_list_id": "1b2efee1-a940-4170-a1e4-51f59097ba10", "limit": 100, "offset": 0},
)
print(res.json())
```
To list your campaigns and their statuses, use [Get all campaigns](/api-reference/calling/campaigns/get-all-campaigns).
## Get results through Event Subscription
Instead of polling, have Ringg send each call's data to your server. Event Subscription is set on the [agent](/documentation/build-agents/customize-agent-behaviour/event-subscription), so it covers every call that agent makes, campaign calls included. Set up your endpoint in [Event Subscription setup](/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors).
Call payloads carry `bulk_list_id`: the campaign ID for campaign calls, and `null` for single calls. Use it to group results by campaign. See [Webhook payloads](/documentation/build-agents/customize-agent-behaviour/webhooks/call-events).
## Troubleshooting
> [accordion] Campaign stuck in Verifying or Processing
>
> Large lists take longer to verify. The list refreshes on its own; there is nothing to do while the panel shows **Processing...**.
> [accordion] Campaign is Scheduled but no calls go out
>
> Calls are placed only after the start time and only inside a calling window (The hours of the day in which the campaign may place calls.), in the campaign's timezone. Check **Call time** and **Timezone** in the detail panel; they replace the agent's own calling window for this campaign. Also check your [call limits](/documentation/manage-account/call-limits).
> [accordion] The Campaigns tab in Manage concurrency is greyed out
>
> Only one campaign is ongoing ("Only one ongoing campaign — concurrency can't be split."), so there is nothing to split; the tab is empty when none are. Use the **Workspace** tab to change the share between API calls and campaigns.
> [accordion] Export report is disabled
>
> The campaign ended more than [60 days](#the-detail-panel) ago.
> [accordion] Can I pause a campaign and resume it later?
>
> No. The only stop is [**Terminate**](#terminate-a-campaign). To call the remaining contacts later, create a new campaign with a list of those contacts.
> [accordion] Can I change the calling windows or retries after launch?
>
> The dashboard has no edit for a launched campaign; the detail panel shows **Call time** and **Retry configuration** read-only. Terminate it and create a new campaign with the new settings.
## Next steps
> [card] [Read call logs](/documentation/monitor/logs)
>
> Filter, open and export the calls of a campaign.
> [card] [See trends in Analytics](/documentation/monitor/analytics)
>
> Volume, goals, connectivity and cost for the campaign.
> [card] [Get alerted on a spike](/documentation/monitor/alerts)
>
> Notify your team when a metric crosses a threshold.
# Campaigns
Source: https://docs.ringg.ai/documentation/deploy/campaigns/overview
Understand Ringg AI campaigns: an agent calls every contact in a CSV inside calling windows, with retries. See each status and how concurrency is shared.
A campaign is a batch of outbound calls by one [agent](/documentation/build-agents/agents/agent-types) to a [calling list](/documentation/deploy/campaigns/calling-list). This section covers [creating a campaign](/documentation/deploy/campaigns/create-a-campaign), [launching a workflow campaign](/documentation/deploy/campaigns/workflow-campaign#workflow-campaigns), [running campaigns by API](/documentation/deploy/campaigns/campaigns-by-api), the [calling list](/documentation/deploy/campaigns/calling-list) a campaign dials and [managing one](/documentation/deploy/campaigns/manage-a-campaign) after launch.
In the dashboard: **Sidebar → Monitor → Campaigns**. Campaigns are not available on a primary (hub) workspace; open one of its [Ringg Spaces](/documentation/manage-account/ringg-spaces/overview).
## When to use a campaign
| You want to | Use | Why |
| - | - | - |
| Call a list of contacts (reminders, renewals, surveys, lead follow-ups) on a schedule | A campaign | Calling windows (The hours of the day in which the campaign may place calls, in the campaign's timezone.), retries, email notifications and one report for the whole list |
| Call one person the moment your own system decides (a form fill, a failed payment) | [Initiate individual call](/api-reference/calling/individual-calls/initiate-individual-call) | No CSV and no schedule. Your backend sends one request per call |
| Run several steps per contact (call, wait, branch on the outcome, call again) | A workflow campaign | The workflow's steps decide what happens to each contact. See [Workflows](/documentation/build-agents/workflows/overview) |
When you create a campaign, **Campaign type** offers **Assistant** ("Call a list with one assistant") and **Workflow** ("Run a multi-step workflow"). [Create a campaign](/documentation/deploy/campaigns/create-a-campaign) covers **Assistant**; [Launch a workflow campaign](/documentation/deploy/campaigns/workflow-campaign#workflow-campaigns) covers **Workflow**.
## How a campaign runs
1. **Upload and verify the calling list.** You name the campaign, pick the agent, upload the CSV and map each [agent variable](/documentation/build-agents/customize-agent-behaviour/custom-variables) to a column. Ringg checks every row; rows that fail are counted as invalid and can be downloaded ([Calling list](/documentation/deploy/campaigns/calling-list)).
2. **Configure and launch.** You choose the caller ID (The number the person you call sees on their phone.) numbers ([bought or imported](/documentation/inventory/phone-numbers/buy-or-import-a-number), or a [number pool](/documentation/inventory/phone-numbers/number-pools)), the timezone, start and end time, calling windows, retry count and the cooldown (The wait before a contact who was not reached is called again.) between retries, then click **Create campaign** ([Create a campaign](/documentation/deploy/campaigns/create-a-campaign)).
3. **Calls go out.** Between the start and end time, the agent calls contacts only inside the calling windows. A contact who is busy, does not pick up, or whose call fails is called again after the cooldown, up to the retry count. Retries also wait for the next calling window. When the end time passes, contacts not yet reached, including those waiting for a retry, are marked failed; calls already in progress finish normally.
4. **Review results.** Each call appears in [Logs](/documentation/monitor/logs) with its transcript, recording and analysis, or reaches your server through [Event Subscription (webhooks)](/documentation/build-agents/customize-agent-behaviour/event-subscription) ([Manage a campaign](/documentation/deploy/campaigns/manage-a-campaign)).
## Campaign statuses
The **Status** column on the campaigns list shows one of these values.

The campaigns list with campaigns in several statuses
| Status (API value) | What it means | What you can do |
| - | - | - |
| Verifying (`verifying`) | Ringg is checking the rows of the calling list. | Wait. |
| Draft (`draft`) | The list is verified, but the campaign has not been launched yet. | **Complete Setup** to finish step 2, or **Terminate**. |
| Preparing (`preparing`) | The campaign was launched and its calls are being prepared. | Wait. |
| Processing (`in_db`) | The campaign's calls are being created, just after **Preparing**. [Get all campaigns](/api-reference/calling/campaigns/get-all-campaigns) reports this step as `preparing`. | Wait. The panel shows **Processing...** |
| Scheduled (`scheduled`) | The campaign is waiting for its start time. | **Analytics**, **History**, **Terminate**. |
| Ongoing (`ongoing`) | Calls are being placed. | **Analytics**, **History**, **Terminate**. |
| Completed (`completed`) | The campaign has finished. | **Analytics**, **History**, **Export report**. |
| Terminated (`terminated`) | Someone stopped the campaign. No future calls are placed. | **History**, **Analytics**. |
| No Valid Contacts (`no_valid_contacts`) | Every row in the calling list was invalid, so there is nobody to call. | Fix the CSV ([Invalid rows](/documentation/deploy/campaigns/calling-list#invalid-rows)) and create a new campaign. |
| Failed (`failed`) | The campaign could not be processed or run. | **History**, **Analytics**. Create a new campaign. |
| Insufficient Balance (`insufficient_balance`) | Your balance is too low to run this campaign. | **Add Balance**. Once the balance covers it, the campaign returns to **Draft**; click **Complete Setup** to launch it. See [When balance runs out](/documentation/manage-account/billing#when-balance-runs-out). |
There is no pause. To stop a campaign, terminate it: all future calls are cancelled, and a terminated campaign can't be resumed from the dashboard. See [Terminate a campaign](/documentation/deploy/campaigns/manage-a-campaign#terminate-a-campaign).
## Concurrency and call limits
**Concurrency** (How many calls your workspace can run at the same time.) sets how fast a campaign works through its list. You buy it on the billing page: up to 50 for self-serve workspaces, up to 1000 for enterprise ([Change concurrency](/documentation/manage-account/billing#change-concurrency)). It is shared two ways, both set in [**Manage concurrency**](/documentation/deploy/campaigns/manage-a-campaign#manage-concurrency):
* **Between API calls and campaigns.** The **Workspace** tab splits it by percentage, for example 30% for API calls and 70% for campaigns.
* **Between running campaigns.** The **Campaigns** tab sets a percentage per ongoing campaign. Unset, campaign concurrency is split equally between ongoing campaigns.
**Call limits** cap how often one person can be called in a rolling window, for example 3 calls in 24 hours. They are set for the workspace or for an agent ([agent call limits](/documentation/build-agents/customize-agent-behaviour/call-settings#call-limits)), not per campaign, and each retry counts as a call. A call over the limit waits for the next free slot inside the campaign's calling windows. If that slot falls after the campaign's end time, the call is cancelled by the limit; a call still waiting when the campaign ends is marked failed with the other unreached contacts. See [Call limits](/documentation/manage-account/call-limits).
## Next steps
> [card] [Create a campaign](/documentation/deploy/campaigns/create-a-campaign)
>
> Upload the list, set calling windows and retries, and launch from the dashboard or the API.
> [card] [Prepare your calling list](/documentation/deploy/campaigns/calling-list)
>
> Format the CSV and map its columns to your agent's variables.
> [card] [Manage a running campaign](/documentation/deploy/campaigns/manage-a-campaign)
>
> Watch status, split concurrency, terminate and open the campaign's calls.
# Workflow campaign
Source: https://docs.ringg.ai/documentation/deploy/campaigns/workflow-campaign
Run a published Ringg AI workflow over a calling list: create a campaign of type Workflow, pick the workflow, upload the CSV, go live and follow runs in Logs.
## Workflow campaigns
Set **Campaign type** to **Workflow** to start one run of a published [workflow](/documentation/build-agents/workflows/overview) per CSV row instead of one call. You need an **Active** workflow ([publish it](/documentation/build-agents/workflows/test-and-publish#publish-and-versions)) and a [calling list](/documentation/deploy/campaigns/calling-list) with a phone number column. Runs appear in [Logs → Workflows](/documentation/monitor/logs#workflow-runs).
**1. Start a campaign**
Go to **Campaigns → Create campaign**. Enter a **Campaign name** and set **Campaign type** to **Workflow** ("Run a multi-step workflow").
**2. Pick the workflow**
In **Select workflow**, choose an Active workflow. Others show, for example, "Draft — publish the workflow to use it here". Not active yet? [Publish it](/documentation/build-agents/workflows/test-and-publish#publish-and-versions).
**3. Upload the list**
Under **How should this workflow start?**, keep **File upload** (**Webhook URL** and **Event trigger** are marked **Coming soon**) and drop a CSV (up to 20 MB, [format](/documentation/deploy/campaigns/calling-list)). Check **Phone number column** (required) and **Name column** (optional), and pick a **Country code**, "Applied to numbers without a + prefix" ([country code rules](/documentation/deploy/campaigns/calling-list#phone-numbers-and-country-code)). Under **Map workflow variables to CSV columns**, columns named like a variable are matched for you.
**4. Choose when it starts**
Click **Next**. Choose **Start immediately** or **Schedule for later** (timezone, date and time). The **Calling hours & retries** card shows what the Agent blocks will use: those come from the workflow, not the campaign.
**5. Go live**
Check **Ready to go live**, then click **Go live** (or **Schedule campaign**). Rows without a phone number are skipped.
\[!TIP] You see "Workflow campaign is live" with the number of runs started, or "Workflow campaign scheduled". Duplicate phone numbers are skipped, and the toast says how many.
Related topics
# Mobile widget configuration
Source: https://docs.ringg.ai/documentation/deploy/web-and-apps/mobile-apps/configuration
Reference for every RinggWidgetConfig option in the Ringg AI React Native and Flutter widgets: identity, panel content, variables, theme, buttons and defaults.
`RinggWidgetConfig` controls how the widget looks and starts in your app; the agent's prompt, voice and tools stay in the dashboard. Only `agentId` is required. Every other field falls back to a default generated from one source for all platforms, so the web, React Native and Flutter widgets behave identically when a field is left unset; theme values with no default listed fall back to the packaged Ringg palette. Pick your framework with the switcher next to the table of contents, and [install the package](/documentation/deploy/web-and-apps/mobile-apps/install) first.
**React Native**
`RinggWidgetConfig` is the object you pass to `` from `@ringg/react-native`.
```tsx theme={null}
```
## Identity and auth
> [!CAUTION]
>
> `authorization` and `clientOrigin` ship inside your app and can be extracted from it. Use the agent's webcall public key. The config type also accepts `xApiKey`; never put your workspace [API key](/documentation/manage-account/api-key) there, because it isn't limited to one agent or to your **Allowed clients**.
**agentId** `string` *required*
The agent to load.
**authorization** `string`
`Bearer `, from the agent's embed snippet.
**clientOrigin** `string`
Caller identity sent as `Origin`, built with `appOrigin(BUNDLE_ID)`. Required for real calls; see [Caller identity](/documentation/deploy/web-and-apps/mobile-apps/install#caller-identity).
**mode** `string` (default: prod)
Leave it unset.
## Panel content and mode
**title** `string` (default: Ringg AI Support)
Heading on the start screen and header.
**description** `string` (default: Ringg AI offers 24/7 voice support to handle your business calls efficiently and professionally)
Supporting copy on the start screen.
**defaultTab** `"audio" | "text"` (default: audio)
Which mode the panel opens in.
**hideTabSelector** `boolean` (default: false)
Hides the audio/text switch, pinning the widget to `defaultTab`.
**defaultExpanded** `boolean` (default: false)
Mounts the panel already open, with no trigger.
**bypassStartScreen** `boolean` (default: false)
A trigger tap starts the conversation in `defaultTab` immediately.
**bypassFeedbackScreen** `boolean` (default: false)
Skips the post-call rating screen.
**logoUrl** `string`
Logo shown in the header.
**logoStyles** `PortableStyles`
Sizing and background for the logo.
**typingWords** `string[]` (default: Thinking, Reasoning, Working on it, Almost there)
Words cycled in the pending-reply indicator.
**legalDisclaimer** `\{ text, links? \}`
Replaces the default legal text shown before a conversation. Words in `text` that match a key in `links` link to that URL.
## Variables
`variables` fill the agent's [variables](/documentation/build-agents/customize-agent-behaviour/custom-variables). Values are sent as given, so strings, numbers, booleans, objects and arrays all work. Set them at controller creation; to change them for a new conversation, create a new controller.
```tsx theme={null}
variables: {
callee_name: "John",
account_id: "ACC-42",
is_premium: true,
cart: { items: 3, total: 149.5 },
}
```
## Theme
Colors take any CSS color string; `primaryColor` and `agentBubbleColor` also accept CSS gradients.
**theme.primaryColor** `string`
Accent for buttons, selected states and the trigger.
**theme.primaryTextColor** `string`
Text on primary-colored surfaces.
**theme.backgroundColor** `string`
Panel background.
**theme.surfaceColor** `string`
Cards, inputs and the user message bubble.
**theme.agentBubbleColor** `string`
Agent bubble background. An empty string renders agent replies without a bubble.
**theme.textColor** `string`
Body text.
**theme.mutedTextColor** `string`
Secondary text.
**theme.borderColor** `string`
Borders and dividers.
**theme.errorColor** `string`
Validation and danger states.
**theme.successColor** `string`
Success states.
**theme.buttonStyle** `"rounded" | "pill" | "square"`
Button corner style.
**theme.borderRadius** `string`
Global corner radius, for example `"12px"`.
**theme.fontFamily** `string`
Font family, resolved against fonts registered in your app. React Native does not fetch web fonts, so load the family through Expo Font or your native font assets first.
## Buttons
`PortableStyles` is the cross-platform style subset: `height`, `width`, `backgroundColor`, `padding`, `borderRadius`. Arbitrary CSS is not accepted, because these values are applied to native views.
**buttons.modalTrigger.styles** `PortableStyles`
The floating trigger.
**buttons.modalTrigger.icon.url** `string`
Custom trigger icon.
**buttons.modalTrigger.icon.size** `number`
Icon size in points.
**buttons.mic.styles** `PortableStyles`
The in-call mute button.
**buttons.call.textBeforeCall** `string`
Label on the start-call button.
**buttons.call.styles** `PortableStyles`
Call button styling.
**buttons.text.textBeforeCall** `string`
Label on the start-chat button.
**buttons.text.styles** `PortableStyles`
Chat button styling.
## Voice call view
**voiceCall.showAnimation** `boolean` (default: false)
Shows the audio visualizer during a call. If you pass your own `controller`, pass `room` too.
**voiceCall.showTranscript** `boolean` (default: true)
Shows the live transcript during a call.
## Feedback screen
**feedbackScreen.title** `string`
Heading on the rating screen.
**feedbackScreen.description** `string`
Supporting copy.
**feedbackScreen.starsCount** `number`
Number of stars offered.
**feedbackScreen.starsStyles** `\{ filledColor, emptyColor \}`
Selected and unselected star colors.
**feedbackScreen.placeholder** `string`
Comment field placeholder.
**feedbackScreen.submitBtnCTA** `string`
Submit button label.
**feedbackScreen.submitBtnStyles** `PortableStyles`
Submit button styling.
## Chat extras
**enabledSlashCommands** `SlashCommand[]`
Commands offered in the composer, merged with any the agent returns at call start. Each is `{ tool_type, command, display_name, description }`.
**eventLogs.enabled** `boolean` (default: false)
Shows inline pills in the thread when the agent fires a host action.
**eventLogs.showIds** `boolean`
Appends the action id to each pill. Useful while debugging.
**notificationTuneUrl** `string` (default: [https://assets.ringg.ai/audios/misc/widget\_notification.mp3](https://assets.ringg.ai/audios/misc/widget_notification.mp3))
Sound played on an incoming reply. On React Native it plays only with a player wired through `ports`; see [notification sound](/documentation/deploy/web-and-apps/mobile-apps/install#notification-sound).
## Web-only options
`widgetPosition` and `innerWindowProps` exist on the type because the config is shared with the web widget. They are ignored on React Native: the native layout places the trigger and panel, and there is no resizable window to size.
**Flutter**
`RinggWidgetConfig` is the first argument to `RinggWidgetController` in `ringg_flutter`; every field except `agentId` is nullable.
```dart theme={null}
final controller = RinggWidgetController(
const RinggWidgetConfig(
agentId: 'your-agent-id',
authorization: 'Bearer your-webcall-public-key',
title: 'Support',
defaultTab: MediaType.text,
),
ControllerPorts(transport: transport.transport),
);
```
## Identity and auth
> [!CAUTION]
>
> `authorization` ships inside your app and can be extracted from it. Use the agent's webcall public key. The config also accepts `xApiKey`; never put your workspace [API key](/documentation/manage-account/api-key) there, because it isn't limited to one agent or to your **Allowed clients**.
**agentId** `String` *required*
The agent to load.
**authorization** `String?`
`Bearer `, from the agent's embed snippet.
**clientOrigin** `String?`
Pins the caller identity sent as `Origin`. Derived from the running app when null; see [Caller identity](#caller-identity).
**mode** `EnvironmentMode?` (default: prod)
Leave it null.
## Panel content and mode
**title** `String?` (default: Ringg AI Support)
Heading on the start screen and header.
**description** `String?` (default: Ringg AI offers 24/7 voice support to handle your business calls efficiently and professionally)
Supporting copy on the start screen.
**defaultTab** `MediaType?` (default: MediaType.audio)
`MediaType.audio` or `MediaType.text`. Which mode the panel opens in.
**hideTabSelector** `bool?` (default: false)
Hides the audio/text switch, pinning the widget to `defaultTab`.
**defaultExpanded** `bool?` (default: false)
Mounts the panel already open, with no trigger.
**bypassStartScreen** `bool?` (default: false)
A trigger tap starts the conversation in `defaultTab` immediately.
**bypassFeedbackScreen** `bool?` (default: false)
Skips the post-call rating screen.
**logoUrl** `String?`
Logo shown in the header.
**logoStyles** `PortableStyles?`
Sizing and background for the logo.
**typingWords** `List\?` (default: Thinking, Reasoning, Working on it, Almost there)
Words cycled in the pending-reply indicator.
**legalDisclaimer** `LegalDisclaimerConfig?`
Replaces the default legal text shown before a conversation. Words in `text` that match a key in `links` link to that URL.
## Variables
`variables` fill the agent's [variables](/documentation/build-agents/customize-agent-behaviour/custom-variables). `WidgetVariables` is `Map`, and values are sent as given, so any JSON value works. Set them when you build the controller; to change them for a new conversation, build a new controller.
```dart theme={null}
RinggWidgetConfig(
agentId: 'your-agent-id',
variables: {
'callee_name': 'John',
'account_id': 'ACC-42',
'is_premium': true,
'cart': {'items': 3, 'total': 149.5},
},
)
```
## Theme
`theme` takes a `WidgetTheme`. Colors are CSS color strings, not Dart `Color` objects, so the same values work on web, React Native and Flutter. `primaryColor` and `agentBubbleColor` also accept CSS gradients.
```dart theme={null}
theme: const WidgetTheme(
primaryColor: '#9AADEC',
backgroundColor: '#FFFFFF',
buttonStyle: ButtonStyle.pill,
borderRadius: '12px',
),
```
**theme.primaryColor** `String?`
Accent for buttons, selected states and the trigger.
**theme.primaryTextColor** `String?`
Text on primary-colored surfaces.
**theme.backgroundColor** `String?`
Panel background.
**theme.surfaceColor** `String?`
Cards, inputs and the user message bubble.
**theme.agentBubbleColor** `String?`
Agent bubble background. An empty string renders agent replies without a bubble.
**theme.textColor** `String?`
Body text.
**theme.mutedTextColor** `String?`
Secondary text.
**theme.borderColor** `String?`
Borders and dividers.
**theme.errorColor** `String?`
Validation and danger states.
**theme.successColor** `String?`
Success states.
**theme.buttonStyle** `ButtonStyle?`
`rounded`, `pill` or `square`.
**theme.borderRadius** `String?`
Global corner radius, for example `'12px'`.
**theme.fontFamily** `String?`
Font family. Must be a family declared in your `pubspec.yaml`.
## Buttons
`PortableStyles` is the cross-platform style subset: `height`, `width`, `backgroundColor`, `padding`, `borderRadius`. Sizes accept a number or a CSS string, so `'48px'` and `48` both work.
**buttons.modalTrigger.styles** `PortableStyles?`
The floating trigger.
**buttons.modalTrigger.icon.url** `String?`
Custom trigger icon.
**buttons.modalTrigger.icon.size** `Object?`
Icon size, as a number or a CSS size string.
**buttons.mic.styles** `PortableStyles?`
The in-call mute button.
**buttons.call.textBeforeCall** `String?`
Label on the start-call button.
**buttons.call.styles** `PortableStyles?`
Call button styling.
**buttons.text.textBeforeCall** `String?`
Label on the start-chat button.
**buttons.text.styles** `PortableStyles?`
Chat button styling.
## Voice call view
**voiceCall.showAnimation** `bool?` (default: false)
Shows the audio visualizer during a call. Needs `transport` passed to `RinggWidget`.
**voiceCall.showTranscript** `bool?` (default: true)
Shows the live transcript during a call.
## Feedback screen
**feedbackScreen.title** `String?`
Heading on the rating screen.
**feedbackScreen.description** `String?`
Supporting copy.
**feedbackScreen.starsCount** `int?`
Number of stars offered.
**feedbackScreen.starsStyles** `\{ filledColor, emptyColor \}`
Selected and unselected star colors.
**feedbackScreen.placeholder** `String?`
Comment field placeholder.
**feedbackScreen.submitBtnCTA** `String?`
Submit button label.
**feedbackScreen.submitBtnStyles** `PortableStyles?`
Submit button styling.
## Chat extras
**enabledSlashCommands** `List\?`
Commands offered in the composer, merged with any the agent returns at call start.
**eventLogs.enabled** `bool?` (default: false)
Shows inline pills in the thread when the agent fires a host action.
**eventLogs.showIds** `bool?`
Appends the action id to each pill. Useful while debugging.
**notificationTuneUrl** `String?` (default: [https://assets.ringg.ai/audios/misc/widget\_notification.mp3](https://assets.ringg.ai/audios/misc/widget_notification.mp3))
Sound played on an incoming reply. Needs a `notification` port with a player; see the [ports reference](/documentation/deploy/web-and-apps/mobile-apps/events#ports-reference).
## Web-only options
`widgetPosition` and `innerWindowProps` exist on the type because the config is shared with the web widget. They are ignored on Flutter: the Flutter layout places the trigger and panel, and there is no resizable window to size.
## Caller identity
The backend allow-lists an agent's callers by the `Origin` header. Browsers attach one automatically, which is how domain whitelisting works for the web widget. Native HTTP sends nothing, so a webcall request without a caller identity is refused before authentication is even considered.
| Response | Meaning |
| - | - |
| `400 Origin header is required` | No caller identity was sent. |
| `403 Client '…' is not allowed to initiate webcall` | One was sent, but it is not on the agent's allowed clients list. |
| `401 Invalid credentials` | The identity was accepted, but the token is wrong for that environment. |
Add the value to the agent's allowed clients: open the agent, then **Embed & Widgets** → **Install & domains** → **Allowed clients**. Application ids differ per platform and per build flavor (`.debug`, `.staging`, `.dev`), so every build you ship needs its own entry. The value that was sent appears in the refused-call response, ready to paste.
> [!WARNING]
>
> Hybrid WebView runtimes report a shared identity (`capacitor://localhost`, `ionic://localhost`, `file://`) that is the same for every app built on that runtime. Allowing one admits all of them.
On Flutter this is handled for you. The package reads the running app's id through `package_info_plus` and sends `://`:
| Platform | `Origin` sent |
| - | - |
| Android | `android://` |
| iOS | `ios://` |
| macOS, Windows, Linux | `macos://…`, `windows://…`, `linux://…` |
Set `clientOrigin` only when you want to pin one value, for example a single canonical string across build flavors. It wins over the derived one.
```dart theme={null}
RinggWidgetConfig(
agentId: 'your-agent-id',
clientOrigin: 'android://com.yourcompany.yourapp',
)
```
Supplying your own `ControllerPorts(httpClient: …)` opts out of the default header. Wrap your client to keep it:
```dart theme={null}
ControllerPorts(
transport: transport.transport,
httpClient: appOriginHttpClient(inner: yourClient),
)
```
Related topics
# Mobile widget events
Source: https://docs.ringg.ai/documentation/deploy/web-and-apps/mobile-apps/events
Subscribe to Ringg AI React Native and Flutter widget lifecycle events, drive the panel from your code, read widget state and handle actions the agent fires.
Everything here goes through the controller, your handle on the mounted widget. Pick your framework with the switcher next to the table of contents.
## Before you start
> [card] [A mounted widget](/documentation/deploy/web-and-apps/mobile-apps/install)
>
> The controller only exists once the widget is installed and mounted in your app.
**React Native**
## Get the controller
`` builds the controller for you. `onReady` hands it back:
```tsx theme={null}
const [controller, setController] = useState(null);
;
```
It fires once, after the widget's first render, and the widget destroys the controller when it unmounts. Everything on this page works off that value. If you built the controller yourself ([own the lifecycle](#own-the-lifecycle-yourself)), you already have it.
## Lifecycle events
The React Native and Flutter widgets emit five lifecycle events on an in-memory event bus. The web widget uses the same names as browser `CustomEvent`s, with two differences: it never emits `ringg:component_acknowledgement`, and its `ringg:calendar_booking` has no `"failed"` status. See [web widget events](/documentation/deploy/web-and-apps/web-widget/events).
| Event | Fires when | Payload |
| - | - | - |
| `ringg:widget_status` | The panel opens or closes. | `status`: `"maximised"` or `"minimised"`. `mode`: `"audio"` or `"text"`. |
| `ringg:conversation_status` | A voice or chat conversation starts or ends. | `status`: `"started"` or `"ended"`. `mode`: `"audio"` or `"text"`. `callId`: string. |
| `ringg:feedback_status` | The user submits or skips the post-call feedback screen. | `status`: `"submitted"` or `"skipped"`. `callId`: string. `rating`: number, only when submitted. |
| `ringg:calendar_booking` | A calendar component is shown, a slot is confirmed, or booking fails. | `status`: `"shown"`, `"confirmed"` or `"failed"`. `componentId`: string. `slotId`: string, optional. `message`: string, optional. |
| `ringg:component_acknowledgement` | The user responds to an interactive component (form submit, button tap, slot pick). | `componentName`: string. `componentId`: string. `status`: string. |
> [!NOTE]
>
> `ringg:calendar_booking` and `ringg:component_acknowledgement` only fire when the agent sends interactive components. An agent configured for plain voice or text never emits them.
`controller.eventBus.on` returns an unsubscribe function.
```ts theme={null}
useEffect(() => {
const unsubscribe = controller.eventBus.on(
"ringg:conversation_status",
({ status, mode, callId }) => {
analytics.track(`call_${status}`, { mode, callId });
},
);
return unsubscribe;
}, [controller]);
```
Subscribe in an effect and return the unsubscribe function; handlers registered during render accumulate on every re-render and fire several times per event.
## Controller methods
Call these to drive the widget from your own buttons, deep links or navigation events.
| Method | Effect |
| - | - |
| `openWidget()` | Opens the panel. |
| `minimizeWidget()` | Closes the panel back to the trigger. |
| `handleTriggerClick()` | What the built-in trigger does: toggles the panel, or starts the conversation directly when `bypassStartScreen` is set. |
| `startCall(mediaType)` | Starts a conversation in `"audio"` or `"text"`. Requests microphone permission for audio. |
| `endCall()` | Ends the conversation and releases the microphone. |
| `sendMessage(text)` | Sends a chat message as the user. |
| `sendSlashCommand(command)` | Runs one of the commands from `enabledSlashCommands`. |
| `submitFeedback(rating, comment)` | Submits the post-call feedback. |
| `skipFeedback()` | Dismisses the feedback screen. |
| `destroy()` | Tears the controller down and releases the microphone. Call on unmount. |
```tsx theme={null}
controller.openWidget()}>
Talk to support
```
The controller also exposes methods for component responses, Block Kit actions and dynamic-data extensions. The bundled widget calls those on itself while rendering interactive components, so a normal integration does not need them.
## Reading state
Each store has a hook that re-renders your component when its snapshot changes. Use these to build your own UI, or to mirror the widget's state elsewhere in your app.
| Hook | Snapshot |
| - | - |
| `useRinggSession(controller)` | `phase` (`"idle"`, `"starting"`, `"live-optimistic"`, `"connected"`), `isLoading`, `isSessionLive`, `connectionState` (`"disconnected"`, `"connecting"`, `"connected"`, `"reconnecting"`), `error`. |
| `useRinggShell(controller)` | `viewState` (`"closed"`, `"open"`, `"feedback"`), `currentCallId`, `callMode`. |
| `useRinggMessages(controller)` | `messages`, the chat thread. |
| `useRinggTyping(controller)` | `isTyping`, true while a reply is pending. |
| `useRinggComponents(controller)` | `completedFlowIds`, interactive flows the user has finished. |
| `useRinggSlashCommands(controller)` | `commands` currently offered in the composer. |
```tsx theme={null}
const { isSessionLive, connectionState } = useRinggSession(controller);
const { messages } = useRinggMessages(controller);
return ;
```
Each message carries `name`, `message`, `isSelf`, `timestamp`, an optional `sourceUrl` for retrieved sources, and `componentType` with `componentData` when the message renders a component instead of text.
## Interactive components
Agents can send interactive components into the chat thread instead of plain text. All six types render natively, with no work on your side beyond mounting the widget.
| Component | What the user sees |
| - | - |
| `calendar_booking` | Available slots to pick from, with a confirmation state. |
| `form` | A field set the user fills in and submits. |
| `buttons` | Quick-reply choices. The selection echoes back as a chat bubble. |
| `confirmation` | A yes or no decision with a summary of what is being confirmed. |
| `interactive_flow` | A multi-step sequence of the above, completed as one flow. |
| `blocks` | A Block Kit layout, for richer agent-authored cards. |
Configure which components an agent can send from the dashboard. See [Chat Components](/documentation/deploy/web-and-apps/web-widget/components) for authoring them.
## Agent-triggered app actions
An agent can fire [actions](/documentation/deploy/web-and-apps/web-widget/data#agent-actions) during a conversation, for example to open a screen or focus a field. On the web these become browser events. React Native has no ambient event bus, so you supply the handler through `ports` and receive the same payload.
```tsx theme={null}
import { createHostActionDispatcher, RinggWidget } from "@ringg/react-native";
const onDomAction = createHostActionDispatcher(({ name, payload }) => {
if (name === "open_checkout") navigation.navigate("Checkout", payload);
});
;
```
Set `eventLogs: { enabled: true }` in config to also show each fired action as an inline pill in the chat thread, which makes these easy to watch while building.
## Ports reference
`ports` overrides what the widget wires on its own. Every entry is optional: supply one and yours is used, leave it out and the default applies.
| Port | Default | Override it to |
| - | - | - |
| `transport` | A LiveKit connection the widget owns | Bring your own adapter, or a room shared with the rest of your app. |
| `urlResolver` | The Ringg endpoints, selected by `config.mode` | Point at a different backend. |
| `micPermission` | The native permission prompt | Gate access yourself, or show your own explanation first. |
| `notification` | Silent | Play a reply sound, see [notification sound](/documentation/deploy/web-and-apps/mobile-apps/install#notification-sound). |
| `onDomAction` | Unset. Actions are acknowledged and dropped | Handle agent-triggered app actions. |
| `eventBus` | Created for you | Share one bus with other code. |
| `clock` | System clock | Inject time, for tests. |
> [!NOTE]
>
> `ports` is read once, when the widget builds the controller. Changing it later has no effect; changing `config` rebuilds the conversation from scratch.
### Own the lifecycle yourself
When the widget cannot own the transport, build the controller and pass that instead. `defaultUrlResolver` keeps the Ringg endpoints without you naming them:
```tsx theme={null}
import { RinggWidget, createLiveKitTransport, createNativeMicPermission, createRinggWidgetController, defaultUrlResolver } from "@ringg/react-native";
const livekit = createLiveKitTransport();
const controller = createRinggWidgetController(config, {
transport: livekit.transport,
urlResolver: defaultUrlResolver,
micPermission: createNativeMicPermission(),
});
;
// Yours to build, yours to release: controller.destroy(); livekit.dispose();
```
## Verify your handlers
* Open and close the panel once, then confirm one `ringg:widget_status` event per action.
* Start and end one conversation, then confirm `ringg:conversation_status` carries a `callId`.
* Navigate away and back, then confirm listeners are not duplicated.
* Submit and skip feedback in separate runs if the feedback screen is enabled.
* Unmount the screen during a call and confirm the microphone indicator clears.
**Flutter**
On Flutter the controller is the `RinggWidgetController` you built when you [mounted the widget](/documentation/deploy/web-and-apps/mobile-apps/install).
## Lifecycle events
The React Native and Flutter widgets emit five lifecycle events on an in-memory event bus. The web widget uses the same names as browser `CustomEvent`s, with two differences: it never emits `ringg:component_acknowledgement`, and its `ringg:calendar_booking` has no `"failed"` status. See [web widget events](/documentation/deploy/web-and-apps/web-widget/events).
| Event | Fires when | Payload |
| - | - | - |
| `ringg:widget_status` | The panel opens or closes. | `status`: `"maximised"` or `"minimised"`. `mode`: `"audio"` or `"text"`. |
| `ringg:conversation_status` | A voice or chat conversation starts or ends. | `status`: `"started"` or `"ended"`. `mode`: `"audio"` or `"text"`. `callId`: string. |
| `ringg:feedback_status` | The user submits or skips the post-call feedback screen. | `status`: `"submitted"` or `"skipped"`. `callId`: string. `rating`: number, only when submitted. |
| `ringg:calendar_booking` | A calendar component is shown, a slot is confirmed, or booking fails. | `status`: `"shown"`, `"confirmed"` or `"failed"`. `componentId`: string. `slotId`: string, optional. `message`: string, optional. |
| `ringg:component_acknowledgement` | The user responds to an interactive component (form submit, button tap, slot pick). | `componentName`: string. `componentId`: string. `status`: string. |
> [!NOTE]
>
> `ringg:calendar_booking` and `ringg:component_acknowledgement` only fire when the agent sends interactive components. An agent configured for plain voice or text never emits them.
`_controller.eventBus.on` returns an unsubscribe function; call it in `dispose`.
```dart theme={null}
late final Unsubscribe _unsubscribe;
@override
void initState() {
super.initState();
_unsubscribe = _controller.eventBus.on(
'ringg:conversation_status',
(payload) {
final data = payload as Map;
analytics.track('call_${data['status']}', {'callId': data['callId']});
},
);
}
@override
void dispose() {
_unsubscribe();
_controller.destroy();
_transport.dispose();
super.dispose();
}
```
Payloads arrive as maps keyed by the field names in the table above.
## Controller methods
Call these to drive the widget from your own buttons, routes or deep links.
| Method | Effect |
| - | - |
| `openWidget()` | Opens the panel. |
| `minimizeWidget()` | Closes the panel back to the trigger. |
| `handleTriggerClick()` | What the built-in trigger does: toggles the panel, or starts the conversation directly when `bypassStartScreen` is set. |
| `startCall(MediaType)` | Starts a conversation in `MediaType.audio` or `MediaType.text`. |
| `endCall()` | Ends the conversation and releases the microphone. |
| `sendMessage(String)` | Sends a chat message as the user. |
| `sendSlashCommand(SlashCommand)` | Runs one of the commands from `enabledSlashCommands`. |
| `submitFeedback(int rating, String comment)` | Submits the post-call feedback. |
| `skipFeedback()` | Dismisses the feedback screen. |
| `destroy()` | Tears the controller down and releases the microphone. Call from `dispose`. |
```dart theme={null}
FilledButton(
onPressed: _controller.openWidget,
child: const Text('Talk to support'),
)
```
The controller also exposes methods for component responses, Block Kit actions and local components. The bundled widget calls those on itself while rendering interactive components, so a normal integration does not need them.
## Reading state
Each store publishes immutable snapshots. `StoreBuilder` is the subscription primitive: it subscribes on mount, rebuilds on every new snapshot, and unsubscribes on dispose.
```dart theme={null}
StoreBuilder(
store: _controller.session,
builder: (context, snapshot, child) => Badge(
live: snapshot.isSessionLive,
reconnecting: snapshot.connectionState == TransportConnectionState.reconnecting,
),
)
```
| Store | Snapshot |
| - | - |
| `controller.session` | `phase` (`idle`, `starting`, `liveOptimistic`, `connected`), `isLoading`, `isSessionLive`, `connectionState` (a `TransportConnectionState`: `disconnected`, `connecting`, `connected`, `reconnecting`), `error`. |
| `controller.shell` | `viewState` (`closed`, `open`, `feedback`), `currentCallId`, `callMode`. |
| `controller.messages` | The chat thread. |
| `controller.typing` | `isTyping`, true while a reply is pending. |
| `controller.components` | `completedFlowIds`, interactive flows the user has finished. |
| `controller.slashCommands` | Commands currently offered in the composer. |
Each message carries `name`, `message`, `isSelf`, `timestamp`, an optional `sourceUrl` for retrieved sources, and a component type with its data when the message renders a component instead of text.
`RinggScope` carries the controller down the tree if you would rather read it from context than pass it explicitly.
## Interactive components
Agents can send interactive components into the chat thread instead of plain text. All six types render natively, with no work on your side beyond mounting the widget.
| Component | What the user sees |
| - | - |
| `calendar_booking` | Available slots to pick from, with a confirmation state. |
| `form` | A field set the user fills in and submits. |
| `buttons` | Quick-reply choices. The selection echoes back as a chat bubble. |
| `confirmation` | A yes or no decision with a summary of what is being confirmed. |
| `interactive_flow` | A multi-step sequence of the above, completed as one flow. |
| `blocks` | A Block Kit layout, for richer agent-authored cards. |
Configure which components an agent can send from the dashboard. See [Chat Components](/documentation/deploy/web-and-apps/web-widget/components) for authoring them.
## Agent-triggered app actions
An agent can fire [actions](/documentation/deploy/web-and-apps/web-widget/data#agent-actions) during a conversation, for example to open a route or prefill a field. On the web these become browser events. Flutter has no ambient event bus, so you supply a handler on the ports and receive the same payload.
```dart theme={null}
ControllerPorts(
transport: _transport.transport,
onDomAction: (action, log) {
if (action.eventName == 'open_checkout') {
Navigator.of(context).pushNamed('/checkout', arguments: action.defaultPayload);
}
},
)
```
Leave it unset and actions are acknowledged and dropped. Set `eventLogs: EventLogsConfig(enabled: true)` in config to also show each fired action as an inline pill in the chat thread.
## Ports reference
The second argument to `RinggWidgetController` wires the widget to your app's capabilities. Only `transport` is required.
| Port | Default | Purpose |
| - | - | - |
| `transport` | Required | The LiveKit connection, from `createLiveKitTransport()`. |
| `urlResolver` | Production endpoints | Override to point at another environment. |
| `httpClient` | Origin-stamping client | Supply your own and wrap it with `appOriginHttpClient` to keep the caller identity header. |
| `micPermission` | Treated as granted; see below | Your own gate, for example `permission_handler`. |
| `notification` | Silent | Reply sound. Supply a player to enable it. |
| `onDomAction` | Unset | Handler for agent-triggered app actions. |
| `eventBus` | Created for you | Supply your own bus to share it with other code. |
| `clock` | System clock | Injectable time source, for tests. |
The default `micPermission` lets the platform prompt when the audio track is created, so the manifest and `Info.plist` entries in [platform setup](/documentation/deploy/web-and-apps/mobile-apps/install#platform-setup) are what gate voice. Supply your own to request access earlier, or to show your own explanation first.
## Verify your handlers
* Open and close the panel once, then confirm one `ringg:widget_status` event per action.
* Start and end one conversation, then confirm `ringg:conversation_status` carries a `callId`.
* Confirm every `eventBus.on` subscription is released in `dispose`.
* Submit and skip feedback in separate runs if the feedback screen is enabled.
* Confirm `destroy()` and `dispose()` run and the microphone indicator clears.
To let the agent show forms, cards and slot pickers in the thread, build them in the dashboard: [Components](/documentation/deploy/web-and-apps/web-widget/components).
## Next steps
> [card] [Review conversations in Logs](/documentation/monitor/logs)
>
> Each conversation's transcript and analysis, under call type **Webcall**.
> [card] [Read Analytics](/documentation/monitor/analytics)
>
> Totals and trends across every conversation.
# Mobile app install
Source: https://docs.ringg.ai/documentation/deploy/web-and-apps/mobile-apps/install
Add the Ringg AI voice and chat widget to a React Native, Expo or Flutter app: install the package, set permissions, mount it and pass the caller identity.
`@ringg/react-native` and `ringg_flutter` put the [web widget](/documentation/deploy/web-and-apps/web-widget/overview)'s voice calls, text chat, [components](/documentation/deploy/web-and-apps/web-widget/components) and feedback screen into a native app, with the same conversation logic; for a website, use the web widget. Both packages are pre-1.0 (`@ringg/react-native` 0.4.0, `ringg_flutter` 0.1.5), so their APIs can change between minor versions: pin an exact version. Pick your framework with the switcher next to the table of contents; the [configuration](/documentation/deploy/web-and-apps/mobile-apps/configuration) and [events](/documentation/deploy/web-and-apps/mobile-apps/events) references have the same switch.
## Before you start
> [card] [An agent](/documentation/build-agents/agents/create-an-agent)
>
> A **Webcall** or voice agent; the app's calls and chats go to it.
> [card] [Its webcall key](/documentation/deploy/web-and-apps/web-widget/overview)
>
> The `agentId` and the `Bearer` key from the agent's embed snippet.
> [card] [Your app allowed](/documentation/deploy/web-and-apps/web-widget/overview#allowed-clients)
>
> Each bundle or application ID, per platform and build flavor.
**React Native**
`@ringg/react-native` runs the widget in a React Native or Expo app with native views. You also need React 18+ and React Native 0.73+, in a development build or a bare app. Expo Go can't load the native LiveKit modules, so use an [Expo development build](https://docs.expo.dev/develop/development-builds/introduction/).
Files you touch, depending on your setup:
* app.json
* App.tsx
* ios/
* YourApp/
* Info.plist
* android/
* app/
* src/
* main/
* AndroidManifest.xml
## Install
```bash theme={null}
npm install @ringg/react-native
```
Then install the three native modules. Autolinking only links native code in your app's own `node_modules`, so the package can't bundle them:
```bash Expo theme={null}
npx expo install @livekit/react-native @livekit/react-native-webrtc react-native-svg
```
```bash Bare React Native theme={null}
npm install @livekit/react-native @livekit/react-native-webrtc react-native-svg
```
The `config` prop used below needs 0.4.0 or newer; on 0.3.0 you build the controller yourself.
## Platform setup
Voice calls need a microphone, background audio and the native transport's own manifest entries. Text chat needs none of it.
### Expo
Add the plugin to `app.json` and rebuild the development build. It applies everything the widget needs, on both platforms.
```json app.json theme={null}
{
"expo": {
"plugins": ["@ringg/react-native"]
}
}
```
To change the microphone prompt your users see:
```json app.json theme={null}
{
"expo": {
"plugins": [["@ringg/react-native", { "microphonePermissionText": "Talk to support." }]]
}
}
```
### Bare React Native
Bare apps have no config plugins, so add the same values by hand.
```xml ios/YourApp/Info.plist theme={null}
NSMicrophoneUsageDescriptionVoice calls use the microphone.UIBackgroundModesaudio
```
```xml android/app/src/main/AndroidManifest.xml theme={null}
```
## Mount the widget
Pass a config and make the widget the last child of your root view, so its floating trigger and panel draw over the rest of the app. It opens its own connection and handles the microphone, and releases both when it unmounts.
```tsx App.tsx theme={null}
import { Platform, View } from "react-native";
import { RinggWidget, appOrigin } from "@ringg/react-native";
const BUNDLE_ID = Platform.OS === "android" ? "com.acme.app" : "com.acme.App";
export const App = () => (
);
```
> [!TIP]
>
> Tapping the trigger opens the panel, and a chat or call connects to your agent.
Hand the install to Claude or Cursor. Fill in the agent ID, key and bundle IDs first.
Add the Ringg AI widget to this React Native app. Install @ringg/react-native, then @livekit/react-native, @livekit/react-native-webrtc and react-native-svg (with npx expo install on Expo). On Expo, add "@ringg/react-native" to expo.plugins in app.json; on a bare app, add NSMicrophoneUsageDescription and UIBackgroundModes audio to Info.plist and the INTERNET, RECORD\_AUDIO, MODIFY\_AUDIO\_SETTINGS, ACCESS\_NETWORK\_STATE and BLUETOOTH\_CONNECT permissions to AndroidManifest.xml. Render RinggWidget from @ringg/react-native as the last child of the root view with a config prop containing agentId "AGENT\_ID", authorization "Bearer WEBCALL\_PUBLIC\_KEY", clientOrigin set to appOrigin(BUNDLE\_ID) where BUNDLE\_ID is the Android application ID or iOS bundle ID for the current platform, and defaultTab "text". Pin exact package versions. Tell me which files you changed and remind me to rebuild the development build.
## Caller identity
The backend allow-lists an agent's callers by the `Origin` header. Browsers attach one automatically, which is how domain whitelisting works for the web widget. Native HTTP sends nothing, so a webcall request without a caller identity is refused before authentication is even considered.
| Response | Meaning |
| - | - |
| `400 Origin header is required` | No caller identity was sent. |
| `403 Client '…' is not allowed to initiate webcall` | One was sent, but it is not on the agent's allowed clients list. |
| `401 Invalid credentials` | The identity was accepted, but the token is wrong for that environment. |
Add the value to the agent's allowed clients: open the agent, then **Embed & Widgets** → **Install & domains** → **Allowed clients**. Application ids differ per platform and per build flavor (`.debug`, `.staging`, `.dev`), so every build you ship needs its own entry. The value that was sent appears in the refused-call response, ready to paste.
> [!WARNING]
>
> Hybrid WebView runtimes report a shared identity (`capacitor://localhost`, `ionic://localhost`, `file://`) that is the same for every app built on that runtime. Allowing one admits all of them.
On React Native you pass the identity explicitly: `appOrigin(BUNDLE_ID)` in `App.tsx` above builds the `://` string, `android://com.acme.app` for that example. React Native can't read the bundle ID without a native module, so pass it in: a constant, or a value from your app config, is enough. `expo-application` can read it from the OS, but it is native code, so adding it means rebuilding the app.
## Notification sound
React Native has no built-in audio playback, so the widget plays no reply sound unless you pass a player through `ports`:
```tsx theme={null}
import { createAudioPlayer } from "expo-audio";
import { createNotificationPlayer, DEFAULT_CONFIG, RinggWidget } from "@ringg/react-native";
const notification = createNotificationPlayer(DEFAULT_CONFIG.notificationTuneUrl, (url) => createAudioPlayer(url).play());
;
```
`ports` overrides anything the widget wires by default, and leaves the rest alone.
## Testing hooks
Nodes carry a `testID` named after the web widget's [`data-ringg`](/documentation/deploy/web-and-apps/web-widget/styling) attribute with a `ringg-` prefix: `ringg-trigger-button`, `ringg-widget-root`, `ringg-header-title`, `ringg-message-input`, `ringg-end-call-confirm`. `header-status` has no counterpart; its text is the surrounding node's `accessibilityLabel`.
## Verify the integration
* The app is a development build, not Expo Go.
* The trigger appears above your app content on both platforms.
* Voice mode prompts for microphone permission and can start and end a call on a real device.
* Every shipped flavor's bundle ID is under **Allowed clients**.
* Unmount the screen during a call and confirm the microphone indicator clears.
## Known issues
* No frosted-glass blur behind the header and composer; those surfaces are near-opaque.
* The typing indicator has no gradient shimmer on the text; the ellipsis animates instead.
* Agent replies render bold, italic, inline code, links, lists, headings, code blocks, blockquotes and rules. Markdown tables show as plain text.
* Voice is unreliable on emulators: Android emulator networking often can't set up the media connection, and iOS simulators have no microphone. Test voice on a real device.
**Flutter**
`ringg_flutter` is written in Dart on `livekit_client`, with no platform bridge. Android, iOS, macOS, Windows and Linux are supported. You also need Dart 3.6+ and Flutter 3.27+. Files you touch:
* pubspec.yaml
* lib/
* ringg\_support.dart
* ios/
* Runner/
* Info.plist
* android/
* app/
* src/
* main/
* AndroidManifest.xml
## Install
```yaml pubspec.yaml theme={null}
dependencies:
ringg_flutter: ^0.1.5
```
Then run `flutter pub get`.
## Platform setup
Voice calls need microphone and audio permissions. Text chat works without them.
```xml ios/Runner/Info.plist theme={null}
NSMicrophoneUsageDescriptionVoice calls use the microphone.UIBackgroundModesaudio
```
```xml android/app/src/main/AndroidManifest.xml theme={null}
```
## Integrate
**1. Get your credentials**
In the agent's **Embed & Widgets → Install & domains**, switch the snippet to **Flutter**. It shows your `agentId` and `authorization: "Bearer "`. There are no URLs to configure.
The dashboard's Flutter snippet constructs `RinggWidgetController` without a second argument; `ringg_flutter` 0.1.5 requires `ControllerPorts(transport: …)`, as in the code below.
**2. Wire up a controller and widget**
Hold the transport and controller in a `State` so you can dispose of them.
```dart lib/ringg_support.dart theme={null}
import 'package:flutter/material.dart';
import 'package:ringg_flutter/ringg_flutter.dart';
class RinggSupport extends StatefulWidget {
const RinggSupport({super.key});
@override
State createState() => _RinggSupportState();
}
class _RinggSupportState extends State {
late final LiveKitTransport _transport;
late final RinggWidgetController _controller;
@override
void initState() {
super.initState();
_transport = createLiveKitTransport();
_controller = RinggWidgetController(
const RinggWidgetConfig(
agentId: 'your-agent-id',
authorization: 'Bearer your-webcall-public-key',
title: 'Support',
description: 'How can we help?',
defaultTab: MediaType.text, // or MediaType.audio
),
ControllerPorts(transport: _transport.transport),
);
}
@override
void dispose() {
_controller.destroy();
_transport.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) => RinggWidget(
controller: _controller,
transport: _transport, // enables the in-call audio visualizer
);
}
```
**3. Mount it over your app**
`RinggWidget` places its own floating trigger and panel, so give it the full screen on top of your content.
```dart theme={null}
Stack(
children: const [
YourApp(),
RinggSupport(),
],
)
```
> [!TIP]
>
> Tapping the trigger opens the panel, and a chat or call connects to your agent.
Hand the install to Claude or Cursor. Fill in the agent ID and key first.
Add the Ringg AI widget to this Flutter app. Add ringg\_flutter 0.1.5 to pubspec.yaml and run flutter pub get. Add NSMicrophoneUsageDescription and UIBackgroundModes audio to ios/Runner/Info.plist, and the INTERNET, RECORD\_AUDIO, ACCESS\_NETWORK\_STATE, CHANGE\_NETWORK\_STATE, MODIFY\_AUDIO\_SETTINGS, BLUETOOTH (maxSdkVersion 30), BLUETOOTH\_CONNECT and BLUETOOTH\_ADMIN (maxSdkVersion 30) permissions to AndroidManifest.xml. Create a StatefulWidget that in initState calls createLiveKitTransport(), then builds a RinggWidgetController from a RinggWidgetConfig with agentId 'AGENT\_ID', authorization 'Bearer WEBCALL\_PUBLIC\_KEY' and defaultTab MediaType.text, passing ControllerPorts(transport: transport.transport) as the second argument; in dispose call controller.destroy() and transport.dispose(); in build return RinggWidget(controller: controller, transport: transport). Mount that widget on top of the app in a Stack. Tell me which files you changed.
## Caller identity
The backend allow-lists an agent's callers by the `Origin` header. Browsers attach one automatically, which is how domain whitelisting works for the web widget. Native HTTP sends nothing, so a webcall request without a caller identity is refused before authentication is even considered.
| Response | Meaning |
| - | - |
| `400 Origin header is required` | No caller identity was sent. |
| `403 Client '…' is not allowed to initiate webcall` | One was sent, but it is not on the agent's allowed clients list. |
| `401 Invalid credentials` | The identity was accepted, but the token is wrong for that environment. |
Add the value to the agent's allowed clients: open the agent, then **Embed & Widgets** → **Install & domains** → **Allowed clients**. Application ids differ per platform and per build flavor (`.debug`, `.staging`, `.dev`), so every build you ship needs its own entry. The value that was sent appears in the refused-call response, ready to paste.
> [!WARNING]
>
> Hybrid WebView runtimes report a shared identity (`capacitor://localhost`, `ionic://localhost`, `file://`) that is the same for every app built on that runtime. Allowing one admits all of them.
On Flutter the package reads the running app's id and sends it as `://`, so there is nothing to pass; to pin one value across build flavors, see [Caller identity](/documentation/deploy/web-and-apps/mobile-apps/configuration#caller-identity).
## Example app
A runnable example ships in the package's **Example** tab on [pub.dev](https://pub.dev/packages/ringg_flutter/example).
## Verify the integration
* `flutter pub get` resolves and the app builds on both platforms.
* The trigger appears above your app content.
* Voice mode prompts for microphone permission and can start and end a call on a real device.
* Every shipped flavor's application ID is under **Allowed clients**.
* `_controller.destroy()` and `_transport.dispose()` run in `dispose()`. Confirm the mic indicator clears.
## Known issues
* iOS simulators (26.x) have no call audio: no microphone or playout device, so you can't hear the agent or unmute. Test voice on a real device or macOS. See Apple's forum threads [738346](https://developer.apple.com/forums/thread/738346) and [803364](https://developer.apple.com/forums/thread/803364).
* Voice on Android emulators often fails to connect because of emulator networking. Text chat works there; test voice on a real device.
## Next steps
> [card] [Configure the widget](/documentation/deploy/web-and-apps/mobile-apps/configuration)
>
> Every option, its type and its default.
> [card] [Handle events and actions](/documentation/deploy/web-and-apps/mobile-apps/events)
>
> Lifecycle events, controller methods, agent actions.
# Chat mode
Source: https://docs.ringg.ai/documentation/deploy/web-and-apps/web-widget/chat-mode
Run the Ringg AI web widget as a text chat: chat-first and chat-only embeds, a chat-tuned agent, prompt examples, and the legacy calendar and form widgets.
Use chat mode for support and lead capture on pages where people won't turn on a microphone, and add [Components](/documentation/deploy/web-and-apps/web-widget/components) so the [agent](/documentation/build-agents/agents/agent-types) can show forms and slot pickers in the thread.
## Before you start
> [card] [An installed widget](/documentation/deploy/web-and-apps/web-widget/overview)
>
> The mode is set in its `loadAgent` object.
## Choose the mode
| Mode | Settings | Visitor sees |
| - | - | - |
| Voice first | `defaultTab: "audio"`, `hideTabSelector: false` | Call and chat, call preselected. |
| Chat first | `defaultTab: "text"`, `hideTabSelector: false` | Call and chat, chat preselected. |
| Chat only | `defaultTab: "text"`, `hideTabSelector: true` | Chat only. |
| Voice only | `defaultTab: "audio"`, `hideTabSelector: true` | Call only. |
```javascript theme={null}
loadAgent({
agentId: "your-chat-agent-id",
authorization: "Bearer your-webcall-public-key",
defaultTab: "text",
hideTabSelector: true,
});
```
Add `bypassStartScreen: true` to skip the start screen, so a click on the trigger opens the chat straight away.
## Give chat its own agent
A prompt written for voice reads badly in text: it spells out numbers, avoids lists and keeps turns short for the ear. For a chat-only or chat-first embed, run a separate agent with a prompt written for reading.
**1. Clone the voice agent**
In **Assistants**, open the agent's menu and click **Clone**.
**2. Rewrite the prompt for text**
Allow short Markdown lists, give exact figures, and say when to show which component, for example `Show @[[lead_form]] once the visitor asks for a callback.`
**3. Embed the new agent**
Copy the snippet from the clone's **Embed & Widgets → Install & domains**, and set `defaultTab: "text"`.
\[!TIP] The widget opens on chat and the agent answers in your text style.
## Full chat-only embed
```javascript theme={null}
loadAgentsCdn("1.0.21", function () {
loadAgent({
agentId: "your-chat-agent-id",
authorization: "Bearer your-webcall-public-key",
defaultTab: "text",
hideTabSelector: true,
title: "Acme Lending chat",
description: "Ask about your EMI, or book a callback.",
logoUrl: "https://www.acme-lending.example/logo.svg",
buttons: {
modalTrigger: {
styles: { backgroundColor: "#2563eb" },
icon: { url: "https://www.acme-lending.example/chat-icon.svg", size: 24 },
},
},
feedbackScreen: {
title: "How was your chat?",
submitBtnCTA: "Send",
},
});
});
```
Every option is in the [configuration reference](/documentation/deploy/web-and-apps/web-widget/configuration).
## Prompt examples
Mention each component at the point in the prompt where it should appear, and have the agent confirm what the component returned.
```text Callback booking theme={null}
You are the support assistant for Acme Lending. Answer questions about loans
and EMIs from the knowledge base.
- If the visitor wants to talk to a person, show @[[callback_slots]] so they
can pick a time.
- After they pick a slot, confirm the date, time and timezone in one line.
- Keep replies under four sentences. This is a chat, not an email.
```
```text Lead capture theme={null}
You qualify loan enquiries for Acme Lending.
- First find out what the visitor needs: loan type and rough amount.
- Then show @[[lead_form]] to collect name, phone and email. Don't ask for
those fields in the conversation; the form collects them.
- After the form is submitted, thank them and say an advisor will call
within one working day.
```
## Legacy widgets
Before Components, agents used fixed-purpose widgets. Agents that already have them still list them under **Embed & Widgets → Components → Legacy widgets**, where you can switch each on or off or open it to edit. New legacy widgets can't be added; build a [component](/documentation/deploy/web-and-apps/web-widget/components) instead.
* **Calendar**: **Slot Duration (Days)** 1 to 7, default 1. **Slot Interval (Minutes)** 30, 60 or 90, default 30. **Start Time** and **End Time** (24h), default 09:00 to 18:00. **Max slots to show**: **Default**, or a number up to what the window and interval allow. **Timezone**, default `Asia/Kolkata`. An optional API call on booking (**API URL**, **Method**, headers, **Request Body**).
* **Form**: **Form Title** (default "Fill in your details") and **Submit Button Label** (default "Submit"). Field types: **Text**, **Textarea**, **Number**, **Email**, **Phone Number**, **Single Select**, **Multi Select**, **Checkbox**, **Date**. An optional API call on submit.
* **Quick Reply**: **Reply Mode** is **Options** (fixed choices you type, four rows by default, **Add Option** for more) or **LLM inferred** (the agent generates the choices from an **Inference Prompt** describing what to offer).
* **Execute DOM Action**: events the agent fires on your page. See [agent actions](/documentation/deploy/web-and-apps/web-widget/data#agent-actions).
* **Disease Acceptance**: a **Tool Name** and a **Prompt** holding the underwriting instructions for accepting or declining a disease declaration.
## Next steps
> [card] [Build a component](/documentation/deploy/web-and-apps/web-widget/components)
>
> Forms, cards and pickers the agent shows in chat.
> [card] [Prepare for launch](/documentation/deploy/web-and-apps/web-widget/launch-checklist)
>
> Domains, CSP (Content Security Policy: the header that controls which scripts and styles your site may load.), version pinning and browser QA.
# Chat components
Source: https://docs.ringg.ai/documentation/deploy/web-and-apps/web-widget/components
Build the cards, forms and slot pickers a Ringg AI agent shows inside a web chat: describe one in plain words, edit its blocks, then mention it in the prompt.
The visitor acts on a component in the thread, and what they tap or type goes back to the [agent](/documentation/build-agents/agents/agent-types). Build one when the agent needs structured input or has to show more than a sentence.
In the dashboard: **Assistants → your agent → Embed & Widgets → Components**. If your agent has no **Components** tab, contact Ringg.
## Before you start
> [card] [An installed widget](/documentation/deploy/web-and-apps/web-widget/overview)
>
> Components render only in the web widget's chat thread.
> [card] [A 2.0 widget version](/documentation/deploy/web-and-apps/web-widget/launch-checklist#version-pinning)
>
> The 1.0 line can't render them; pin a `2.0.0-beta` build.
> [card] [A chat-mode embed](/documentation/deploy/web-and-apps/web-widget/chat-mode)
>
> Components are designed for text conversations.
## Build a component
**1. Open the Components tab**
Click **New component**. Everything you build is listed on this tab; agents that still have fixed-purpose widgets also see them below, under [Legacy widgets](/documentation/deploy/web-and-apps/web-widget/chat-mode#legacy-widgets).
Embed & Widgets → Components → New component.
**2. Pick a starting point**
Six templates ship with the builder: **Start blank**, **Plan comparison**, **Lead form**, **Info card**, **Calendar slots** and **Quick actions**. Picking one opens the builder; every block, label, colour and action stays editable.
Choosing Start blank opens the builder on an empty canvas.
**3. Describe what you need**
The **Chat** panel builds the component from a plain-English description:
```text theme={null}
Create a family member detail collection form that collects full name,
age, city and relationship for one member at a time, with a submit button
```
To build from a design instead, use **Add an image or screenshot**: up to three PNG, JPEG or WebP images.
Typing the description, sending it, and the component being built (build fast-forwarded).
**4. Save it, then use it in the agent**
Check it collects what you asked for, set **Name** (the mention token is shown beneath it), then click **Save**.
Save before you edit the prompt: the `@` menu offers only saved, enabled components. Type `@` where the component should appear and pick it under **Chat Components**; it inserts as a mention chip.
```text theme={null}
When the user agrees to add dependants, show @[[family_member_details_form]]
and collect one member at a time.
```
The token comes from the name: lowercased, each run of characters outside `a-z0-9` turned into one `_`, leading and trailing `_` dropped, cut to 48 characters. A component created from a template whose name is taken gets a number (`lead_form_2`); a duplicated one gets `_copy`.
Saving the component, then inserting its mention in the agent's prompt from the @ menu.
**5. Tune any block by hand**
Open the **Blocks** panel and select any block; its inspector opens on the right. In the video, the **City** input goes to 50% width and its label becomes "Current city". The preview updates as you type.
Selecting the City input, then editing its width and label.
**6. Keep iterating in chat**
Back in **Chat**, ask for a change such as "Add one more button for adding new member" and it edits the existing component. Switch between chat and hand-editing freely, then **Save**.
A follow-up instruction editing the existing component (rebuild fast-forwarded).
Use chat for structure ("a card with an image, three facts and two buttons") and the inspector for exact values such as a width or an Action ID. The preview switches between **Component** and **In chat**, and **Interact** lets you click through it on sample data; real values arrive during the conversation.
## Show it in a conversation
**Send agent text with widget** is off by default, so the component is sent on its own, which reads better in chat. Turn it on to let the agent add a sentence alongside it.
## Blocks
A component is a tree of typed blocks. The builder's add-block palette groups them as below.
### Layout
| Type | Builder name | Notes |
| - | - | - |
| `card` | Card | Bordered surface that groups blocks. |
| `carousel` | Carousel | Horizontally swipeable set of children. |
| `column` / `row` | Stack | Vertical or horizontal; flip the direction in the inspector. |
| `form` | Form | Groups inputs for one submit. A **Send to agent** button inside it sends only this form's inputs. |
| `expander` | Expander | Collapsible "view details" section. |
| `box` | Box | Plain container. Not in the palette; appears in generated components. |
### Content
| Type | Builder name | Notes |
| - | - | - |
| `header` | Heading | Levels 1 to 3. |
| `text` | Text | Body copy. |
| `image` | Image | Picture by URL. See [Render an image](/documentation/deploy/web-and-apps/web-widget/data#render-an-image). |
| `facts` | Facts | Label and value pairs. |
| `table` | Table | Up to 4 columns. |
| `steps` | Steps | Progress through ordered steps; `current` is 1-based. |
| `badge` | Badge | Tone: `neutral`, `info`, `success`, `warning`, `danger`. |
| `callout` | Callout | Tone: `info`, `success`, `warning`, `error`. |
| `divider` | Divider | Horizontal rule. |
### Inputs
Every input has a **name**; the submitted value arrives under that key.
| Type | Builder name | Notes |
| - | - | - |
| `input_text` | Text input | Single line. |
| `input_textarea` | Long text | Multi-line. |
| `input_email` | Email | Checked for format. |
| `input_phone_number` | Phone | |
| `input_number` | Number | |
| `input_date` | Date | Date picker. |
| `input_time` | Time | Time picker. |
| `input_checkbox` | Checkbox | Yes or no. |
| `input_single_select` | Dropdown | One option, as a dropdown or pills. |
| `input_multi_select` | Multi-select | Several options, as checkboxes or pills. |
| `input_rating` | Rating | `max` 3 to 10. |
### Actions
`button` is the only block that reacts to a tap. What a tap does is set under **When tapped**; see [Working with data](/documentation/deploy/web-and-apps/web-widget/data).
### Sizing
`width` is a percentage of the parent (0 to 100). `height`, `font_size`, `gap` and `padding` are pixels.
A button with no width set fills its parent, so two buttons side by side need explicit widths. Put them in a **Stack** set to horizontal and give each `50`.
### Conditional and repeated blocks
To show a block only for some answers, give it a condition on an input's value: `eq`, `ne`, `in`, `gt`, `lt` or `truthy`. Combine several in one `all` or `any` group; groups don't nest.
To repeat a block over a list, point it at an array binding. It renders once per item, with the item under an alias you choose, plus its index:
```text theme={null}
source ${{api_res.plans}}
as plan
max_items 20
```
Inside the repeated block, `${{plan.name}}` and `${{plan_index}}` resolve per item. `max_items` accepts 1 to 50 and defaults to 20. Give repeated inputs a bound name such as `qty_${{item.id}}`, so each copy submits under its own key.
## Styling
Components inherit the widget [theme](/documentation/deploy/web-and-apps/web-widget/configuration#theme). For anything else, every rendered block carries a `data-ringg` attribute; see [Styling](/documentation/deploy/web-and-apps/web-widget/styling#components).
## Common questions
> [accordion] The component isn't in the @ menu
>
> Save it in the builder and check its switch on the **Components** tab, then type `@` again.
> [accordion] Can I delete a component the prompt still mentions?
>
> No. Ringg refuses to delete or turn off a component the prompt still mentions, with "Remove tool references from the prompt before deleting the tool." Remove the mention from the prompt first.
> [accordion] Does it work on the 1.0 CDN version?
>
> No; see [Pick a CDN version](/documentation/deploy/web-and-apps/web-widget/overview#install-the-widget). The React Native and Flutter packages render them natively.
## Next steps
> [card] [Wire it to your API](/documentation/deploy/web-and-apps/web-widget/data)
>
> Fetch data before showing, send data on tap, fire page events.
> [card] [Copy a recipe](/documentation/deploy/web-and-apps/web-widget/recipes)
>
> Lead capture, live pricing, slot booking, downloads.
# Web widget configuration
Source: https://docs.ringg.ai/documentation/deploy/web-and-apps/web-widget/configuration
Reference for every loadAgent option in the Ringg AI web widget: bundles, variables, theme, trigger button, positioning, window size and feedback screen.
`loadAgent` takes one object that controls how the [web widget](/documentation/deploy/web-and-apps/web-widget/overview) looks and starts on your page. The agent's prompt, voice and tools stay in the dashboard. Settings from the **Appearance** tab in [Web widget overview](/documentation/deploy/web-and-apps/web-widget/overview#appearance) are written into the copied snippet as these same fields.
Options marked 2.0 need a `2.0.0-beta` CDN version. See [Pick a CDN version](/documentation/deploy/web-and-apps/web-widget/overview#install-the-widget).
## CDN bundles
The CDN exposes `loadAgent` on `window` once the script has loaded. Two builds are published:
| Bundle | Use it on |
| - | - |
| `dv-agent.es.js` | Pages built with Vite, webpack or Next.js, or code inside `
```
```html UMD build theme={null}
```
## Full example
```javascript theme={null}
loadAgentsCdn("1.0.21", function () {
loadAgent({
agentId: "your-agent-id",
authorization: "Bearer your-webcall-public-key",
variables: { callee_name: "Priya", loan_id: "AL-1042" },
defaultTab: "audio",
title: "Acme Lending support",
description: "Ask about your EMI or start a call.",
theme: { primaryColor: "#2563eb", buttonStyle: "pill" },
buttons: {
modalTrigger: { styles: { backgroundColor: "#2563eb", borderRadius: "50%" } },
call: { textBeforeCall: "Talk to us" },
},
widgetPosition: { triggerAlignment: "bottom-right", widgetAlignment: "bottom-right" },
});
});
```
## Core options
`variables`, the key and everything else in this object are readable in the page source. Never put passwords, internal tokens or personal data in them.
**agentId** `string` *required*
The agent to load.
**authorization** `string` *required*
`Bearer `, from the dashboard snippet.
**variables** `object` (default: \{})
Values for the agent's [variables](/documentation/build-agents/customize-agent-behaviour/custom-variables), such as `callee_name`.
**defaultTab** `"audio" | "text"` (default: audio)
`"audio"` opens on voice, `"text"` on chat.
**hideTabSelector** `boolean` (default: false)
`true` shows only the `defaultTab` mode.
**bypassStartScreen** `boolean` (default: false)
A trigger click starts the `defaultTab` conversation directly. From 1.0.20.
**bypassFeedbackScreen** `boolean` (default: false)
Skips the rating screen after a conversation. 2.0
**defaultExpanded** `boolean` (default: false)
Opens the panel on page load. 2.0
**title** `string` (default: Ringg AI Support)
Start-screen heading.
**description** `string`
Start-screen text under the title. Defaults to Ringg's copy.
**logoUrl** `string`
Logo in the header. From 1.0.10.
**legalDisclaimer** `\{ text, links \}`
Replaces the privacy and terms text shown before a conversation. Words in `text` that match a key in `links` link to that URL.
**typingWords** `string[]` (default: Thinking, Reasoning, Working on it, Almost there)
Words cycled while a reply is pending. 2.0
**theme** `object`
Colors and corners. See [Theme](#theme).
**buttons** `object` (default: \{})
Trigger and start buttons. See [Buttons](#buttons).
**widgetPosition** `object`
Fixed, bottom right by default. See [Position](#position).
**innerWindowProps** `object`
Panel size, 400 × 456 px by default (95% of the screen width on mobile). See [Window size](#window-size).
**feedbackScreen** `object`
Ringg copy and 5 stars by default. See [Feedback screen](#feedback-screen).
**eventLogs** `\{ enabled, showIds \}` (default: \{ enabled: false })
Shows a pill in the chat each time an [agent action](/documentation/deploy/web-and-apps/web-widget/data#agent-actions) fires. 2.0
## Theme
Every color accepts a hex value or a CSS gradient string. [Components](/documentation/deploy/web-and-apps/web-widget/components) inherit these values.
**theme.primaryColor** `string`
Buttons, selected states, the trigger and the typing shimmer.
**theme.primaryTextColor** `string`
Text on `primaryColor`.
**theme.backgroundColor** `string`
Panel background.
**theme.surfaceColor** `string`
Cards, inputs and the visitor's message bubble.
**theme.agentBubbleColor** `string`
Puts agent messages in a bubble of this color. Unset, they render as plain text. 2.0
**theme.textColor** `string`
Body text.
**theme.mutedTextColor** `string`
Secondary text.
**theme.borderColor** `string`
Borders and dividers.
**theme.errorColor** `string`
Error states.
**theme.successColor** `string`
Success states.
**theme.borderRadius** `string`
Corner radius of the panel, cards and inputs, for example `"20px"`.
**theme.buttonStyle** `"rounded" | "pill" | "square"`
Button corner style.
## Buttons
```javascript theme={null}
buttons: {
modalTrigger: {
styles: { backgroundColor: "#2563eb", width: 64, height: 64, borderRadius: "50%" },
icon: { url: "https://www.acme-lending.example/chat-icon.svg", size: 28 },
},
call: { textBeforeCall: "Talk to us" },
text: { textBeforeCall: "Message us" },
},
```
**buttons.modalTrigger.styles** `object`
CSS properties for the floating trigger.
**buttons.modalTrigger.icon.url** `string`
Trigger icon image. Defaults to the Ringg phone icon.
**buttons.modalTrigger.icon.size** `number` (default: 24)
Icon width and height in pixels. 25 on 1.0.
**buttons.call.textBeforeCall** `string` (default: Start Call)
Label on the start-call button.
**buttons.text.textBeforeCall** `string` (default: Start Chat)
Label on the start-chat button.
On 2.0, when both buttons show side by side, the defaults shorten to **Call** and **Chat**.
## Position
From 1.0.19.
**widgetPosition.triggerPlacement** `"fixed" | "absolute"` (default: fixed)
`"fixed"` floats over the viewport. `"absolute"` places the widget inside the `ringg_ai_container` element.
**widgetPosition.triggerAlignment** `string` (default: bottom-right)
`"center"`, `"top-left"`, `"top-right"`, `"bottom-left"` or `"bottom-right"`.
**widgetPosition.widgetAlignment** `string` (default: bottom-right)
`"bottom-left"`, `"bottom-center"` or `"bottom-right"`.
**widgetPosition.hideTriggerOnExpand** `boolean` (default: true)
Hides the trigger while the panel is open.
For absolute placement, add the container before `loadAgent` runs and give it a height. Without it, the widget creates `ringg_ai_container` at the end of ``.
```html theme={null}
```
```javascript theme={null}
loadAgent({
agentId: "your-agent-id",
authorization: "Bearer your-webcall-public-key",
widgetPosition: { triggerPlacement: "absolute", triggerAlignment: "center" },
});
```
## Window size
`innerWindowProps` sets the open panel's `width`, `height` and `borderRadius`. Numbers are pixels; strings pass through as CSS. The **Size** controls in **Appearance** allow width 280–600 px, height 300–700 px and radius 0–40 px.
```javascript theme={null}
innerWindowProps: { width: 420, height: 560, borderRadius: 16 },
```
## Feedback screen
Shown after a conversation ends, unless `bypassFeedbackScreen` is `true`. A submitted or skipped rating fires `ringg:feedback_status`; see [Events](/documentation/deploy/web-and-apps/web-widget/events).
```javascript theme={null}
feedbackScreen: {
title: "How was your call?",
description: "Your rating helps us improve.",
starsCount: 5,
submitBtnCTA: "Send",
},
```
**feedbackScreen.title** `string`
Heading above the stars.
**feedbackScreen.description** `string`
Text under the heading.
**feedbackScreen.starsCount** `number` (default: 5)
Number of stars. **Appearance** offers 3 to 5.
**feedbackScreen.starsStyles** `\{ filledColor, emptyColor \}`
Star colors.
**feedbackScreen.placeholder** `string`
Comment box placeholder.
**feedbackScreen.submitBtnCTA** `string`
Submit button label.
Related topics
# Chat component data
Source: https://docs.ringg.ai/documentation/deploy/web-and-apps/web-widget/data
Fill a Ringg AI chat component from your API before it shows, send what the visitor tapped or typed to your API, and fire browser events on your own page.
Pick the mechanism by the direction the data moves:
| You want to | Use |
| - | - |
| Fill the component from your API before it shows | [Fetch data before showing](#fetch-data-before-showing) |
| Send what the visitor tapped or typed to your API | [Call an API on response](#call-an-api-on-response) |
| Run code on your page when a button is tapped | [Page event](#fire-an-event-on-your-page) |
| Send the visitor to a URL | [Open a link](#open-a-link) |
| Let the agent run code on your page without a component | [Agent actions](#agent-actions) |
**Fetch data before showing** and **Call an API on response** live in the component's **Advanced** settings; the rest is set under a button's **When tapped**.
## Before you start
> [card] [A saved component](/documentation/deploy/web-and-apps/web-widget/components)
>
> Everything here is set in its builder under **Embed & Widgets → Components**.
> [card] [A 2.0 widget version](/documentation/deploy/web-and-apps/web-widget/launch-checklist#version-pinning)
>
> Components and agent actions run from a `2.0.0-beta` build.
## Fetch data before showing
The request runs when the component is sent, and the response is available to blocks as `${{api_res.…}}`. Use it for anything that must be current: live pricing, the visitor's open orders, slots that are still free.
Set the method (`GET`, `POST`, `PUT` or `PATCH`), the URL, and rows for headers, query params and body. There is no separate auth setting, so add an `Authorization` header row. In the request you can use your component [parameters](#parameters) and the agent's variables as `${{custom_args.}}`.
Once the URL is set, blocks can bind to the response:
| Binding | Resolves to |
| - | - |
| `${{api_res}}` | The whole JSON response. |
| `${{api_res.plans}}` | The response's `plans` field. |
A binding can sit inside a longer string, such as `₹${{plan.premium}}/mo`.
## Call an API on response
This request fires when the visitor taps a **Send to agent** button. It takes the same method, URL, header, query and body fields, and offers these bindings:
| Binding | Value |
| - | - |
| `${{component_data.action_id}}` | The **Action ID** of the tapped button. |
| `${{component_data.value}}` | That button's **Value**. |
| `${{component_data.values.}}` | A submitted input, by its name. |
## Submit a form
There is no separate submit action. A **Send to agent** button inside a `form` block also submits that form's named inputs. The widget sends the agent the button's **Action ID**, its **Value** if set, and the input values:
```json theme={null}
{
"action_id": "submit_lead",
"values": {
"full_name": "Priya Sharma",
"loan_type": "Home loan",
"amount": 2500000
}
}
```
To forward the same values to your CRM, reference the input names in the **Call an API on response** body:
```json theme={null}
{
"name": "${{component_data.values.full_name}}",
"loan_type": "${{component_data.values.loan_type}}",
"amount": "${{component_data.values.amount}}",
"source": "ringg-chat"
}
```
## Fire an event on your page
Set **When tapped** to **Page event** and enter an **Event name**. The name is lowercased, spaces become `_`, and only `a-z`, `0-9`, `_`, `-` and `:` are kept. A tap dispatches a `CustomEvent` with that name on `window`; `event.detail` carries the button's `value` and `action_id`.
```javascript theme={null}
window.addEventListener("ringg:open_pricing", (event) => {
const { value, action_id } = event.detail;
document.querySelector("#pricing")?.scrollIntoView({ behavior: "smooth" });
});
```
A page event doesn't reach the agent. If the agent should know the visitor acted, use **Send to agent** instead.
## Open a link
Set **When tapped** to **Open a link** for a brochure, a policy PDF, a payment page or a phone number. Enter the **URL**; **Open in new tab** is on by default.
The URL must start with `https://`, `mailto:` or `tel:`, or be a binding such as `${{api_res.brochure_url}}`. Return the full URL from your API when it differs per visitor or plan.
Opening a link tells the agent nothing. Put a **Send to agent** button next to it when the agent should follow up.
## Render an image
The `image` block takes a `url` and an optional `alt`. Set a width or height in the inspector. To show an image from your API, bind the URL to the complete address your API returns:
```text theme={null}
url ${{api_res.photo_url}}
alt Home loan plan illustration
```
## Parameters
Parameters are values filled in each time the component is shown, such as the plans to compare or the order to display. Add them under **Parameters** with a key, a description and a type: `string`, `number`, `boolean`, `array` or `object`. Keys keep only `a-z`, `0-9` and `_`.
| Kind | Filled from |
| - | - |
| **Dynamic** | The agent, from the conversation. Its description and test value are what the agent is shown, so say exactly what belongs in it. |
| **Variable** | An agent [variable](/documentation/build-agents/customize-agent-behaviour/custom-variables). The test value only fills the preview. |
| **Static** | A fixed value saved in the component. |
## What you can bind to
| Root | Where |
| - | - |
| `${{}}` | Blocks, and the fetch request. |
| `${{custom_args.}}` | Blocks, and the fetch request. |
| `${{api_res…}}` | Blocks, once **Fetch data before showing** has a URL. |
| `${{}}`, `${{_index}}` | Inside a repeated block. |
| `${{component_data…}}` | **Call an API on response** only. |
An input's name is not a binding: you can't show what the visitor typed in another block. Input values reach the agent and your API only after a submit.
## Agent actions
An agent action lets the agent fire a browser event on your page during a conversation, with nothing for the visitor to tap: focus the search box, open a promo modal, scroll to pricing. Actions are configured in the **Execute DOM Action** legacy widget, so they are available only on agents that already have one under **Embed & Widgets → Components → Legacy widgets**. The web widget runs them from CDN version `2.0.0-beta`.
Each entry under **Actions** has:
| Field | What it is |
| - | - |
| **Event ID** | The event name your page listens for, for example `ringg:click_subscribe`. |
| **Description** | When the agent should fire it. |
| **Payload Schema** (optional) | Fields sent with the event. |
When the agent fires an action, the widget dispatches a `CustomEvent` on `window` named after the **Event ID**. `event.detail` holds the payload fields plus `action_id`.
```javascript theme={null}
window.addEventListener("shop_show_promo", (event) => {
const { discount_pct, product_id } = event.detail;
openPromoModal({ discount: discount_pct, productId: product_id });
});
```
In React, remove the listener on unmount, as for [widget events](/documentation/deploy/web-and-apps/web-widget/events#clean-up-in-single-page-apps).
While building, add `eventLogs: { enabled: true }` to `loadAgent`. Each fired action then shows as a pill in the chat (**Triggered** and the event name), and failures show as **Event missing name** or **Action failed**. Add `showIds: true` to include the action ID.
Prefix Event IDs with your own namespace (`shop_…`) so they don't collide with other events on the page. These are separate from the widget's own [lifecycle events](/documentation/deploy/web-and-apps/web-widget/events).
## Verify the wiring
* With your real endpoint in **Fetch data before showing**, the component shows live values and no raw `${{…}}`.
* A **Send to agent** tap reaches your **Call an API on response** endpoint with the expected input names.
* Each **Page event** and agent action has a listener, and fires once per tap or action.
## Next steps
> [card] [Copy a recipe](/documentation/deploy/web-and-apps/web-widget/recipes)
>
> Lead capture, live pricing, downloads and more.
> [card] [Prepare for launch](/documentation/deploy/web-and-apps/web-widget/launch-checklist)
>
> Domains, CSP (Content Security Policy: the header that controls which scripts and styles your site may load.), versions and browser QA.
# Web widget events
Source: https://docs.ringg.ai/documentation/deploy/web-and-apps/web-widget/events
Listen for the browser events the Ringg AI web widget fires when it opens or closes, a call or chat starts or ends, and a visitor rates the conversation.
Each is a `CustomEvent` on `window`. Use them to send analytics, hide a competing chat launcher, or start a follow-up after the conversation.
Events the agent fires on purpose during a conversation (focus a field, open a modal) are a different feature: see [Agent actions](/documentation/deploy/web-and-apps/web-widget/data#agent-actions).
## Before you start
> [card] [An installed widget](/documentation/deploy/web-and-apps/web-widget/overview)
>
> The events fire from CDN version 1.0.17 onward.
## Event reference
| Event | Fires when | `event.detail` |
| - | - | - |
| `ringg:widget_status` | The panel opens or closes. | `status`: `"maximised"` or `"minimised"`. `mode`: `"audio"` or `"text"`. |
| `ringg:conversation_status` | A call or chat starts or ends. | `status`: `"started"` or `"ended"`. `mode`. `callId`. |
| `ringg:feedback_status` | The visitor submits or skips the rating. | `status`: `"submitted"` or `"skipped"`. `callId`. `rating` (submitted only). |
| `ringg:calendar_booking` | A legacy calendar or form is shown or completed. On `2.0.0-beta` builds it also fires for every [component](/documentation/deploy/web-and-apps/web-widget/components) shown and every button tap on one, not only calendars. | `status`: `"shown"` or `"confirmed"`. `componentId`. `message` (confirmed only). |
## Send events to analytics
```javascript theme={null}
window.addEventListener("ringg:conversation_status", (event) => {
const { status, mode, callId } = event.detail;
analytics.track(status === "started" ? "Ringg conversation started" : "Ringg conversation ended", { mode, callId });
});
window.addEventListener("ringg:feedback_status", (event) => {
const { status, rating, callId } = event.detail;
if (status === "submitted") analytics.track("Ringg rating", { rating, callId });
});
```
## React to the panel
Hide your own support launcher while the widget is open:
```javascript theme={null}
const supportLauncher = document.querySelector("[data-support-launcher]");
window.addEventListener("ringg:widget_status", (event) => {
if (supportLauncher) supportLauncher.hidden = event.detail.status === "maximised";
});
```
## Clean up in single-page apps
Add listeners once and remove them on unmount; otherwise every client-side navigation adds another handler.
```javascript theme={null}
import { useEffect } from "react";
export function RinggEventBridge() {
useEffect(() => {
function onConversation(event) {
console.log(event.detail);
}
window.addEventListener("ringg:conversation_status", onConversation);
return () => window.removeEventListener("ringg:conversation_status", onConversation);
}, []);
return null;
}
```
## Verify your listeners
* Opening and closing the panel fires one `ringg:widget_status` each.
* A test call fires `ringg:conversation_status` twice, both with the same `callId`.
* Submitting and skipping the rating (in separate runs) each fire `ringg:feedback_status`.
* After navigating away and back in your app, each event still fires once.
## Next steps
> [card] [Drive your page from the agent](/documentation/deploy/web-and-apps/web-widget/data#agent-actions)
>
> Let the agent focus fields, open modals or scroll.
> [card] [Prepare for launch](/documentation/deploy/web-and-apps/web-widget/launch-checklist)
>
> Domains, CSP (Content Security Policy: the header that controls which scripts and styles your site may load.), version pinning and browser QA.
# Web widget launch checklist
Source: https://docs.ringg.ai/documentation/deploy/web-and-apps/web-widget/launch-checklist
Check the Ringg AI web widget before launch: placement, webcall key handling, allowed clients, CSP entries, CDN version pinning, browser QA and common failures.
Most launch failures come from four places: an origin missing from **Allowed clients**, a CSP (Content Security Policy: the header that controls which scripts and styles your site may load.) that blocks the CDN, an unpinned CDN version that changes under you, and the wrong bundle on a jQuery page.
## Before you start
> [card] [An installed widget](/documentation/deploy/web-and-apps/web-widget/overview)
>
> Run this list on the staging embed before it goes to production.
## Set it up well
A webcall agent runs in the visitor's browser, so what it knows and how it is found depend on the page as much as on the prompt.
* Paste the snippet before the closing `` tag. It loads the widget script itself, so it does not block the page. Keep the default bottom-right position unless your page has something there; move it with `widgetPosition` ([configuration](/documentation/deploy/web-and-apps/web-widget/configuration#position)).
* Pass page context, such as the product a visitor is viewing, through `variables` so the agent can refer to it, and make the agent's first message say what it can help with.
* Match the widget to your brand under **Appearance** in [Web widget overview](/documentation/deploy/web-and-apps/web-widget/overview#appearance), or with [`data-ringg` styling](/documentation/deploy/web-and-apps/web-widget/styling) on a 2.0 version.
* Some visitors can't or won't talk: see [Chat mode](/documentation/deploy/web-and-apps/web-widget/chat-mode) for chat-first embeds and a prompt written for reading.
## Security
* The snippet uses the agent's webcall public key, never your workspace [API key](/documentation/manage-account/api-key) ([why](/documentation/deploy/web-and-apps/web-widget/overview#before-you-start)).
* `variables` hold no passwords, internal tokens or personal data. Anyone can read them in the page source.
* Analytics handlers treat `callId` and any user identifiers according to your privacy policy.
If the key is used from somewhere it shouldn't be, [rotate it](/documentation/deploy/web-and-apps/web-widget/overview#rotate-the-webcall-key) and redeploy the new snippet in the same window.
## Allowed clients
Add each origin the widget runs on, and nothing you don't own, for example:
| Environment | Entry |
| - | - |
| Staging | `staging.acme-lending.example` |
| Production | `www.acme-lending.example` |
Ringg checks each entry when you add it and shows the reason inline if it refuses one. Add staging separately so you can test a new CDN version or CSP change there first.
## CSP setup
If your site sends a Content Security Policy, allow jsDelivr:
```text theme={null}
script-src 'self' https://cdn.jsdelivr.net;
style-src 'self' https://cdn.jsdelivr.net;
```
To pin exact files, match the version and the bundle your loader uses:
```text ES build theme={null}
script-src 'self' https://cdn.jsdelivr.net/npm/@desivocal/agents-cdn@1.0.21/dist/dv-agent.es.js;
style-src 'self' https://cdn.jsdelivr.net/npm/@desivocal/agents-cdn@1.0.21/dist/style.css;
```
```text UMD build theme={null}
script-src 'self' https://cdn.jsdelivr.net/npm/@desivocal/agents-cdn@1.0.21/dist/dv-agent.umd.js;
style-src 'self' https://cdn.jsdelivr.net/npm/@desivocal/agents-cdn@1.0.21/dist/style.css;
```
When you upgrade, change the loader version and the CSP paths in the same deploy.
## Version pinning
Ship the exact version you tested, the same string in `loadAgentsCdn` and in your CSP:
```javascript theme={null}
loadAgentsCdn("1.0.21", function () {
loadAgent({
agentId: "your-agent-id",
authorization: "Bearer your-webcall-public-key",
});
});
```
`latest` follows the 1.0 line and moves when a new 1.0 release is published. [Components](/documentation/deploy/web-and-apps/web-widget/components) and [`data-ringg` styling](/documentation/deploy/web-and-apps/web-widget/styling) need a `2.0.0-beta` version.
## Browser QA
* The trigger sits where you expect at desktop, tablet and mobile widths.
* Voice mode asks for the microphone and handles both allow and deny. A call that won't start is usually a denied microphone or a page not served over HTTPS.
* A test call connects, the agent is audible, and the call ends cleanly.
* With `defaultTab: "text"`, chat sends and receives messages. If the widget opens in the wrong mode, check `defaultTab` and `hideTabSelector` in the deployed `loadAgent` object.
* Components render real data: no `${{…}}` visible, required inputs block submit, **Send to agent** locks the component.
* **Open a link** and **Page event** buttons work, and their listeners survive client-side navigation.
* [Widget events](/documentation/deploy/web-and-apps/web-widget/events) fire once per action, including after client-side navigation.
* No blocked CDN, CSP or mixed-content errors in the console or network panel.
## Launch day
1. The deployed `agentId` is the agent you tested, and every production origin is under **Allowed clients**.
2. The snippet uses the current webcall key, the pinned CDN version, the right bundle for the page, and the intended `defaultTab`, `variables` and styling.
3. The production CSP headers are tested on the live page, not only in staging.
4. One real conversation: start and end a call or chat, submit a rating, confirm your event handlers received the payloads, then find the call in [Logs](/documentation/monitor/logs) under call type **Webcall**.
## Troubleshooting
> [accordion] Works on staging, not on production
>
> The production origin is missing from **Allowed clients**, or the production CSP pins a different version than the loader.
> [accordion] jQuery's \$ is undefined after the widget loads
>
> The page loads `dv-agent.es.js` as a plain `
```
> [!WARNING]
>
> The snippet loads `dv-agent.es.js` as a plain `