Skip to main content
Server path: /msg91 | Type: Application | PCID required: Yes

Tools

ToolDescription
msg91_get_otp_analyticsGet OTP analytics
msg91_get_otp_logsGet OTP delivery logs
msg91_get_sms_analyticsGet SMS analytics
msg91_get_sms_logsGet SMS delivery logs
msg91_get_sms_template_versionsGet SMS template versions
msg91_list_email_templatesList email templates
msg91_retry_otpResend OTP
msg91_send_emailSend email
msg91_send_otpSend OTP
msg91_send_smsSend SMS via flow
msg91_send_whatsapp_messageSend WhatsApp outbound message
msg91_verify_otpVerify OTP

msg91_get_otp_analytics

Get OTP analytics Parameters:
ParameterTypeRequiredDefaultDescription
fromDatestringNoStart date (YYYY-MM-DD).
toDatestringNoEnd date (YYYY-MM-DD).
countrystringNoFilter by destination country code.

msg91_get_otp_logs

Get OTP delivery logs Parameters:
ParameterTypeRequiredDefaultDescription
fromDatestringNoStart date (YYYY-MM-DD).
toDatestringNoEnd date (YYYY-MM-DD).
mobilestringNoFilter by recipient mobile number.
requestIdstringNoFilter by a specific OTP request id.
statusstringNoFilter by status (e.g. delivered, failed, verified).
pageintegerNoPage number for paginated results.
limitintegerNoMaximum number of records per page.

msg91_get_sms_analytics

Get SMS analytics Parameters:
ParameterTypeRequiredDefaultDescription
fromDatestringNoStart date (YYYY-MM-DD) for the analytics window.
toDatestringNoEnd date (YYYY-MM-DD) for the analytics window.
routestringNoFilter analytics by SMS route (e.g. transactional, promotional).
countrystringNoFilter analytics by destination country code.
smsTypestringNoFilter by SMS type (e.g. domestic, international).

msg91_get_sms_logs

Get SMS delivery logs Parameters:
ParameterTypeRequiredDefaultDescription
fromDatestringNoStart date (YYYY-MM-DD) for the log window.
toDatestringNoEnd date (YYYY-MM-DD) for the log window.
mobilestringNoFilter logs by recipient mobile number (with country code, no plus).
requestIdstringNoFilter logs to a specific request id returned by the send call.
templateIdstringNoFilter logs by SMS template id.
statusstringNoFilter by delivery status (e.g. delivered, failed, submitted).
pageintegerNoPage number for paginated results.
limitintegerNoMaximum number of records per page.

msg91_get_sms_template_versions

Get SMS template versions Parameters:
ParameterTypeRequiredDefaultDescription
template_idstringYesThe SMS template id whose versions you want to fetch.

msg91_list_email_templates

List email templates Parameters:
ParameterTypeRequiredDefaultDescription
pageintegerNoPage number for paginated results.
limitintegerNoMaximum number of templates per page.

msg91_retry_otp

Resend OTP Parameters:
ParameterTypeRequiredDefaultDescription
mobilestringYesMobile number the OTP was originally sent to.
retrytypestringNoChannel for the retry: “text” to resend via SMS, “voice” to deliver via voice call.

msg91_send_email

Send email Parameters:
ParameterTypeRequiredDefaultDescription
attachmentsobject[]NoOptional file attachments.
domainstringNoSender domain configured in Msg91 (e.g. mail.example.com).
fromobjectYesSender details. Must use a verified Msg91 sender domain.
recipientsobject[]YesList of recipients. Each entry has a to array of recipient objects and optional per-recipient variables for template substitution.
subjectstringNoSubject line of the email. Optional if a template_id supplies one.
template_idstringNoMsg91 email template id. Optional if you supply inline subject + body.

msg91_send_otp

Send OTP Parameters:
ParameterTypeRequiredDefaultDescription
template_idstringYesMsg91 OTP template id (DLT-approved). Required.
mobilestringYesRecipient mobile number with country code, no plus sign (e.g. 919XXXXXXXXX). Required.
otpstringNoSpecific OTP to send. If omitted, Msg91 generates one based on the template’s otp_length.
otp_lengthintegerNoLength of the auto-generated OTP (4-9 digits). Ignored if otp is supplied.
otp_expiryintegerNoOTP validity period in minutes.
senderstringNoSender id to use for this OTP send.

msg91_send_sms

Send SMS via flow Parameters:
ParameterTypeRequiredDefaultDescription
realTimeResponsestringNoSet to “1” to receive a real-time delivery response in the API result, “0” otherwise.
recipientsobject[]YesList of recipient objects. Each recipient must include a mobiles field (E.164-style number with country code, e.g. 919XXXXXXXXX) and any per-recipient template variables (VAR1, VAR2, …).
senderstringNoSender ID to use for this send. If omitted, the template’s default sender is used.
short_urlstringNoSet to “1” to enable short-url tracking, “0” to disable. Optional.
short_url_expirystringNoExpiry for the tracked short URL, e.g. “1 day” or “2 hours”. Only relevant when short_url is enabled.
template_idstringYesThe Msg91 flow / SMS template id (DLT-approved). Find this in the Msg91 dashboard under SMS > Templates.

msg91_send_whatsapp_message

Send WhatsApp outbound message Parameters:
ParameterTypeRequiredDefaultDescription
content_typestringYesAlways “template” for outbound WhatsApp Business messages.
integrated_numberstringYesYour Msg91-registered WhatsApp Business phone number (without plus, with country code).
payloadobjectYesMessage payload describing the template, recipient(s), and template parameters.

msg91_verify_otp

Verify OTP Parameters:
ParameterTypeRequiredDefaultDescription
mobilestringYesMobile number the OTP was sent to (with country code, no plus sign).
otpstringYesOTP value entered by the user, to be verified.