{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/Message",
"title": "Message",
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "Y2lzY29zcGFyazovL3VzL01FU1NBR0UvOTJkYjNiZTAtNDNiZC0xMWU2LThhZTktZGQ1YjNkZmM1NjVk",
"description": "The unique identifier for the message."
},
"roomId": {
"type": "string",
"example": "Y2lzY29zcGFyazovL3VzL1JPT00vYmJjZWIxYWQtNDNmMS0zYjU4LTkxNDctZjE0YmIwYzRkMTU0",
"description": "The room ID of the message."
},
"roomType": {
"type": "string",
"enum": [
"direct",
"group"
],
"description": "The type of room.\n * `direct` - 1:1 room\n * `group` - group room\n"
},
"toPersonId": {
"type": "string",
"example": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMDZkNzFhNS0wODMzLTRmYTUtYTcyYS1jYzg5YjI1ZWVlMmX",
"description": "The person ID of the recipient when sending a private 1:1 message."
},
"toPersonEmail": {
"type": "string",
"example": "[email protected]",
"description": "The email address of the recipient when sending a private 1:1 message."
},
"text": {
"type": "string",
"example": "PROJECT UPDATE - A new project plan has been published on http://example.com/s/lf5vj. The PM for this project is Mike C. and the Engineering Manager is Jane W.",
"description": "The message, in plain text. If `markdown` is specified this parameter may be *optionally* used to provide alternate text for UI clients that do not support rich text."
},
"markdown": {
"type": "string",
"example": "**PROJECT UPDATE** A new project plan has been published [here](http://example.com/s/lf5vj). The PM for this project is <@personEmail:[email protected]> and the Engineering Manager is <@personEmail:[email protected]>.",
"description": "The message, in Markdown format."
},
"files": {
"type": "array",
"items": {
"type": "string",
"example": "http://www.example.com/images/media.png"
},
"description": "Public URLs for files attached to the message. For the supported media types and the behavior of file uploads, see [Message Attachments](/docs/api/basics#message-attachments)."
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Attachment"
},
"description": "Content attachments attached to the message."
},
"personId": {
"type": "string",
"example": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mNWIzNjE4Ny1jOGRkLTQ3MjctOGIyZi1mOWM0NDdmMjkwNDY",
"description": "The person ID of the message author."
},
"personEmail": {
"type": "string",
"example": "[email protected]",
"description": "The email address of the message author."
},
"mentionedPeople": {
"type": "array",
"items": {
"type": "string",
"example": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS8yNDlmNzRkOS1kYjhhLTQzY2EtODk2Yi04NzllZDI0MGFjNTM,Y2lzY29zcGFyazovL3VzL1BFT1BMRS83YWYyZjcyYy0xZDk1LTQxZjAtYTcxNi00MjlmZmNmYmM0ZDg"
},
"description": "People IDs for anyone mentioned in the message."
},
"mentionedGroups": {
"type": "array",
"items": {
"type": "string",
"example": "all"
},
"description": "Group names for the groups mentioned in the message."
},
"created": {
"type": "string",
"example": "2015-10-18T14:26:16+00:00",
"description": "The date and time the message was created."
}
}
}