Whatsapp Interactive

Reach users globally on the world's most popular messaging platform to send messages in any format as you need. This Whatsapp Interactive messsage can only be sent to the users after they initiated the chat.

The following messages are considered interactive:

  • List Messages: Messages including a menu of up to 10 options. This type of message offers a simpler and more consistent way for users to make a selection when interacting with a business.
  • Reply Buttons: Messages including up to 3 options, each option is a button. This type of message offers a quicker way for users to make a selection from a menu when interacting with a business. Reply buttons have the same user experience as interactive templates with buttons.

List Message

Request

The request contains form data with target phone number and message in text format.

Curl Example

                            
                            curl --location --request POST 'https://api.motict.com/v1/wa/message' \
                            --header 'Authorization: api_key' \
                            --header 'Content-Type: application/json' \
                            --data-raw '{
                                "from": "+628123456789",
                                "to": "+628123456781",
                                "recipient_type": "individual",
                                "preview_url": true,
                                "type": "interactive",
                                "interactive": {
                                    "type": "list",
                                    "body": {
                                        "text": "Hi Nicki Minaj, How was your day?"
                                    },
                                    "action": {
                                        "button": "Your mood?",
                                        "sections": [
                                            {
                                                "rows": [
                                                    {
                                                        "id": "First",
                                                        "title": "Fine",
                                                        "description": ""
                                                    },
                                                    {
                                                        "id": "Second",
                                                        "title": "Not Bad",
                                                        "description": ""
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                }
                            }'
                            
                        

Parameters

Name Type Required Description
api_key String Yes API key credential will be provided by Motict team.
from String Yes Your Whatsapp business phone number.
Phone numbers are in E.164 format (e.g., +6285123456790)
to String Yes Target phone number.
Phone numbers are in E.164 format (e.g., +6285123456790)
recipient_type String No Default: individual
preview_url String No Default: true
type String Yes Type of message. Default: interactive
interactive.type String Yes Type of interactive. Default: list
body.text String Yes Message content should be send to the user.
action.button String Yes Button content. Maximum length: 20 characters.
action.sections Array Yes Array of section objects.
section.rows Yes Contains a list of rows.
Each row must have a title (Maximum length: 24 characters) and an id (Maximum length: 200 characters).

Reply Buttons

Request

The request contains form data with target phone number and message in text format.

Curl Example

                            
                            curl --location --request POST 'https://api.motict.com/v1/wa/message' \
                            --header 'Authorization: api_key' \
                            --header 'Content-Type: application/json' \
                            --data-raw '{
                                "from": "+628123456789",
                                "to": "+628123456781",
                                "recipient_type": "individual",
                                "preview_url": true,
                                "type": "interactive",
                                "interactive": {
                                    "type": "button",
                                    "body": {
                                        "text": "How are you?"
                                    },
                                    "action": {
                                       "buttons": [
                                            {
                                                "type": "reply",
                                                "reply": {
                                                    "id": "1",
                                                    "title": "First Button"
                                                }
                                            },
                                            {
                                                "type": "reply",
                                                "reply": {
                                                    "id": "2",
                                                    "title": "Second Button"
                                                }
                                            },
                                            {
                                                "type": "reply",
                                                "reply": {
                                                    "id": "3",
                                                    "title": "Third Button"
                                                }
                                            }
                                        ]
                                    }
                                }
                            }'
                            
                        

Parameters

Name Type Required Description
api_key String Yes API key credential will be provided by Motict team.
from String Yes Your Whatsapp business phone number.
Phone numbers are in E.164 format (e.g., +6285123456790)
to String Yes Target phone number.
Phone numbers are in E.164 format (e.g., +6285123456790)
recipient_type String No Default: individual
preview_url String No Default: true
type String Yes Type of message. Default: interactive
interactive.type String Yes Type of interactive. Default: button
body.text String Yes Message content should be send to the user.
action.buttons Array Yes Array of button objects.
button.type String Yes Type of button. Default: reply.
reply.id String Yes Unique identifier for your button.
reply.title String Yes Button title.

Response

The response contains JSON body with message status whether the request is success or error. And also the message id that has been sent to the user.

Body

                            
                            {
                                "message": "success",
                                "data": {
                                    "id": "455a6837-0388-4e8a-a031-1c8cc09b0d7b"
                                }
                            }
                            
                        

Parameters

Name Type Description
id String Whatsaap Message ID will be used as call identifier for each request
message String Success or error message. For error response, check Error section for mor details