https://BASE_URL/api/sms/otp/send
Request Type: POST
Sample Response:
| Options | Required | Description |
|---|---|---|
| api*key | yes | _string* Your API key (It can be found on your Termii dashboard). |
| message*type | yes | Enum: "NUMERIC" "ALPHANUMERIC" Type of message that will be generated and sent as part of the OTP message. You can set message type to numeric or alphanumeric |
| to | yes | _string* Represents the email address if the channel is set to email ( Example: [email protected]). It represents the destination phone number if other channels are selected. Phone number must be in the international format (Example: 23490126727) |
| from | yes | string Represents the configuration ID if the channel is set to email ( Example: 0a53c416-uocj-95af-ab3c306aellc). It can be found on your Termii dashboard. If other channels are selected, it represents a sender ID which can be alphanumeric or numeric. Alphanumeric sender ID length should be between 3 and 11 characters (Example: CompanyName) |
| channel | yes | string This is the route through which the message is sent. It is either dnd, WhatsApp, or generic or email |
| pin*attempts | yes | _integer* Example: 3 Represents the number of times the PIN can be attempted before expiration. It has a minimum of one attempt |
| pin*times_to_live | yes | _integer* Example: 1 Represents how long the PIN is valid before expiration. The time is in minutes. The minimum time value is 0 and the maximum time value is 60 |
| pin*length | yes | _integer* Example: 4 The length of the PIN code. It has a minimum of 4 and maximum of 8. |
| pin*placeholder | yes | _string* Example: "< 1234 >" PIN placeholder. Right before sending the message, PIN code placeholder will be replaced with generate PIN code. |
| message*text | yes | _string* Text of a message that would be sent to the destination phone number |