Voice for developers

Voice call API with call and keypress webhooks

Start reminder, confirmation and alert calls from your CRM or app. Every answered call, missed attempt and keypress comes back to your system as a webhook, so your records update without anyone downloading a report.

  • Recorded audio or TTS per call
  • call.completed webhook
  • ivr.input keypress webhook
  • Retries and scheduling
An ivr.input webhook showing the listener pressed 2 and a call.completed webhook with status, duration, pulses and attempt number, with CRM updated and retry chips

What is a voice call API?

A voice call API lets your software start automated phone calls with one HTTP request, using a saved recording or text-to-speech with personal details. When each call ends, a webhook sends the result back to your system: answered or not, call duration, pulses used, retry attempts and any keys the listener pressed.

Updated

Voice call API at a glance

Calls
Recorded audio or text-to-speech, one number or a list
Webhooks
call.completed per attempt, ivr.input per keypress
Retries
Attempts and gap between them, set per request
Scheduling
Send now or at a set time within permitted hours
Auth
API key sent as a Bearer token
Billing
Per pulse or per minute, from prepaid credits

How does the voice API work with your CRM?

Your CRMDue date or eventEMI due in 3 days, appointment tomorrow, COD order placed
API request
MsgClubCall is placedPlays your recording or TTS, collects keypresses, retries if busy
ivr.input
Your CRMInstant actionPress 3 creates a callback task for your team
call.completed
Your CRMRecord updatedStatus, duration, attempts and keys saved

What does a voice API request look like?

Name a saved voice draft, or send a text-to-speech template with the values for this customer.

  • Map each key to a label your CRM understands
  • Set retries and the gap between attempts per request
  • Schedule for later, within permitted calling hours
  • Pass your own reference so webhooks match your records
POST {API_BASE_URL}/voice/calls
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "to": "+9198XXXXXX21",
  "tts": {
    "language": "hi",
    "text": "नमस्ते {name} जी। आपकी EMI {amount} रुपये {due_date} को है। भुगतान हो गया हो तो 1 दबाएँ, इस हफ़्ते करेंगे तो 2 दबाएँ।",
    "variables": { "name": "राहुल", "amount": "4,250", "due_date": "10 दिसंबर" }
  },
  "keys": { "1": "already_paid", "2": "will_pay_this_week", "3": "callback" },
  "retries": { "max_attempts": 3, "gap_minutes": 30 },
  "reference": "loan-88213",
  "webhook_url": "https://your-crm.example.com/msgclub/voice"
}

Illustrative example. Exact endpoints and field names are in the API docs, shared when you get API access.

What do the voice webhooks contain?

Two events cover everything that happens on a call.

Voice webhook events
EventWhen and what
ivr.inputEach keypress: the digit, your label, the call ID and your reference
call.completedEach attempt ends: status (answered, busy, no answer, failed), duration, pulses, attempt number and keys pressed

Return a 200 response quickly and process the event in the background. Use the call ID to ignore an event you have already handled.

POST https://your-crm.example.com/msgclub/voice

{
  "event": "call.completed",
  "call_id": "vb_51c7e2",
  "reference": "loan-88213",
  "to": "+9198XXXXXX21",
  "status": "answered",
  "attempt": 2,
  "duration_sec": 27,
  "pulses": 1,
  "keys": ["2"],
  "outcome": "will_pay_this_week",
  "ended_at": "2026-11-15T11:32:04+05:30"
}

Illustrative example. Exact endpoints and field names are in the API docs, shared when you get API access.

What should your code check before it places a call?

The API places calls exactly when you ask, so the checks that keep you within Indian calling rules belong in your code or your MsgClub settings. Your team or ours should confirm which category each campaign falls under before you automate it.

  • Category: service and transactional calls, such as a due-date reminder to an existing customer, are treated differently from promotional calls under TRAI rules.
  • DND and consent: send promotional calls only to numbers not blocked on the DND register, or to customers who have given consent.
  • Hours: schedule promotional calls within permitted hours, currently 10 am to 9 pm, and keep reminder calls to sensible daytime hours.
  • Opt-out: map a key to "stop calling me" and suppress that number in your CRM when the ivr.input event arrives.
  • Personal data: store numbers, keypresses and outcomes as personal data under the DPDP Act 2023, and only for as long as you need them.

How should your CRM act on each result?

A simple mapping turns call results into next steps.

Mapping voice call results to CRM actions
Webhook resultSuggested CRM action
Pressed 1 (already paid)Flag for payment check; stop further reminders
Pressed 2 (will pay this week)Set a follow-up date 7 days ahead
Pressed 3 (callback)Create a call task for the collections or sales team
Answered, no keySend an SMS or WhatsApp with the details and a link
No answer after last attemptSend an SMS, or hand over to AI Voice reminder calls

Works with any CRM that can call an API or receive a webhook, including systems such as Zoho, HubSpot, Salesforce and LeadSquared through their API features or Zapier. See the voice broadcast overview, text-to-speech calls, all integrations, the developer docs, pricing, or contact us.

How do you connect the MsgClub voice API to your CRM?

  1. Get API accessAsk our team for voice API access. You receive an API key and the API docs with exact endpoints and field names.
  2. Prepare the messageSave a recording as a voice draft, or write a text-to-speech template with variables.
  3. Set your webhook URLGive us the HTTPS address that should receive call.completed and ivr.input events.
  4. Call your own numberStart a test call to your phone, press a key and check that both webhooks reach your system.
  5. Go live from your CRMTrigger calls from your CRM rules and map each outcome to a field or a follow-up task.

Frequently asked questions

Can I start a single call, or only bulk campaigns?

Both. Send one request per customer when an event happens in your system, such as a due date or a missed delivery, or send a list in one request for a campaign. Each call reports back separately through webhooks.

What is the difference between call.completed and ivr.input?

ivr.input is sent each time the listener presses a key, with the digit and the label you gave it. call.completed is sent once when the call ends, with the final status, duration, pulses, attempt number and all keys pressed. Use ivr.input for instant actions and call.completed for records.

Does the API support text-to-speech with variables?

Yes. Send the text template and the values for each customer, such as name, amount and due date, and MsgClub generates the audio for that call. Hindi and English are available, with more Indian languages on request.

Which programming languages are supported?

The API is plain HTTPS with JSON, so it works from any language. MsgClub provides sample code for PHP, Java, C#, ASP.NET and VB.NET, and you can also connect through Zapier or your CRM's own webhook tools.

Can the API respect calling hours and DND rules?

Yes. You can schedule calls for a set time instead of calling at once, and filter DND numbers before promotional campaigns. Your system should still decide which customers have consented. Our team can explain the TRAI rules for your call category.

What happens when a call is busy or not answered?

If retries are set, MsgClub calls again after the gap you choose, up to the number of attempts you allow. The call.completed webhook for each attempt shows the status and attempt number, so you can tell a final no-answer from a first try.

Start sending in minutes

Create a free account to test the panel and API, or talk to our team about volumes, DLT setup and CRM integration.