Send a Rich Card Carousel Message

POST Method

The Send a Rich Card Carousel Message API sends a carousel of rich cards using RCS (Rich Communication Services). Each card in the carousel can contain media, title, and description, allowing for visually engaging and interactive messaging experiences.

Prerequisites

  • After you sign up, your account will be on the trial version. You must complete the KYC to access all the features in kaleyra.io.
  • Before you get started, Create an API Key. To view the API Key and the SID, see View API Key and SID.
  • Before sending the RCS, you must configure the RCS channel in the Kaleyra platform. To configure the RCS channel in your account, please contact your local Kaleyra representative.
  • You must have an approved AgentID or a specific number to be used as AgentID.

Base URL

URLRegion
https://rcs-api.<pod>.kaleyra.ioFor North America (NA).
https://rcs-api.<pod>.kaleyra.ioFor the rest of the world.

API Domain and Value

api_domainValue
IN podhttps://rcs-api.in.kaleyra.io
NA podhttps://rcs-api.na.kaleyra.io

API request to send a Rich Card Carousel Message

To send a rich card carousel message, use the https://rcs-api.<pod>.kaleyra.io/v1/<sid>/rcs/messages endpoint with the following request method:

Request Format

The following is the request format to send rich card carousel message:

curl --location --request POST 'https://<api_domain>/v1/<sid>/rcs/messages'\ 
--header '<api-key>: <api-key>' \
--header 'Content-Type: <content-type>' \
--data '{ 
  "from":"<from>",
  "to":["<to>"],
  "richCardCarousel" : 
  {
    "cardWidth" : "<card_width>",
    "cardContents" : [ 
	{
		 "title" : "<title>",
		 "description" : "<description>",
		 "media" : {
		 "height" : "<height>",
		 "file" : {
		 "fileUrl" : "<fileUrl>",
		 "thumbnailUrl" : "<thumbnailUrl>",
		 "contentDescription" : "<contentdescription>"
		}
		},
		"suggestions" : [ 
		{
		"action" : {
		"text" : "<text>",
		"postbackData" : "<postbackData>",
		"buttonId" : "<button_id>",
		"openUrlAction" : {
		"url" : "<url>"
		      }
		    }
		     } 
		 ]
	  	}, 
		{
		"title" : "<title>",
		"description" : "<description>",
		"suggestions" : [ 
		{
		"action" : {
		"text" : "<text>",
		"postbackData" : "<postbackData>",
		"openUrlAction" : {
		"url" : "<url>"
		}
	 	  }
		} 
		  ]
		} 
		  ]
    },
	"suggestions" : [
	{
	"reply" : {
	"text" : "<text>",
	"postbackData" : "<postbackData>",
	"buttonId" : "<buttonId>"
	}
	 }
]
  }'

Sample Request Format

The following is the sample request format that describes how to send a rich card carousel message:

curl --location --request POST 'https://rcs-api.<pod>.kaleyra.ai/v1/xxxxx6913850xxxx/rcs/messages'\
--header 'api-key: xxxxx3b8497f58a94e84b671aca43xxxx' \
--header 'Content-Type: application/json' \
--data '{ 
"from":"rcs-dev",
"to":["[9177XXXXX931]"],
"richCardCarousel" : {
"cardWidth" : "MEDIUM",
"cardContents" : [ 
{
"title" : " Deepavali Offer",
"description" : "Enjoy the deepavali offers",
"media" : {
"height" : "MEDIUM",
"file" : {
"fileUrl" : "https://images.pexels.com/photos/5458393/pexels-photo-54XXXXX.jpeg",
"thumbnailUrl" : "https://images.pexels.com/photos/5458393/pexels-photo-5XXXXX4.jpeg",
"contentDescription" : "Just a sample image"
	}
	},
"suggestions" : [ 
	{
"action" : {
"text" : "Details",
"postbackData" : "offer-a-details",
"buttonId" : "null",
"openUrlAction" : {
"url" : "http://www.sample.com/offer-a"
	}
	 }
	} 
 	 ]
	}, 
	{
"title" : "Offer B",
"description" : "Offer B is perfect for you",
"suggestions" : [ 
	{
"action" : {
"text" : "Details",
"postbackData" : "offer-b-details",
"openUrlAction" : {
"url" : "http://www.sample.com/offer-b"
		}
		 }
		} 
	  	]
		} 
	  	]
    },
"suggestions" : [
		{
"reply" : {
"text" : "Start Over",
"postbackData" : "my-start-over-response",
"buttonId" : "null"
		}
		}
	]
}'

URL Parameters and Headers

The following is the list of parameters and headers to send the outgoing message request:

Parameter/HeadersData TypeDescriptionExampleMandatory?
sidStringAccount SID (Security Identifier).XXXXX6913850XXXXYes
Content-TypeStringIndicates the format of the content the API will be processing.The only allowed value is application/JSONYes
api-keyStringAPI key generated from kaleyra.io account.XXXXX3b8497f58a94e84b671aca43XXXXYes

The following is the list of attributes to be used in the payload to send the messages:

