Skip to content
Mango9

VoiceAI API

Connect your lead flow to calls made by a configured Mango9 AI agent.

In the CRM: Settings → Developer APIs → VoiceAI API

Give a new enquiry a useful next conversation

VoiceAI API lets your integration request an outbound call from an AI agent configured in your Mango9 account. A lead form or another business tool can start the request as part of the follow-up journey.

The agent uses the business instructions, enabled tools and calling setup you prepared. For example, it can discuss a service enquiry, qualify interest and use its configured booking tools to arrange an appointment. SMS conversations and templates are configured in their corresponding messaging and workflow tools.

List the account’s outbound-capable agents first, then use the chosen assistant ID in a call request. Select the image to enlarge it.

Prepare the business calling setup

  1. Connect Telnyx as your carrier and obtain the phone numbers the campaign will use.
  2. Create the AI agent, add the business information and configure its available booking or other tools. Enable its outbound calling mode.
  3. Review its caller ID, calling window and the account’s available balance.
  4. Use GET /app/api/voiceai/agents with the saved key to list eligible agents on the same Mango9 server.
  5. Keep the returned assistant_id for the agent that should handle this campaign.

Describe the call request

Describe the call request
FieldUse
keyThe account’s saved API secret.
assistant_idThe assistant ID from the agent list.
phoneThe recipient number in international form, such as +12025550147 for a reserved example.
first_name, last_name, contact_email, contact_nameOptional contact context for the conversation.
caller_idOptional override using an active number belonging to the account.
dynamic_variablesOptional JSON object with the values the configured agent expects.

Use the test form deliberately

Illustrative test fields. Refresh Agents needs a valid saved key to load the account’s choices; no call was placed during this review. Select the image to enlarge it.
  1. Open VoiceAI API and paste the saved secret into API Key.
  2. Select Refresh Agents and choose the intended assistant.
  3. Enter a number you control and any first-name context for the test.
  4. Select Place Call when you are ready to receive an actual outbound call.
  5. Review the returned call IDs and the call activity, then confirm the conversation and any intended appointment result.

Read the outcome before retrying

Read the outcome before retrying
ResponseMeaningNext step
err 00 / initiatedThe call was initiated.Store the call IDs and follow the activity; initiation does not mean the customer answered.
err 07 / deferredNo call was placed because of the calling window or call-rate limit.Read wait_until, timezone and reason; arrange a later attempt in your integration.
err 05Insufficient account balance.Review the account balance before another attempt.
err 01 / 02Missing or invalid API key.Check the saved secret and the account server.
Other errorRequired data, agent access or call setup needs attention.Read msg and data.reason and correct the request or setup.

Use the same follow-up rules across channels

The API uses the same outbound calling service as Mango9 workflow AI calls. The account’s calling setup, agent window and applicable call controls continue to apply.

For a consultation campaign, connect the enquiry to the right contact, have the configured AI agent discuss the request, then use the booking record and SMS template to confirm the next step. Keep the call IDs, contact ID and appointment record together so the team can follow the customer’s progress.