logo

Usage: Copy the structured message code and paste it into the input box of the IM console to immediately send a structured message and see the display result

Parameters

Parameter NameTypeValueRequiredDescription
titleStringYesTitle
descriptionStringNoDescription
img_urlStringNoIf the value is empty, it will not be displayed
buttonsObject[]NoButton group
buttons.typeStringlink (Link), phone (Phone), sdk_callback (SDK Callback Function)NoButton type
buttons.textStringNoButton display text
buttons.valueStringNoCorresponding value of button type
buttons.callback_nameStringNoCallback function name, only available when type is sdk_callback

Example

##UDESK_IM_STRUCT_MSG##
{
    "title": "Test API Sending Structured Message",
    "description": "This message is from API",
    "img_url": "https://www.udesk.cn/images/index/banner01.jpg",
    "buttons": [
        {
            "type": "link",
            "text": "Visit",
            "value": "https://www.udesk.cn"
        },
        {
            "type": "phone",
            "text": "Call",
            "value": "010-12345678"
        },
        {
            "type": "sdk_callback",
            "callback_name": "sdk_callback",
            "text": "Callback Button",
            "value": "v1"
        }
    ]
}