logo
enes

Objects

Last update: 5 hours ago by Irais Aguirre

Objects used when sending RCS messages.

Message


PropertyDescriptionTypeRequirements
textText to send. UTF-8 encoded.String
  • Required if the following are not specified:
    • richCard
    • contentInfo.
  • Can only be specified together with suggestions.
richCardRich Card structure.RichCard
  • Required if the following are not specified:
    • text
    • contentInfo.
  • Can only be specified together with suggestions.
contentInfoInformation about an image or video.ContentInfo
  • Required if the following are not specified:
    • text
    • richCard.
  • Can only be specified together with suggestions.
suggestionsList of suggested replies and suggested actions (make a call, send a location, etc.).Suggestion[]
  • Maximum 11 suggestions.

RichCard


PropertyDescriptionTypeRequirements
carouselCardCard carousel.CarouselCard
  • Required if the following is not specified:
    • standaloneCard.
  • Cannot be specified together with standaloneCard.
standaloneCardSingle card. StandaloneCard
  • Required if the following is not specified:
    • carouselCard.
  • Cannot be specified together with carouselCard.

StandaloneCard


PropertyDescriptionTypeRequirements
cardOrientationWidth of the carousel cards.String
  • Required
  • Accepted values:
    • "HORIZONTAL" (if the media field is specified in cardContent, it must contain at least the title, description, or suggestions[] field).
    • "VERTICAL".
thumbnailImageAlignmentAlignment of the image preview when cardOrientation is "HORIZONTAL".String
  • Required
  • Accepted values:
    • "LEFT"
    • "RIGHT"
cardContentCard content.CardContent
  • Required.

CarouselCard


PropertyDescriptionTypeRequirements
cardWidthWidth of the carousel cards.String
  • Required
  • Accepted values:
    • "CARD_WIDTH_UNSPECIFIED"
    • "SMALL" (Media.height of type TALL cannot be used).
    • "MEDIUM"
cardContentsList of content for each card in the carousel. CardContent[]
  • Required
  • Minimum 2 elements, maximum 10 elements.

CardContent


PropertyDescriptionTypeRequirements
titleCard title.String
  • Maximum 200 characters.
descriptionText inside the card.String
  • Maximum 2000 characters.
mediaImage or video to include in the card.Media
suggestionsList of suggested replies and suggested actions (make a call, send a location, etc.).Suggestion[]
  • Maximum 4 elements.

Media


PropertyDescriptionTypeRequirements
heightHeight of the image or video inside a card.String
  • Required
  • Accepted values:
    • "SHORT"
    • "MEDIUM"
    • "TALL"(Not available for carouselCard.cardWidth with value "SMALL").
contentInfoInformation about the image or video.ContentInfo
  • Required.

ContentInfo


PropertyDescriptionTypeRequirements
fileUrlPublicly accessible URL where the file, image, or video is located.String
  • Required
  • The platform determines the file type from the HTTP content-type header, which must be present in the HTTP response of the URL and have a value matching the file type.
thumbnailUrlPublicly accessible URL of the image or video preview.String
  • If not specified, the RCS platform shows a blank preview until the user's device downloads the file.
forceRefreshIndicates whether the file and preview are fetched from the specified URLs even if the platform already has cached copies of these files.Boolean
  • Default: false

Suggestion


PropertyDescriptionTypeRequirements
replySuggested reply that the user can tap to reply to the Agent.suggestedreply
  • Required if the following is not specified:
    • action.
actionAction that the user can tap to start an operation on the device (make a call, send a location, etc.)SuggestedAction
  • Required if the following is not specified:
    • reply.

SuggestedReply


PropertyDescriptionTypeRequirements
textText displayed in the suggested reply and sent to the Agent when the user taps it.String
  • Required.
  • Maximum 25 characters.
postbackDataInformation the Agent receives when the user taps the suggested reply.String
  • Required.

SuggestedAction


PropertyDescriptionTypeRequirements
textText displayed in the suggested action.String
  • Required
  • Maximum 25 characters.
postbackDataInformation the Agent receives when the user taps the suggested action.String
  • Required.
dialActionOpens the phone app with a pre-filled phone number.DialAction
  • Required if none of the following are specified:
    • viewLocationAction
    • createCalendarEventAction
    • openUrlAction
    • shareLocationAction.
viewLocationActionOpens the maps app and places a pin at a location specified by the Agent.ViewLocationAction
  • Required if none of the following are specified:
    • dialAction
    • createCalendarEventAction
    • openUrlAction
    • shareLocationAction.
createCalendarEventActionStarts creating a new event in the calendar app with pre-filled data.CreateCalendarEventAction
  • Required if none of the following are specified:
    • dialAction
    • viewLocationAction
    • openUrlAction
    • shareLocationAction.
openUrlActionOpens the browser with the specified URL. This URL can open an app if the app is configured to do so.OpenUrlAction
  • Required if none of the following are specified:
    • dialAction
    • viewLocationAction
    • createCalendarEventAction
    • shareLocationAction.
shareLocationActionOpens the maps app so the user can choose a location and send it to the Agent.ShareLocationAction
  • Required if none of the following are specified:
    • dialAction
    • viewLocationAction
    • createCalendarEventAction
    • openUrlAction.

DialAction


PropertyDescriptionTypeRequirements
phoneNumberPhone number pre-filled in the phone app.String
  • Required
  • The number must be in E.164 format, e.g.: +525512345678

ViewLocationAction


PropertyDescriptionTypeRequirements
latLongThe latitude and longitude of a specific location.LatLng
  • Required.
labelText to display as the label of the pin placed at the specified latitude and longitude.String

LatLng


PropertyDescriptionTypeRequirements
latitudeLatitude in degreesNumber
  • Required.
  • Must be in the range -90.0 to +90.0.
longitudeLongitude in degreesNumber
  • Required
  • Must be in the range -180.0 to +180.0.

CreateCalendarEventAction


PropertyDescriptionTypeRequirements
startTimeEvent start date and time in UTC.String
  • Required
  • RFC3339 format. E.g.: 2020-10- 02T19:00:00Z
endTimeEvent end date and time in UTC.String
  • Required
  • RFC3339 format. E.g.: 2020-10- 02T20:00:00Z
titleEvent title.String
descriptionEvent description.String

OpenUrlAction


PropertyDescriptionTypeRequirements
urlURL to open in the browser.String
  • Required.
RCS — Previous
HTTP connection
Next
Examples