Send OTP

Send OTP

POST https://api.oneroute.io/api/oneotp/send

Send OTPs to customers with this endpoint. Provide the template, channels, recipient and indicate whether you'd like to generate your OTP or use the generated OTP.

Headers

Request Body

{
    "body": {
        "key": "B2LN36qdsQ3x1PK6mpcbOjz8IBpskZtWbxPJqmKULX4tRDy4dZsBr9pXX2tEjyk5+dDGtKJvzYFS0C9BaUbXGGJ5SknlDLNa+S5AerAcXeCgdDqC37IoRJ6xzDrJhAfuySqJkYrNDC2rz+bTztC2hJFjN7YxikLt2XOv14qQMgeGCBG8sTqtJqaAz9eAFCKKks6u3bbLbWGO68JKF/SInMEuMDvAhyD/EE8k86xJCCkzp0LnILlXUi9d6XzieuBKk8xIVv5+aHQ3VRhnmahkxA==",
        "data": [
            {
                "medium": "WHATSAPP",
                "data": "gBGHI0kFNWAgTwIJqUIvBBh1yT38"
            },
            {
                "medium": "SMS",
                "data": "33333530654203571912"
            },
            {
                "medium": "EMAIL",
                "data": "Sent successfully"
            }
        ],
        "errors": []
    },
    "message": "Otp sent successfully",
    "success": true
}

Example Request Payload

{
    "channels": ["WHATSAPP", "SMS", "EMAIL"],
    "phoneNumber": "+2349XXXXXXXX",
    "templateId": "63d45b42-0898-43b3-b81d-1fb2d45bc78f",
    "options": {
        "length": 6,
        "digits": true,
        "alphabets": false,
        "minutes": 10
    },
    "email": "email@example.com"
}

Last updated