Skip to main content
This guide connects two everyday jobs to your own systems: onboarding and offboarding counsellors, and rolling out a new AI agent (or switching back). Read Counsellors and Managing agents for the rules behind each step. You need: an API key created with Can manage counsellors and/or Can manage AI agents ticked (Getting API access). Keep this key on your server, separate from the key your CRM uses to place calls: it can add logins to your account and change what your callers hear.

Onboarding and offboarding counsellors

1

Add the counsellor when they join

Use your employee id as the Idempotency-Key, so a retried request never adds them twice:
A new person receives the welcome email with their login. Someone you had removed earlier gets their old login back and receives nothing: tell them to sign in as usual. Store the returned id.
2

Keep their details in step

When the mobile number or Airtel extension changes in your system, PATCH just that field:
A 409 shared_account means the login is also used in another account on the platform; ask the counsellor to change their name or number in their own profile.
3

Deactivate them when they leave

They can no longer sign in to your account, stop receiving new leads and inbound calls, and are taken out of your IVR ring lists. Their existing leads stay assigned to them: reassign them in the dashboard. Check effects.ivr_dial_steps_updated for any step with no_one_left: true and add someone else to it.
The API only manages counsellors. Admins and other staff are refused with 403 counsellor_not_manageable, so an HR sync can never lock an admin out of your account.

Rolling out a new AI agent

1

Pick a voice

Choose an engine that speaks your agent’s language and one of its voices. pricing.credits_per_minute is what a connected minute costs.
2

Create the agent and try it

POST /v1/agents with name, system_prompt, opening_line, language, tts_model and voice. Then place a few test calls and some real ones to your own phone with POST /v1/calls and the new agent_id.
3

Make it the default

Workflow, bulk and manual AI calls that do not name an agent now use it. Keep the old agent’s id: switching back is the same request.
4

Let it answer your inbound number (optional)

Give the agent direction: "both" (or "inbound"), then:
409 number_routing_complex means the number’s menu needs a person’s judgement (several agents, no AI step, or a menu shared with other numbers); change it in the dashboard’s IVR builder.
5

Retire the old agent

POST /v1/agents/{old}/disable stops it and cancels anything still waiting for it. When nothing refers to it any more, DELETE /v1/agents/{old}; a 409 agent_in_use lists what still does.