
2. Select the SMS option from the dashboard
3. Under "SMS", click "Support" in the sidebar & Select the API documentation option on the dropdown.

4. API documentation will get opened.

5. You can fill in the parameters, such as template ID (MSG91 template ID), mobile number (including country code), and variables, to get the final API. In the header option, enter the Authkey, and then press "Try" to send the SMS. On the right side of the panel, by clicking on the "more" option in Sample Codes, you can get the API codes in various languages.

NOTE:
For SMS API integration, variable values keep on changing, you may have 1, 2, 3 variables: or so. Pass the variables in the API depending on the variables you have in your flow and write the variable in the exact format as you did while creating the flow (this is case-sensitive as well).
1. The mobile variable will always be dynamic, and you have to insert it into the API, which is the mobile number of the user to whom you want to send SMS.
2. To shorten the URL in your content, pass the value as 1.
3. The message variable can be static or dynamic, as per your implementation.
4. The authentication key should always be static.
5. In case you want to send the promotional message using the numeric sender ID then please add the parameter route=1 in the payload.
NOTE: If sent without a country code, submission and deduction depend on the detected country based on the starting number: For, 91xxxxxxxxxx, etc
Frequently Asked Questions
Can I send SMS to international numbers using MSG91's API?
You may send SMS to international numbers using MSG91's API. Just make sure to use the full international phone number format, including the country code. Additionally, set the country parameter to 0 in your API request to indicate it's an international message. Let me know if you need more information!
Is there any way to schedule SMS for a specific time?
SMS can be scheduled for a specific time. You can set a future date and time for sending the message by using the send_at parameter in the API request. This allows you to specify when the message should be sent.
Is there any way to automate SMS sending based on triggers or events?
SMS sending can be automated based on triggers or events using MSG91's API. You can integrate the API with your system to send SMS automatically when certain conditions are met, such as when a user registers, places an order, or performs any action that your system tracks.
Can I customize the sender ID when sending SMS using the API?
You can customize the sender ID when sending SMS using the MSG91 API. However, the ability to use a custom sender ID depends on the country you're sending messages to.