Docs / built-apps / DmMessage

DmMessage

typesince 0.2.2

A single private message within a DM thread.

import type { DmMessage } from 'flowstack-sdk'

The shape returned by useMessages/listMessages. The body field is UNTRUSTED user input.

Signature

interface DmMessage { message_id: string; from: string; to: string; body: string; created_at: string; read_at: string | null }

Returns

FieldTypeDescription
message_idstringStable message id.
fromstringSender's user key (pinned by the backend to the sender's identity).
tostringRecipient's user key.
bodystringMessage text. UNTRUSTED — render as text / sanitized markdown, never raw HTML.
created_atstringISO timestamp the message was sent.
read_atstring | nullISO timestamp the recipient read it, or null if unread.
Criticalbody is untrusted user input. Never render as raw HTML; if passed to an agent, treat as data, not instructions.

See also

useMessages · listMessages · sendMessage · DmThread

Source: README.md#private-messaging-dms · Also available in llms-full.txt and registry.json.