ParameterData TypeDescriptionExampleMandatory?
fromStringThe service code unique to the agent, specified when the agent is created/onboarded.rcs-devYes
toArray of StringList of recipients’ device addresses (100 max.), which can either be a phone number in E.164 format prefixed with the country code without a plus sign, or a URI-like identification used to contact the user.[ 9177XXXXX931]Yes
richCardCarouselJSON ObjectContains the details of the carousel of rich cards sent to the user device.See the specific table for details.Yes

The following table describes the different attributes used for the richCardCarousel JSON object:

Parameter

Data Type

Description

Example

Mandatory?

cardWidth

String

Width of the cards in the carousel. Values: UNSPECIFIED, SMALL, MEDIUM

MEDIUM

No

cardContents

JSON Object

The content of the rich card.

See the specific table for details.

No

The following table describes the different attributes used for the cardContents JSON object:

ParameterData TypeDescriptionExampleMandatory?
titleStringTitle of the rich card.Deepavali offer.Yes
descriptionStringDescription text of the rich card (2000 Unicode characters max).Enjoy the Deepavali offers.Yes
mediaJSON ObjectMedia to be included in a rich card.See the specific table for details.No
suggestionsJSON ObjectList of chiplist items (quick replies or actions).See the specific table for details.No

The following table describes the different attributes used for the media JSON object:

ParameterData TypeDescriptionExampleMandatory?
heightStringHeight of the media (SHORT, MEDIUM, TALL)MEDIUMYes
fileJSON ObjectFile message content to send to the users’ device, typically an image, audio, or a video file.See the specific table for details.Yes

The following table describes the different attributes used for the file JSON object:

ParameterData TypeDescriptionExampleMandatory?
fileUrlStringPublic accessible URL of the media file (image or video).https://images.pexels.com/photos/5458393/pexels-photo-54XXXXX.jpegYes
thumbnailUrlStringPublic accessible URL of the thumbnail image.https://images.pexels.com/photos/5458393/pexels-photo-5XXXXX4.jpegNo
contentDescriptionStringDescription of the media content for accessibility.Just a sample imageNo

The following table describes the different attributes used for the suggestions JSON object:

ParameterData TypeDescriptionExampleMandatory?
actionJSON ObjectContains the details of the action chip.See the specific table for details.Yes (if action)
replyJSON ObjectContains the details of the reply chip.See the specific table for details.Yes (if reply)

The following table describes the different attributes used for the action JSON object:

ParameterData TypeDescriptionExampleMandatory?
textStringText displayed on the action chip.DetailsYes (if action)
postbackDataStringData sent back to your system when the action chip is clicked.offer-b-detailsYes (if action)
button_idStringUnique ID used to identify the click event.nullOptional
openUrlActionJSON ObjectContains the URL to open when the action chip is clicked.See the specific table for details.Yes (if action)

The following table describes the different attributes used for the openUrlAction JSON object:

ParameterData TypeDescriptionExampleMandatory?
urlStringA URL, as defined by RFC 2396 (4000 Unicode characters max).https://www.tatacommunications.com/Yes (if reply/action)

The following table describes the different attributes used for the reply JSON object:

ParameterData TypeDescriptionExampleMandatory?
textStringText displayed on the reply chip.Start OverYes (if reply)
postbackDataStringData sent back to your system when the reply chip is clicked.my-start-over-responseYes (if reply)
button_idStringUnique ID used to identify the click event.nullOptional

Sample Success Response

The following success message appears:

{
  "recipientDetails": [
    {
      "to": "9191588XXXXX",
      "messageId": "dc4cxxxx-xxxx-xxxx-xxxx-xxxx349a5e3d "
    }
  ]
}

The following examples illustrate typical success responses generated during the lifecycle of a message transmitted using the messaging platform. These responses represent key stages in message delivery, including successful submission to the carrier, delivery to the recipient's device, and confirmation of message read status. Each response includes metadata such as timestamps, message identifiers, and event types, which can be used for tracking and diagnostics.

Sent

The messages that are successfully submitted from Google to the carrier.

{ 
  "type": "SENT", 
  "eventId": "c8c3aa5d-1082-45a9-9f88-026c9XXXXX94", 
  "from": "9176739XXX02", 
  "to": "mmx_traffic", 
  "sentAt": "2025-06-16T13:46:38.929Z", 
  "messageId": "4543932d-c8f0-48c4-90bf-f9aXXXXXX2095f" 
} 

Delivered

The messages that are successfully delivered to the recipient's handset.

{ 
  "type": "DELIVERED", 
  "eventId": "MxfdhMDmfXXXXXQQBlrIGcIg", 
  "from": "91767XXXXXX2", 
  "to": "mmx_traffic", 
  "sentAt": "2025-06-16T13:46:41.295Z", 
  "messageId": "4543932d-c8f0-48c4-90bf-f9aXXXXX005f" 
} 

Read

The messages that have been read on the recipient's handset.

{ 
  "type": "READ", 
  "eventId": "MxZJragNjfT=qY4XXXXXYxcA", 
  "from": "917673XXXXX2", 
  "to": "mmx_traffic", 
  "sentAt": "2025-06-16T13:46:49.193Z", 
  "messageId": "4543932d-c8f0-48c4-90bf-f9aXXXXX005f" 
} 

Error

The messages that have been undelivered.






© 2026 Kaleyra Inc. All rights reserved.
Trademarks, logos and service marks displayed on this site are registered and unregistered trademarks of Kaleyra Inc.