Channel properties

Sinch Conversation API channel specific properties.

Conversation API Channel Specific Properties

Conversation API allows you to use some channel specific properties while sending messages on certain channels. These properties can be listed under "channel_properties" in the message request.

Example for adding the channel specific property "MESSENGERNOTIFICATIONTYPE" on Facebook Messenger:

Copy
Copied
{
  "app_id": "{{APP_ID}}",
  "recipient": {
    "contact_id": "{{CONTACT_ID}}"
  },
  "message": {
    "text_message": {
      "text": "Text message from Sinch Conversation API."
    }
  },
  "channel_priority_order": ["MESSENGER"],
  "channel_properties": {
    "MESSENGER_NOTIFICATION_TYPE": "SILENT_PUSH"
  }
}

Example for adding "VIBERSENDERNAME" and "VIBERSENDERAVATAR" on Viber Bot:

Copy
Copied
{
  "app_id": "{{APP_ID}}",
  "recipient": {
    "contact_id": "{{CONTACT_ID}}"
  },
  "message": {
    "text_message": {
      "text": "Text message from Sinch Conversation API."
    }
  },
  "channel_priority_order": ["VIBER"],
  "channel_properties": {
    "VIBER_SENDER_NAME": "John Doe",
    "VIBER_SENDER_AVATAR": "https://1vxc0v12qhrm1e72gq1mmxkf-wpengine.netdna-ssl.com/wp-content/uploads/2018/12/favicon.png"
  }
}

Example for adding the channel specific property "SMS_SENDER" on SMS channel:

Copy
Copied
{
  "app_id": "{{APP_ID}}",
  "recipient": {
    "contact_id": "{{CONTACT_ID}}"
  },
  "message": {
    "text_message": {
      "text": "Text message from Sinch Conversation API."
    }
  },
  "channel_priority_order": ["SMS"],
  "channel_properties": {
    "SMS_SENDER": "mysender"
  }
}

Example for adding the channel specific property SMS_MAX_NUMBER_OF_MESSAGE_PARTS on SMS channel:

Copy
Copied
{
  "app_id": "{{APP_ID}}",
  "recipient": {
    "contact_id": "{{CONTACT_ID}}"
  },
  "message": {
    "text_message": {
      "text": "Text message from Sinch Conversation API."
    }
  },
  "channel_priority_order": ["SMS"],
  "channel_properties": {
    "SMS_MAX_NUMBER_OF_MESSAGE_PARTS": "3"
  }
}

Example for adding the channel specific property "INSTAGRAMMESSAGETAG" on Instagram channel:

Copy
Copied
{
  "app_id": "{{APP_ID}}",
  "recipient": {
    "contact_id": "{{CONTACT_ID}}"
  },
  "message": {
    "text_message": {
      "text": "Text message from Sinch Conversation API."
    }
  },
  "channel_priority_order": ["INSTAGRAM"],
  "channel_properties": {
    "INSTAGRAM_MESSAGE_TAG": "HUMAN_AGENT"
  }
}

Example for adding the channel specific property "TELEGRAMDISABLELINK_PREVIEW" on the Telegram Bot channel:

Copy
Copied
{
  "app_id": "{{APP_ID}}",
  "recipient": {
    "contact_id": "{{CONTACT_ID}}"
  },
  "message": {
    "text_message": {
      "text": "Text message from Sinch Conversation API."
    }
  },
  "channel_priority_order": ["TELEGRAM"],
  "channel_properties": {
    "TELEGRAM_DISABLE_LINK_PREVIEW": "TRUE"
  }
}

Example for adding the channel specific property "LINEVIDEOTRACKING_ID" on LINE channel:

Copy
Copied
{
  "app_id": "{{APP_ID}}",
  "recipient": {
    "contact_id": "{{CONTACT_ID}}"
  },
  "message": {
    "media_message": {
      "thumbnail_url": "https://url/to/your/thumbnail/image.jpg",
      "url": "https://url/to/yout/video.mp4"
    }
  },
  "channel_properties": {
    "LINE_VIDEO_TRACKING_ID": "my-unique-video-tracking-id"
  }
}

The names of available channel specific properties indicate which channel they can be used for.

Possible values for property names and values:

Property name Property value
MESSENGER_MESSAGING_TYPE Messenger messaging type. For more information visit: https://developers.facebook.com/docs/messenger-platform/send-messages/#messaging_types Defaults to MESSAGETAG if MESSENGERMESSAGE_TAG is set.
MESSENGER_MESSAGE_TAG Messenger message tag. Enables sending specific updates to users outside the standard messaging window. If you want to send messages after the 24h response window it's required to include the proper message tag. For more information including a list of possible values and applicable policies visit: https://developers.facebook.com/docs/messenger-platform/send-messages/message-tags There is no default value for this property.
MESSENGER_NOTIFICATION_TYPE Messenger push notification type. Possible values are REGULAR (sound/vibration), SILENTPUSH (on-screen notification only) and NOPUSH (no notification). The default is REGULAR.
VIBER_SENDER_NAME Viber Bot sender’s name to display. Max 28 characters.
VIBER_SENDER_AVATAR Viber Bot sender’s avatar URL. Avatar size should be no more than 100 kb. Recommended 720x720.
SMS_FLASH_MESSAGE Whether this is flash SMS message. Flash SMS messages are shown on screen without user interaction while not saving the message to the inbox. Possible values are true and false. The default is false.
MMS_SENDER Required on MMS channel, specifies the shortcode or longnumber to use as the sender.
SMS_SENDER Optional, the sender to use when sending a message on SMS channel. Can be a valid MSISDN, short code or alphanumeric sender. If the sender is rejected by the underlying SMS channel, you get the error information in the delivery receipt.
INSTAGRAM_MESSAGE_TAG Required on Instagram when having human agent support. All messages sent by a human agent outside of the 24hr must leverage the HUMANAGENT tag. HUMANAGENT tag allows messages to be sent within 7 days after the last user’s message.
MMS_STRICT_VALIDATION Whether or not you want the media included in your message to be checked against Sinch MMS channel best practices. If set to true, your message will be rejected if it doesn't conform to the listed recommendations, otherwise no validation will be performed. The default is false.
TELEGRAM_DISABLE_LINK_PREVIEW When message content contains a URL, by default Telegram will analyze the URL and get a preview for it. Use this parameter to disable link preview.
LINE_VIDEO_TRACKING_ID ID used to identify the video when Video viewing complete event occurs. If you send a video message with trackingId added, the video viewing complete event occurs when the user finishes watching the video. You can use the same ID in multiple messages.
SMS_MAX_NUMBER_OF_MESSAGE_PARTS Optional, message will be dispatched only if it can be sent in a number of SMS messages equal to or less than the number set in this property.
We'd love to hear from you!
Rate this content:
Still have a question?
 
Ask the community.