Send Reply Buttons Message
Send Interactive Reply Buttons Message to an existing chat. (Only if the dialogue has an Open Session). Only one destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be [email protected], bsuid@lid, [email protected], or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.
JWT tokentoken<token>- body
body*stringMain message text
header?|||Optional header: text, document, video, or image object. Each variant requires type plus the matching media/text field.
footer?stringFooter will be placed under message text
sections*array<>Up to 3 sections inclusive.
Each section is an object with a fields:
type - always "reply" Required
reply – reply button objects Required
Each button response is an object with fields:
id - a unique identifier of the button, up to 200 characters. Required
title — Button title, up to 20 characters. Required
Example:
"sections": [{"type": "reply","reply": {"id ": "1","title": "1 Button's Title"}},{"type": "reply", "reply": {"id": "2", "title": "2 Button's Title"}}]
quotedMsgId?stringQuoted message ID (Cloud API)
chatId?stringRequired if phone and bsuid are not set
Chat ID from the message list. Examples: [email protected], RU.1504711984690866@lid, username@username, or [email protected] (group). Used instead of the phone parameter.
phone?stringRequired if chatId and bsuid are not set
Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.
Use chatId for full chat IDs: [email protected], bsuid@lid, username@username, or [email protected].
bsuid?stringOptional alternative to phone/chatId
Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.
Server response example
application/json- response
sent?booleanid?stringunique message id
message?stringPosting status message
description?stringResult description
curl -X POST 'https://api.1msg.io/123/sendButton' \ -H 'Content-Type: application/json' \ -d '{ "body": "Please choose option", "header": { "type": "text", "text": "Support" }, "sections": [ { "type": "reply", "reply": { "id": "yes", "title": "Yes" } }, { "type": "reply", "reply": { "id": "no", "title": "No" } } ], "phone": "12020721369"}'{ "sent": true, "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8", "message": "Sent to [email protected]", "description": "Message has been sent to the provider"}