canonical: https://jentic.com/apis/msg91.com/msg91

# MSG91 API

MSG91 is an India-headquartered cloud communications platform that exposes SMS, OTP, Email, WhatsApp, RCS, and Voice messaging through a single API alongside Segmento contact management and campaign tooling. The API covers transactional flows like one-time-password issue and verify, marketing campaign sends, contact list management, and per-channel analytics. Across 76 operations it consolidates multi-channel customer messaging behind one authkey-based authentication model.

## For AI agents

Send SMS, email, WhatsApp, and voice messages, run OTP verification, and manage contact campaigns through MSG91's multi-channel communications API.

## Scope

Does not handle CRM lead management, payments, or live agent helpdesk routing - use for outbound multi-channel messaging and OTP verification only.

## Capabilities

- Send and verify one-time passwords across SMS and email channels via `/v5/otp` and `/v5/otp/verify`
- Trigger transactional flow templates with dynamic variables via POST `/v5/flow`
- Pull SMS delivery logs and analytics via `/v5/report/sms/logs` and `/v5/report/sms/analytics`
- Run multi-channel campaigns through the Campaign and Segmento endpoints
- Send and track WhatsApp template messages and inbound replies
- Place outbound voice calls and retrieve call records
- Manage RCS messaging and Hello chatbot deployments

## Use cases

### OTP-Based Login and Signup

Consumer apps issue one-time passwords during signup and login to verify phone ownership without storing passwords. MSG91's `/v5/otp` endpoint sends the code, `/v5/otp/verify` validates the user's input, and `/v5/otp/retry` reissues if the SMS is missed. The dedicated OTP routing tier delivers in seconds across Indian carriers, which is why the same flow powers most fintech and ride-hailing onboarding stacks in the region.

Example prompt: Call POST `/v5/otp` with the user's mobile number, then call GET `/v5/otp/verify` with the submitted code and reject the signup if the response indicates a mismatch.

### Transactional SMS Flows for Order Updates

E-commerce and logistics platforms send order-confirmed, out-for-delivery, and delivered notifications as transactional SMS. MSG91's `/v5/flow` templates accept dynamic variables, so a single approved DLT template covers every order without per-message content review. The `/v5/report/sms/logs` endpoint exposes delivery state for reconciliation against the order pipeline.

Example prompt: Call POST `/v5/flow` with the approved template id and the order variables, then audit deliveries via POST `/v5/report/sms/logs` filtered to that flow id.

### WhatsApp Template Notifications

Customer engagement teams send WhatsApp template messages - appointment reminders, shipping notifications, invoice receipts - through the MSG91 WhatsApp integration. Templates are pre-approved with Meta and the API attaches dynamic variables at send time. This is the primary channel for high-engagement notifications where SMS deliverability or open rates are insufficient.

Example prompt: Send a 'shipment_dispatched' WhatsApp template to the customer's number with order id and tracking link as template variables.

### Agent-Driven Multi-Channel Outreach

An AI agent runs an outreach playbook that escalates from email to SMS to WhatsApp until the recipient engages. Through Jentic the agent searches for 'send a transactional sms', 'send a whatsapp template', and 'send an email' and gets a single auth flow across MSG91's email, SMS, and WhatsApp endpoints. Channel fallback is one configuration step instead of three integrations.

Example prompt: Search Jentic for 'send a transactional sms', execute POST `/v5/flow`, and on no-engagement after 24 hours fall back to a WhatsApp template send through the same agent flow.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v5/otp` | Issue a one-time password to a phone number |
| GET | `/v5/otp/verify` | Verify a submitted OTP |
| POST | `/v5/flow` | Trigger a transactional flow template |
| POST | `/v5/report/sms/logs` | Pull SMS delivery logs |
| GET | `/v5/report/sms/analytics` | Retrieve SMS analytics aggregates |
| GET | `/v5/report/otp/analytics` | Retrieve OTP analytics aggregates |

## Key resources

- **OTP** — Send, verify, and retry one-time passwords across SMS and email
- **Flow** — Transactional template-driven SMS, email, and voice sends
- **SMS Reports** — Delivery logs and channel analytics for SMS
- **WhatsApp** — Template-based and session-based WhatsApp messaging
- **Voice** — Outbound voice broadcasts and call records
- **Campaign** — Multi-channel marketing campaign orchestration
- **Segmento** — Contact list and segmentation management

## Why Jentic

- **Setup:** Wiring MSG91 by hand means setting your authkey in the authkey header, choosing between its two hosts, and learning the channel-specific path conventions for OTP, SMS, and flow calls. Through Jentic you install once, import the MSG91 API from the API Directory, store the authkey once, and your agent calls it.
- **Permission scoping:** MSG91 carries its targets in the request body and query rather than a resource path, so limit the agent to the operations it needs, such as sending an OTP or reading analytics. You choose the operations it may call, so it stays within the messaging actions you allow.
- **Credential handling:** Your MSG91 authkey is stored once, encrypted, by your own Jentic One instance and injected into the authkey header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'send an OTP' or 'send a WhatsApp template', and Jentic returns the matching MSG91 operation with its input schema, so the agent calls the right endpoint without learning the channel-specific path conventions.

## Related APIs

- **Twilio Messaging API** — Twilio is the global default for SMS, WhatsApp, and voice messaging
- **Plivo API** — Plivo offers SMS and voice with strong Indian DLT route coverage at competitive pricing
- **SendGrid Mail** — SendGrid handles transactional email at scale and pairs well with MSG91 SMS/WhatsApp

## FAQ

### What authentication does the MSG91 API use?

The MSG91 API uses an API key passed in the authkey header. Through Jentic the authkey is stored encrypted in the vault and injected at request time, so it never appears in the agent's prompt context.

### Can I send and verify OTPs in one workflow?

Yes. POST `/v5/otp` issues the code to the supplied mobile number and GET `/v5/otp/verify` validates the user's submitted code. `/v5/otp/retry` resends the code if the user does not receive the first message.

### What are the rate limits for the MSG91 API?

MSG91 enforces channel-specific throughput tied to your account class - DLT-approved transactional SMS routes burst higher than promotional routes, and WhatsApp respects the Meta tier on your number. Spread campaign sends across the `/v5/flow` endpoint with batching to avoid throttling.

### How do I trigger a transactional SMS flow through Jentic?

Search Jentic for 'send a transactional sms', load the `/v5/flow` schema, and execute POST `/v5/flow` with the approved DLT template id and your variables. The agent receives the delivery acknowledgment without ever holding the authkey.

### Is the MSG91 API free?

MSG91 offers free trial credits for evaluation but production use is metered per channel - SMS by sender route and country, WhatsApp by Meta conversation tier, voice per minute. Check the dashboard for active rates before launching a campaign.

### Does MSG91 support WhatsApp templates?

Yes. The WhatsApp endpoints send pre-approved templates with dynamic variables and ingest inbound replies on the configured webhook. Approval flows through Meta's Business Manager and templates appear in the dashboard once live.

### Can I limit what my agent is allowed to do with the MSG91 API?

Yes. Because you run Jentic One yourself, your own rules decide which MSG91 operations and credentials the agent may use, so you can allow only the actions it needs, such as issuing an OTP with POST `/v5/otp` or reading SMS analytics via GET `/v5/report/sms/analytics.` MSG91 carries its targets in the request body and query rather than a resource path, so scoping happens at the operation level: you can permit sending a transactional flow through POST `/v5/flow` while withholding campaign or WhatsApp sends. Any operation you do not grant stays unavailable to the agent, and the authkey is injected at request time rather than exposed to it.
