Skip to main content
Msg91 logo
  • Category: communication
  • Auth: API_KEY
  • Composio-managed OAuth available? N/A
  • Tools: 8
  • Triggers: 0
  • Slug: MSG91
  • Version: 20261030_00

Tools

Slug: MSG91_CREATE_USER_EVENTSCreate and track user events in MSG91 Segmento for customer behavior analysis and segmentation. Use this tool to record user actions and behaviors such as logins, purchases, page views, button clicks, or any custom events. These events help build user profiles and enable targeted campaigns based on user behavior. Examples: - Track user login events for engagement analysis - Record purchase events with product details for sales tracking - Log page views and clicks for behavior analytics - Capture custom events with properties for detailed segmentation

Input Parameters

array
required
List of user events to record. You can submit multiple events for the same user in a single request.
string
required
Unique identifier for the user. Can be an email address or phone number with country code (e.g., ‘+919999999999’ or ‘user@example.com’).

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: MSG91_GET_EVENT_TYPESRetrieves all event types configured in MSG91 Segmento. Event types represent different user actions and behaviors that can be tracked (e.g., purchases, signups, page views). Use this action to discover what events are available for tracking user behavior in your Segmento account. No parameters required - returns all event types.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: MSG91_GET_FAILED_EVENTSRetrieve failed user events from a MSG91 Segmento campaign. This tool fetches events that failed to process during campaign execution, helping you identify and debug issues such as validation errors, invalid recipients, or missing required data. Use this when you need to: - Investigate why certain events didn’t process successfully - Get detailed failure reasons for troubleshooting - Monitor campaign health and identify patterns in failures - Retrieve failed events within a specific date range Results are paginated for large datasets. Requires a valid campaign_id from a Segmento campaign.

Input Parameters

integer
Page number for pagination. Starts at 1. Use this to navigate through multiple pages of failed events.
integer
Maximum number of failed events to return per page. Must be between 1 and 100. Default is 10.
string
Optional end date to filter failed events (format: YYYY-MM-DD). Only events that failed on or before this date will be included.
string
Optional start date to filter failed events (format: YYYY-MM-DD). Only events that failed on or after this date will be included.
string
required
The unique identifier of the Segmento campaign. This is the campaign ID returned when creating or listing campaigns.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: MSG91_LIST_CAMPAIGNSTool to list all campaigns in Segmento. Use when you need to retrieve campaigns with pagination support.

Input Parameters

integer
Page number for pagination.
integer
Number of campaigns per page.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: MSG91_RESEND_OTPResend OTP to the same mobile number via text message or voice call. Use when the original OTP was not received or expired, and the user needs a new code sent to the same number.

Input Parameters

string
required
Mobile number to resend OTP to, in international format without ’+’ prefix (e.g., ‘919999999999’ for India). Must be the same number that received the original OTP.
string ("text" | "voice")
required
Method to resend the OTP: ‘text’ for SMS message or ‘voice’ for voice call. Voice calls are useful when SMS delivery fails or for accessibility.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: MSG91_SEND_OTPTool to send OTP (One-Time Password) to a mobile number using a pre-configured MSG91 template. Use when you need to verify user phone numbers for authentication, account registration, password reset, or transaction confirmation.

Input Parameters

string
Custom OTP value to send. If not provided, MSG91 will auto-generate an OTP based on otp_length parameter. Use this when you need to send a specific OTP code.
string
required
Recipient mobile number in international format with country code (e.g., ‘919999999999’ for India, ‘15551234567’ for USA). Do not include ’+’ prefix or spaces.
string
End user’s IP address for security tracking and fraud prevention. Helps identify the request origin.
integer
Set to 1 for sending SMS in non-English languages (Hindi, Arabic, Chinese, etc.). Set to 0 for English only. Default: 0
integer
For MOBILE APP only (do not use for web browsers). Set to 1 to enable invisible OTP verification, 0 to disable. Default: 0
integer
required
OTP expiry time in minutes. Minimum: 1 minute, Maximum: 10080 minutes (7 days), Default: 60 minutes. After this duration, the OTP becomes invalid.
integer
Number of digits in the auto-generated OTP. Minimum: 4, Maximum: 9, Default: 4. Only applies when ‘otp’ parameter is not provided.
string
required
OTP template ID from the OTP section of MSG91 dashboard. This template defines the SMS content format with OTP placeholder.
integer
required
Set to 1 to enable real-time response due to caching. This provides immediate delivery status. Set to 0 for standard response.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: MSG91_SEND_SMS_V5Send SMS messages using pre-defined templates via MSG91 Flow API v5. Use when you need to send template-based SMS with dynamic variable substitution to single or multiple recipients. Templates must be created and approved in MSG91 dashboard before use.

Input Parameters

string
Enable URL shortening in SMS: ‘1’ to enable, ‘0’ to disable. When enabled, long URLs in the message are automatically shortened to save characters. Default: ‘0’
array
required
Array of recipient objects containing mobile numbers and dynamic variable values. Each recipient can have different variable values for personalized messages.
string
required
SMS template ID (Flow ID) from MSG91 dashboard. Create templates at https://control.msg91.com/flow/. Template must be approved before use.
string
Enable real-time delivery response: ‘1’ to get immediate delivery status for each message. Note: This may increase response time. Default: ‘0’ (asynchronous)
integer
Short URL expiry time in seconds. Only applicable when short_url is enabled. After expiry, the shortened URL will no longer redirect. Default: no expiry

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: MSG91_VERIFY_OTPTool to verify an OTP (One-Time Password) sent to a mobile number. Use when you need to confirm that the OTP code entered by the user matches the one sent via Send OTP API.

Input Parameters

string
required
The OTP code to verify. This is the code that was sent to the mobile number via Send OTP API and entered by the user.
string
required
Mobile number in international format with country code (e.g., ‘919876543210’ for India, ‘15551234567’ for USA). Must match the number used in Send OTP. Do not include ’+’ prefix or spaces.
integer
OTP expiry time in minutes. Only required if you passed a custom expiry time when sending the OTP. If not provided, the default expiry time (60 minutes) is used.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not