Message

Specifications for message and file formats.

Message Schema

Name

Type

Description

id

string

The UUID assigned to the message automatically by the service when it is sent.

content

string

The content of the message.

timestamp

string

The Unix timestamp in milliseconds when the message was sent.

channelId

string

The id of the channel the message is persisted to.

userId

string

The id of the user who sent the message.

parent

The parent Message that this message is a direct reply to.

rootMessageId

string

The id of the root parent Message of the reply chain.

metadata

object

The custom object of metadata properties. The following keys have special functions when set and so should not be used for custom properties: sourceLanguageCode, targetLanguageCodes.

i18n

object

The internationalization object for storing translations of the message content. Has the following shape: { en: { content: "Hello" }, es: { content: "Hola" } }

files

array [File]

The list of File objects associated with the message that references files uploaded to the service.

actions

array

The array of custom items attached to the message via sendMessageAction.

File Schema

Name

Type

Description

id

string

The auto-generated unique id of the file created when it was uploaded.

channelId

string

The id of the channel the file was sent to.

name

string

The name of the file.

lastModified

integer

The last modified date of the file in Unix timestamp in milliseconds.

size

integer

The size of the file in bytes.

contentType

string

The content type of the file (i.e. image/jpeg).

Last updated

Logo

© Copyright 2024 ALO.ai, Inc. • All Rights Reserved