1MSG

Send List Message

POST
/sendList

Send Interactive List 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.

Authorization

JWT token
querytoken<token>

Request Body

  1. body
body*string

Main message text

header?string

Header will be located above message text

footer?string

Footer will be placed under message text

action*string

Action for open list

sections*array<>

Up to 10 sections from which the client can choose.

Each section is object with fields:

title - Title of section, up to 24 symbols. Required if there are more then 1 section

rows - available options. Required

Each option is object with fields:

id - Unique id for option, up to 200 symbols. Required

title - Title of option, up to 24 symbols. Required

description - Description of option, up to 72 symbols

Example:

[{"title":"Section 1","rows":[{"id":"1","title":"Option 1","description":"Description 1"}]},{"title":"Section 2","rows":[{"id":"2","title":"Option 2","description":"Description 2"}]}]

chatId?string

Required 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?string

Required 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?string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

Response Body

Server response example

application/json
  1. response
sent?boolean
id?string

unique message id

message?string

Posting status message

description?string

Result description

curl -X POST 'https://api.1msg.io/123/sendList' \  -H 'Content-Type: application/json' \  -d '{  "body": "Please choose option",  "header": "Some options",  "footer": "Thank you",  "action": "List",  "sections": [    {      "title": "Section 1",      "rows": [        {          "id": "1",          "title": "Option 1",          "description": "Description 1"        }      ]    }  ],  "phone": "12020721369"}'
{  "sent": true,  "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8",  "message": "Sent to [email protected]",  "description": "Message has been sent to the provider"}