1MSG

Send Carousel

POST
/sendCarousel

You can send product cards via Carousel in two ways:

Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate.

Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel.

The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template.

In /sendCarousel, for sending a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons.

Authorization

JWT token
querytoken<token>

Request Body

  1. body
body?string

Text shown above the carousel. Optional. If omitted and params include a body component, the body will be taken from params.

params?array<>

Alternative to cards. Template-like structure (same as sendTemplate params). Must include a CAROUSEL component and its cards.

Structure:

  • params[] item with type CAROUSEL and cards (2..10)
    • cards[] item:
      • card_index: number
      • components[] items:
        • header: parameters[0] with type image/video/product
          • image: {"image": {"link": "https://..."}}
          • video: {"video": {"link": "https://..."}}
          • product: {"product": {"catalog_id": "...", "product_retailer_id": "..."}}
        • body: parameters[] with {"type": "text", "text": "..."}
        • button: sub_type url or quick_reply
          • url: parameters {"text": "Button", "url": "https://..."}
          • quick_reply: parameters[] of {"id": "...", "text": "..."}
  • Optional params[] item with type body to set the text above the carousel.
cards?array<>

Free-form carousel cards (2–10). Each card needs type cta_url or product, an image/video header, and action (URL or quick-reply buttons). Alternative to params.

Items2 <= items <= 10
quotedMsgId?string

Quoted message ID (Cloud API)

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/sendCarousel' \  -H 'Content-Type: application/json' \  -d '{  "phone": "77474016132",  "params": [    {      "type": "CAROUSEL",      "cards": [        {          "card_index": 0,          "components": [            {              "type": "header",              "parameters": [                {                  "type": "video",                  "video": {                    "link": "https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4"                  }                }              ]            },            {              "type": "body",              "parameters": [                {                  "type": "text",                  "text": "Video Card 1"                }              ]            },            {              "type": "button",              "sub_type": "quick_reply",              "parameters": [                {                  "id": "learn-1",                  "text": "Learn more"                },                {                  "id": "fav-1",                  "text": "Fav"                }              ]            }          ]        },        {          "card_index": 1,          "components": [            {              "type": "header",              "parameters": [                {                  "type": "video",                  "video": {                    "link": "https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4"                  }                }              ]            },            {              "type": "body",              "parameters": [                {                  "type": "text",                  "text": "Video Card 2"                }              ]            },            {              "type": "button",              "sub_type": "quick_reply",              "parameters": [                {                  "id": "learn-2",                  "text": "Learn more"                },                {                  "id": "fav-2",                  "text": "Fav"                }              ]            }          ]        }      ]    }  ]}'
{  "sent": true,  "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8",  "message": "Sent to [email protected]",  "description": "Message has been sent to the provider"}