Space Docs
Domain Model

Message

Fields

FieldTypeRequiredDefaultDescription
idstring.uuidYes—Id
createdAtstring.date-timeYes—Created at
updatedAtstring.date-timeYes—Updated at
conversationIdstringYes—ID of the associated conversation
directionenum(inbound, outbound, system)Yes—Direction
providerenum(telegram, whatsapp, discord, slack, microsoft_teams, ai_agent, email)Yes—Provider
externalMessageIdstringNo—ID of the associated external message
senderExternalIdstringNo—ID of the associated sender external
senderDisplayNamestringNo—Sender display name
bodyTextstringNo—Body text
bodyRichJsonunknownNo—Body rich json
attachmentRefsJsonunknownNo—Attachment refs json
messageTypestringYes—Message type
sentAtstring.date-timeNo—Sent at
receivedAtstring.date-timeNo—Received at
deliveryStatusenum(pending, sent, delivered, read, failed)Yes—Delivery status
metadataJsonobjectNo—Metadata json
relevanceStatusenum(auto_relevant, confirmed, excluded)No—Relevance status
relevanceNotestringNo—Relevance note

Create Schema

Fields accepted when creating a new record:

FieldTypeRequiredDefaultDescription
conversationIdstringYes—ID of the associated conversation
directionenum(inbound, outbound, system)Yes—Direction
providerenum(telegram, whatsapp, discord, slack, microsoft_teams, ai_agent, email)Yes—Provider
externalMessageIdstringNo—ID of the associated external message
senderExternalIdstringNo—ID of the associated sender external
senderDisplayNamestringNo—Sender display name
bodyTextstringNo—Body text
bodyRichJsonunknownNo—Body rich json
attachmentRefsJsonunknownNo—Attachment refs json
messageTypestringYes"text"Message type
sentAtstring.date-timeNo—Sent at
receivedAtstring.date-timeNo—Received at
deliveryStatusenum(pending, sent, delivered, read, failed)Yes"pending"Delivery status
metadataJsonobjectNo—Metadata json
relevanceStatusenum(auto_relevant, confirmed, excluded)No—Relevance status
relevanceNotestringNo—Relevance note

Update Schema

All fields are optional when updating:

FieldTypeRequiredDefaultDescription
externalMessageIdstringNo—ID of the associated external message
senderExternalIdstringNo—ID of the associated sender external
senderDisplayNamestringNo—Sender display name
bodyTextstringNo—Body text
bodyRichJsonunknownNo—Body rich json
attachmentRefsJsonunknownNo—Attachment refs json
messageTypestringNo—Message type
sentAtstring.date-timeNo—Sent at
receivedAtstring.date-timeNo—Received at
deliveryStatusenum(pending, sent, delivered, read, failed)No—Delivery status
metadataJsonobjectNo—Metadata json
relevanceStatusenum(auto_relevant, confirmed, excluded)No—Relevance status
relevanceNotestringNo—Relevance note

On this page