ZRM Docs
Domain Model

Message

Fields

FieldTypeRequiredDefaultDescription
idstring.uuidYesId
createdAtstring.date-timeYesCreated at
updatedAtstring.date-timeYesUpdated at
conversationIdstringYesID of the associated conversation
directionenum(inbound, outbound, system)YesDirection
providerenum(telegram, whatsapp, discord, slack, microsoft_teams, ai_agent, email)YesProvider
externalMessageIdstringNoID of the associated external message
senderExternalIdstringNoID of the associated sender external
senderDisplayNamestringNoSender display name
bodyTextstringNoBody text
bodyRichJsonunknownNoBody rich json
attachmentRefsJsonunknownNoAttachment refs json
messageTypestringYesMessage type
sentAtstring.date-timeNoSent at
receivedAtstring.date-timeNoReceived at
deliveryStatusenum(pending, sent, delivered, read, failed)YesDelivery status
metadataJsonobjectNoMetadata json
relevanceStatusenum(auto_relevant, confirmed, excluded)NoRelevance status
relevanceNotestringNoRelevance note

Create Schema

Fields accepted when creating a new record:

FieldTypeRequiredDefaultDescription
conversationIdstringYesID of the associated conversation
directionenum(inbound, outbound, system)YesDirection
providerenum(telegram, whatsapp, discord, slack, microsoft_teams, ai_agent, email)YesProvider
externalMessageIdstringNoID of the associated external message
senderExternalIdstringNoID of the associated sender external
senderDisplayNamestringNoSender display name
bodyTextstringNoBody text
bodyRichJsonunknownNoBody rich json
attachmentRefsJsonunknownNoAttachment refs json
messageTypestringYes"text"Message type
sentAtstring.date-timeNoSent at
receivedAtstring.date-timeNoReceived at
deliveryStatusenum(pending, sent, delivered, read, failed)Yes"pending"Delivery status
metadataJsonobjectNoMetadata json
relevanceStatusenum(auto_relevant, confirmed, excluded)NoRelevance status
relevanceNotestringNoRelevance note

Update Schema

All fields are optional when updating:

FieldTypeRequiredDefaultDescription
externalMessageIdstringNoID of the associated external message
senderExternalIdstringNoID of the associated sender external
senderDisplayNamestringNoSender display name
bodyTextstringNoBody text
bodyRichJsonunknownNoBody rich json
attachmentRefsJsonunknownNoAttachment refs json
messageTypestringNo"text"Message type
sentAtstring.date-timeNoSent at
receivedAtstring.date-timeNoReceived at
deliveryStatusenum(pending, sent, delivered, read, failed)No"pending"Delivery status
metadataJsonobjectNoMetadata json
relevanceStatusenum(auto_relevant, confirmed, excluded)NoRelevance status
relevanceNotestringNoRelevance note

On this page