Send Button API

Api Docs Sending Button Messages

Method : POST | GET

Endpoint: {{ url('/') }}/send-button

Request Body : (JSON If POST)
Parameter Type Required Description
api_key string Yes API Key
sender string Yes Number of your device
number string Yes Recipient number (e.g. 72888xxxx or 62888xxxx)
message string Yes Text of the message
button array Yes Array of buttons (max 5). Each item must include:
type: reply, call, url, or copy
displayText: Button label
phoneNumber: Required if type is call
url: Required if type is url
copyCode: Required if type is copy
footer string No Footer text of the message
url string Yes Image or video URL (must media attachment)

Example json

{
    "sender" : "6281222xxxxxx",
    "api_key" : "yourapikey",
    "number" : "201111xxxxxx",
    "url" : "https://imageurl.com",
    "footer" : "optional",
    "message" : "Hello magd, this is a button message",
    "button" : [
        {
            "type": "reply",
            "displayText": "Reply Button"
        },
        {
            "type": "call",
            "displayText": "Call Button",
            "phoneNumber" : "6281222xxxxxx"
        },
        {
            "type": "url",
            "displayText": "URL Button",
            "url" : "https://google.com"
        },
        {
            "type": "copy",
            "displayText": "Copy Button",
            "copyText" : "123123"
        }
    ]
}

Example URL

{{ url('/') }}/send-button?sender=6281222xxxxxx&api_key=yourapikey&number=201111xxxxxx&url=https://imageurl.com&footer=optional&message=Hello magd, this is a button message&button[0][type]=reply&button[0][displayText]=Reply Button&button[1][type]=call&button[1][displayText]=Call Button&button[1][phoneNumber]=6281222xxxxxx&button[2][type]=url&button[2][displayText]=URL Button&button[2][url]=https://google.com&button[3][type]=copy&button[3][displayText]=Copy Button&button[3][copyText]=123123

Example JSON Response

{
    "status":true,
    "msg":"Message sent successfully!"
}