SunshineConversationsClient::FileMessage

August 27, 2025 ยท View on GitHub

Properties

NameTypeDescriptionNotes
typeStringThe type of message.[default to 'file']
media_urlStringThe URL for media, such as an image, attached to the message. <aside class=&quot;notice&quot;><strong>Note:</strong> An authorization header is required to access the mediaUrl when private attachments are enabled. See configuring private attachments for messaging guide for more details.</aside>
media_sizeFloatThe size of the media.[optional][readonly]
media_typeStringThe media type of the file.[optional][readonly]
alt_textStringAn optional description of the file for accessibility purposes. The field will be saved by default with the file name as the value.[optional]
textStringThe text content of the message.[optional]
block_chat_inputBooleanWhen set to true, the chat input will be disabled on supported client implementations when the message is the most recent one in the history. Can be used for guided flows or to temporarily disable the user's ability to send messages in the conversation.[optional]
html_textStringHTML text content of the message. Can be provided in place of `text`. Cannot be used with `markdownText`. If no `text` is provided, will be converted to `text` upon reception to be displayed on channels that do not support rich text. See rich text documentation for more information.[optional]
markdown_textStringMarkdown text content of the message. Can be provided in place of `text`. Cannot be used with `htmlText`. Will be converted to `htmlText` upon reception. If converted `htmlText` exceeds 4096 characters, the message will be rejected. If no `text` is provided, will be converted to `text` upon reception to be displayed on channels that do not support rich text. See rich text documentation for more information.[optional]
attachment_idStringAn identifier used by Sunshine Conversations for internal purposes.[optional]

Example

require 'sunshine-conversations-client'

instance = SunshineConversationsClient::FileMessage.new(
  type: null,
  media_url: null,
  media_size: null,
  media_type: null,
  alt_text: null,
  text: null,
  block_chat_input: null,
  html_text: &lt;h1&gt;Hello!&lt;/h1&gt;,
  markdown_text: # Hello!,
  attachment_id: null
)