Message with Editable Text

The message of type message supports editing text. To allow editing of text, add "editable": true to the message object.

To see the style options reference the

Full JSON Schemabelow.

To see the functionality reference the

Functionality Sectionbelow.

Example

Example

Example’s JSON

{
"head": {
"text": "I am a header",
"sub_head": {
"text": "I am a sub header"
}
},
"body": [
{
"type": "message",
"text": "I am a message with editable text",
"editable": true
}
]
}

Full JSON Schema

{
"type": "object",
"properties": {
"head": {
"type": "object",
"required": ["text"],
"properties": {
"text": {
"type": "string"
},
"style": {
"type": "object",
"properties": {
"color": {
"type": "string",
"format": "Hex"
},
"bold": {
"type": "boolean"
},
"italic": {
"type": "boolean"
}
}
},
"sub_head": {
"type": "object",
"required": ["text"],
"properties": {
"text": {
"type": "string"
},
"style": {
"type": "object",
"properties": {
"color": {
"type": "string",
"format": "Hex"
},
"bold": {
"type": "boolean"
},
"italic": {
"type": "boolean"
}
}
}
}
}
}
},
"body": {
"type": "array",
"items": {
"type": "object",
"required": ["type", "text", "editable"],
"properties": {
"type": {
"type": "string",
"enum": ["message"]
},
"text": {
"type": "string"
},
"editable": {
"type": "boolean"
},
"style": {
"type": "object",
"properties": {
"color": {
"type": "string",
"format": "Hex"
},
"bold": {
"type": "boolean"
},
"italic": {
"type": "boolean"
}
}
}
}
}
}
}
}

Functionality

User Actions

When a user edits the text, a POST request with data about the edit is sent to the Bot Endpoint URL you specified in your apps dashboard. Here is an example request body.

{
"event": "interactive_message_editable",
"payload": {
"accountId": "gVcjZnWWRLWvv_GtyGuaxg",
"channelName": "Tommy Gaessler",
"editItem": {
"origin": "I am a message with editable text",
"target": "I am a message with editable text that has been edited"
},
"messageId": "20190618205205291_tI1CUa6_aw1",
"original": {
"head": {
"sub_head": {
"text": "I am a sub header"
},
"text": "I am a header"
},
"body": [
{
"editable": true,
"text": "I am a message with editable text",
"type": "message"
}
]
},
"robotJid": "v1m0yn1imztuogsxjje8fdew@xmpp.zoom.us",
"timestamp": 1560891135776,
"toJid": "kdykjnimt4kpd8kkdqt9fq@xmpp.zoom.us/robot_v1m0yn1imztuogsxjje8fdew@xmpp.zoom.us",
"userId": "KdYKjnimT4KPd8KKdQt9FQ",
"userJid": "kdykjnimt4kpd8kkdqt9fq@xmpp.zoom.us",
"userName": "Tommy Gaessler"
}
}

For more information, see the Editable Text Webhook Reference.

Need help?

If you're looking for help, try Developer Support or our Developer Forum. Priority support is also available with Premier Developer Support plans.