Send a Rich Card Standalone Message with Suggestion

POST Method

The Send a Rich Card Standalone Message with Suggestion API allows sending a Rich Card Standalone message that includes structured content (title, description, media) along with a suggestion chiplist. These suggestions can include quick replies, URL actions, calendar events, location requests, phone dial actions, and map views. This format is ideal for interactive, media-rich messaging experiences such as promotions, service updates, or customer support.

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

https://rcs-api.<pod>.kaleyra.ai - For North America (NA).

https://rcs-api.<pod>.kaleyra.io - For rest of the world.

API Domain and Value

API request to send a Rich Card Standalone Message with Suggestion

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

Request Format

The following is the request format to send a rich card standalone message with suggestion:

curl --location --request POST 'https://<api_domain>/v1/<sid>/rcs/messages'\
--header 'Content-Type:<Content-Type>' \
--header 'api-key: <api-key>' \
--data { 
  "from": "<from>", 
  "to": [ "<to>" ], 
  "richCardStandalone": { 
    "cardOrientation": "<cardOrientation>", 
    "thumbnailImageAlignment": "<thumbnailImageAlignment>", 
    "content": { 
      "title": "<title>", 
      "description": "<description>", 
      "media": { 
        "height": "<height>", 
        "file": { 
          "contentDescription": "<contentDescription>", 
          "fileUrl": "<fileUrl>", 
          "thumbnailUrl": "<thumbnailUrl>" 
        } 
      } 
    }, 
    "suggestions": [ 
      { 
        "action": { 
          "text": "<actionText>", 
          "postbackData": "<postbackData>", 
          "buttonId": "<buttonId>", 
          "openUrlAction": { 
            "url": "<openUrl>" 
          } 
        } 
      }, 
      { 
        "action": { 
          "text": "<actionText>", 
          "postbackData": "<postbackData>", 
          "buttonId": "<buttonId>", 
          "createCalendarEventAction": { 
            "startTime": "<startTime>", 
            "endTime": "<endTime>", 
            "title": "<eventTitle>", 
            "description": "<eventDescription>" 
          } 
        } 
      }, 
      { 
        "action": { 
          "text": "<actionText>", 
          "postbackData": "<postbackData>", 
          "buttonId": "<buttonId>", 
          "askLocationAction": {} 
        } 
      }, 
      { 
        "action": { 
          "text": "<actionText>", 
          "postbackData": "<postbackData>", 
          "buttonId": "<buttonId>", 
          "dialAction": { 
            "phoneNumber": "<phoneNumber>" 
          } 
        } 
      }, 
      { 
        "action": { 
          "text": "<actionText>", 
          "postbackData": "<postbackData>", 
          "buttonId": "<buttonId>", 
          "viewLocationAction": { 
            "label": "<locationLabel>", 
            "latLng": { 
              "latitude": <latitude>, 
              "longitude": <longitude> 
            } 
          } 
        } 
      }, 
      { 
        "action": { 
          "text": "<actionText>", 
          "postbackData": "<postbackData>", 
          "buttonId": "<buttonId>", 
          "viewLocationAction": { 
            "query": "<locationQuery>" 
          } 
        } 
      } 
    ] 
  } 
}  

Sample Request Format

The following is the sample request format to send a rich card standalone mess

curl --location --request POST 'https://rcs-api.na.kaleyra.ai/v1/xxxxx6913850xxxx/rcs/messages'\
--header 'Content-Type: application/json'\ 
--header 'api-key: xxxxx3b8497f58a94e84b671aca43xxxx'\ 
--data { 
  "from": "rcs-test", 
  "to": ["9191588XXXXX"], 
  "richCardStandalone": { 
    "cardOrientation": "VERTICAL", 
    "content": { 
      "title": "Air India", 
      "description": "✈️ Fly high with Air Bharat!🌍 Enjoy up to 40% off on select international and domestic routes...", 
      "media": { 
        "height": "MEDIUM", 
        "file": { 
          "fileUrl": "https://i.pinimg.com/736x/bd/c1/b2/bdc1b224b381818a7ec2b375fa2a4998.jpg", 
          "thumbnailUrl": "https://i.pinimg.com/736x/bd/c1/b2/bdc1b224b381818a7ec2b375fa2a4998.jpg", 
          "contentDescription": "Air India airplane flying in the sky" 
        } 
      }, 
      "suggestions": [ 
        { 
          "reply": { 
            "text": "Avail-Offer", 
            "postbackData": "flight_offer" 
          } 
        }, 
        { 
          "action": { 
            "text": "Book Now!", 
            "postbackData": "Book_flight", 
            "openUrlAction": { 
              "url": "https://www.example.com/in/en/book.html" 
            } 
          } 
        }, 
        { 
          "action": { 
            "text": "Travel Information", 
            "postbackData": "cair_india_travel_info", 
            "openUrlAction": { 
              "url": "https://www.example.com/in/en/travel-information.html" 
            } 
          } 
        }, 
        { 
          "action": { 
            "text": "Customer Support", 
            "postbackData": "postback_data_1234", 
            "fallbackUrl": "https://www.example.com/in/en/contact-us.html", 
            "dialAction": { 
              "phoneNumber": "+9111693XXXXX" 
            } 
          } 
        } 
      ] 
    } 
  }, 
  "suggestions": [ 
    { 
      "action": { 
        "text": "One-Way Trip", 
        "postbackData": "one_way_trip", 
        "openUrlAction": { 
          "url": "https://www.example.com/" 
        } 
      } 
    }, 
    { 
      "action": { 
        "text": "Round Trip", 
        "postbackData": "round_trip", 
        "openUrlAction": { 
          "url": "https://www.example.com/" 
        } 
      } 
    }, 
    { 
      "action": { 
        "text": "Check your calendar", 
        "postbackData": "postback_data_1234", 
        "fallbackUrl": "https://www.google.com/calendar", 
        "createCalendarEventAction": { 
          "startTime": "2025-07-01T19:00:00Z", 
          "endTime": "2025-07-02T20:00:00Z", 
          "title": "Tata Power bill due.", 
          "description": "Final date for bill payment to avoid late fee." 
        } 
      } 
    } 
  ] 
}' 

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

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

