| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| mobile_no | string | ✅ (except email-only) | 9876543210 | User's mobile number (8–10 digits). Required when channel includes sms or whatsapp. |
| string | ✅ (email channel only) | user@example.com | Recipient's email address. Required when channel includes email. | |
| email_from_name | string | ✅ (email channel only) | Gilchrist | Sender display name shown in the email. Required when channel includes email. |
| email_subject | string | ✅ (email channel only) | Your OTP Code | Subject line of the OTP email. Required when channel includes email. |
| email_template_id | string | ✅ (email channel only) | overseas_otp | Unique identifier of the email template to use. Required when channel includes email. |
| email_template_attributes | object | ❌ | {"name": "Gilchrist"} | Key-value pairs to replace {{variables}} in the email template (excluding {{otp}}, which is auto-injected). |
| channel | string | ✅ | sms / whatsapp / email / sms|whatsapp / all | Delivery channel(s) for the OTP. Accepts a single value, pipe-separated combination (e.g. sms|whatsapp|email), or all to target every channel at once. |
| source | string | ✅ | user_signup | Source or context of the OTP request (e.g., salesforce, LMS_PENNANT). |
| type | string | ✅ | simple_otp | Type of OTP message. Currently supports simple_otp only. |
| otp_code_length | integer | ❌ | 6 | Length of the auto-generated OTP (default: 6, min: 1, max: 10). Ignored if otp_code is provided. |
| otp_code_type | string | ❌ | NUMERIC | Format of the auto-generated OTP. Options: NUMERIC (default), ALPHABETIC, ALPHANUMERIC. Ignored if otp_code is provided. |
| otp_code | string | ❌ | 123456 | Custom OTP to send. If omitted, the system auto-generates one based on otp_code_length and otp_code_type. Max 10 characters. |
curl --location --request POST 'https://martechuat.auxilo.com/api/send-otp' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzIiwianRpIjoiNDE1OTIwMzNlNTYyNWY4NTlmMzc1YjliY2RjN2QxNmFjYjk3ZWNhNTgzZGMxN2JjZDFmODM0OTg3MWJhNTU3NWU4MzY1NjA1ZDBkYTc5YTgiLCJpYXQiOjE3NjIxNTA3NzYuNzU5Mzg1LCJuYmYiOjE3NjIxNTA3NzYuNzU5Mzg4LCJleHAiOjE3OTM2ODY3NzYuNzU0NjU5LCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.ledOkVn_yPKzwTKoyA89sFuOlCxCDe8XbI2cvorbFipn8ciVEC-hgmlHmmbgp-p5cwPhzFRhAFDBn5GFJbbzf6h8svRdMdMymsuqxti1y_H1kLbcGV-bzcSTn3R2pRrYnUVPU_RRQtdsW7ZNOypSqP9toj12BO8DLxBDHSH6s5mxlJfZibQR33f2S8tr0Ft27_cyT019Wi_hwy3dMvB_YWat6SpkZ7nMvRXDll9qWYt5QVBMScEpl0Cob6RUFS0CURe1bP4ECxUgVNvO1-4lpdj7fv_Etc6DbMA9uEq-xJrboFOvaf4bM_lxIm203qDLPUcwaj1gjv7S6oRe5RUlIAzqFCOs2a12jpKjWECRaPKmklVfjxWbLMZkM_2XaVLxyrndvf9qfWrSiDoc9bJfpX0YU2IwFbg9C1deTkZVQE8u93z-SS5TGASGA_PoBJYyx6aXH3P65ziHJ9fnKb5CDQ3TP7MlfUsqJsrex0__mhHrUrYWiRuJ2S4LwEq5eBsY-6Xgc73W_n33Q6z4chTaZCZmsVUKveGi8g3lOMezmMTPC45A3ALIPuf2pkYakXj73RsW9HQsUBDOetfsYCJ0z4CZDPsT_9mfJOKah7uuQQG1zgHgMjH3WquR8POkQ4v0vKdf_8dzTpKpTLGFBl7YPFKVVWqYP8hGDAWX1phndac' \
--header 'Content-Type: application/json' \
--data-raw '{
"mobile_no": "7977251637",
"channel": "sms",
"source": "impactx",
"type": "simple_otp",
"otp_code_length": 4,
"otp_code_type": "NUMERIC"
}'{
"status": false,
"message": "Invalid Payload",
"errors": {
"otp_code_length": [
"The otp code length field must be at least 4."
]
}
}