Send Template Message

Send WhatsApp Template Message

POST https://api.oneroute.io/api/public/conversation/template

Template messages can be delivered at any time. Each template needs to be registered and pre-approved by WhatsApp

Headers

Request Body

{
    "data": [
        {
            "status": "success",
            "response": "gBGHI0kFNWAgTwIJk-_rr1Kse2yO"
        }
    ],
    "message": "Message sent to customer",
    "success": true
}

Example Request Payload

{
    "messages": [
        {
            "template": {
                "name": "first_welcome_messsage",
                "parameters": [
                    {
                        "type": "text",
                        "text": "Michael"
                    }
                ] // leave the array empty if no placeholders in the template
            },
            "to": "234XXXXXXXX",
            "save": true
        },
                {
            "template": {
                "name": "new_conversation",
                "parameters": [
                    {
                        "type": "text",
                        "text": "Timothy"
                    }
                ] // leave the array empty if no placeholders in the template
            },
            "to": "234XXXXXXXX",
            "save": true
        }
    ],
    "from": "234XXXXXXXX"
}

Example Request Payload (Authentication Template)

{
    "messages": [
        {
            "template": {
                "name": "first_welcome_messsage",
                "parameters": [
                    {
                        "type": "text",
                        "text": "OTP CODE"
                    }
                ],
                "buttons": [
                    {
                        "type": "text",
                        "text": "OTP CODE"
                    }
                ]
            },
            "to": "234XXXXXXXX",
            "save": true
        }
    ],
    "from": "234XXXXXXXX"
}

Last updated