orvachat

Messages

Send List Message

POST/api/v1/chat/send/list

Send a list message with sections and rows.

Parameters

  • PhonestringRequired

    Who gets it: phone number with country code (e.g. 923001234567), or a chat id like …@g.us for a group.

  • DescstringRequired

    The message text.

  • ButtonTextstringOptional

    Text on the button that opens the list.

  • SectionsarrayOptional

    Sections of the list. Each has a title and rows (title, desc, RowId).

  • TopTextstringOptional

    A title above the text.

  • FooterTextstringOptional

    Small text under the message.

  • ListarrayOptional

    Rows without sections (use this or Sections).

  • IdstringOptional

    Your own id for the message. Leave it out and one is made for you.

  • ContextInfoobjectOptional

    Reply to a message: StanzaId (the message id) and Participant (who sent it).

Code Examples

cURL
curl -X POST "https://orvachat.com/api/v1/chat/send/list" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "Phone": "923001234567",
  "ButtonText": "Choose",
  "Desc": "Pick a product",
  "Sections": [
    {
      "title": "Shoes",
      "rows": [
        {
          "title": "Sneakers",
          "desc": "Rs 4,999",
          "RowId": "sneakers"
        }
      ]
    }
  ]
}'

Response Example

200 OK
{
  "code": 200,
  "data": {
    "Details": "Sent",
    "Id": "90B2F8B13FAC8A9CF6B06E99C7834DC5",
    "Timestamp": "2022-04-20T12:49:08-03:00"
  },
  "success": true
}