ParameterData TypeDescriptionExampleMandatory?
fromStringThe service code unique to the RCS agent, specified when the RCS agent is created or onboarded.rcs-testYes
toArray of StringList of recipients’ device addresses (up to 100 allowed), 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.[9191588XXXXX]Yes
richCardStandaloneJSON ObjectContainer for rich card content.See the specific table for details.Yes

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

ParameterData TypeDescriptionExampleMandatory?
cardOrientationStringDefines the layout direction of the rich card’s content, specifying whether the card elements (like images, text, buttons, and chips) are arranged horizontally or vertically.VERTICALYes
thumbnailImageAlignmentStringAlignment of thumbnail image (LEFT, RIGHT, and so on.)LEFTNo
contentJSON ObjectThe content of the rich card.See the specific table for details.Yes
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 content JSON object:

ParameterData TypeDescriptionExampleMandatory?
titleStringTitle of the rich card.Air IndiaYes
descriptionStringDescription text of the rich card (2000 Unicode characters max.).✈️ Fly high with Air Bharat!🌍…Yes
mediaJSON ObjectMedia to be included in a rich card.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://i.pinimg.com/736x...jpgYes
thumbnailUrlStringPublic accessible URL of the thumbnail image."https://i.pinimg.com/736x...jpgNo
contentDescriptionStringDescription of the media content for accessibility.Air Bharat airplane flying in the sky.No

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

ParameterData TypeDescriptionExampleMandatory?
replyJSON ObjectContains the details of the reply chip.See the specific table for details.No
actionJSON ObjectContains the details of the action chip.See the specific table for details.No

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

ParameterData TypeDescriptionExampleMandatory?
textStringText displayed on the reply chip.Avail-OfferYes (if reply)
postbackDataStringData sent back to your system when the reply chip is clicked.flight_offerYes (if reply)

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

ParameterData TypeDescriptionExampleMandatory?
textStringText displayed on the action chip.Visit WebsiteYes
postbackDataStringData sent back to your system when the action chip is clicked.tata_comm_websiteYes
buttonIdStringIdentifier for the action button.01No
openUrlActionJSON ObjectContains the URL to be opened when the action chip is clicked.See the specific table for details.No
createCalendarEventActionJSON ObjectContains details for a calendar event.See the specific table for details.No
askLocationActionJSON ObjectContains details to trigger a location request from the user.See the specific table for details.No
fallbackUrlStringA backup URL that opens if the primary action fails or is unsupported on the user's device.`https://www.example.us.htmNo
dialActionJSON ObjectContains phone number to be dialed.See the specific table for details.No
viewLocationActionJSON ObjectContains location details.See the specific table for details.No

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 action)

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

ParameterData TypeDescriptionExampleMandatory?
startTimeStringStart time of the calendar event (ISO 8601 format).2025-07-01T19:00:00ZYes (if used)
endTimeStringEnd time of the calendar event (ISO 8601 format).2025-07-02T20:00:00ZYes (if used)
titleStringTitle of the calendar event.Tata Power bill dueYes (if used)
descriptionStringDescription of the calendar event.Final date for bill payment to avoid late fee.No

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

ParameterData TypeDescriptionExampleMandatory?
phoneNumberStringPhone number to dial when the chip is clicked.+9111693XXXXXYes (if used)

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

ParameterData TypeDescriptionExampleMandatory?
labelStringLabel for the location view chip.AirportYes (if used)
latLngJSON ObjectContains the location details.See the specific table for details.Yes (if used)

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

ParameterData TypeDescriptionExampleMandatory?
latitudeNumberLatitude of the location.28.6139Yes (if used)
longitudeNumberLongitude of the location.77.2090Yes (if used)
queryStringLocation search query.New Delhi AirportYes (if used)

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.

Sample Failure Response

{

    "status": "ERROR",

    "errorText": "Error Message"

}





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