@archastro/sdk
    Preparing search index...

    Interface Message

    A chat message posted in a thread, including its content, author, attachments, reactions, and optional reply metadata.

    interface Message {
        acl?: Acl | null;
        actors?: Actor[];
        agent?: string | null;
        agent_mode?: "cli" | "embedded" | null;
        attachments?: Attachment[];
        branched_thread?: string | null;
        content?: string | null;
        context?: MessageContext[];
        created_at?: string;
        has_replies?: boolean;
        id: string;
        idempotency_key?: string | null;
        is_deleted?: boolean;
        legacy_agent?: string | null;
        metadata?: Record<string, unknown>;
        org?: string | null;
        reactions?: MessageReaction[];
        rendering_mode?: string | null;
        replies?: Record<string, unknown>[];
        replies_after_cursor?: string | null;
        replies_before_cursor?: string | null;
        reply_count?: number;
        reply_to?: Record<string, unknown> | null;
        root_message_id?: string | null;
        sandbox?: string | null;
        team?: string | null;
        thread?: string;
        type?: string | null;
        user?:
            | string
            | {
                alias?: string
                | null;
                app?: string | null;
                app_name?: string | null;
                created_by_agent_user?: string | null;
                created_by_developer?: string | null;
                created_by_org?: string | null;
                created_by_team?: string | null;
                created_by_user?: string | null;
                email?: string | null;
                id: string;
                is_system_user?: boolean;
                metadata?: Record<string, unknown>;
                name?: string | null;
                org?: string | null;
                org_name?: string | null;
                org_role?: string | null;
                org_slug?: string | null;
                sandbox?: string | null;
                sandbox_name?: string | null;
            }
            | null;
        visibility?: "default"
        | "private";
    }
    Index

    Properties

    acl?: Acl | null

    Access control list for private messages (grants with read action). Only returned to resource owners (and privileged/org-admin viewers) via server-side field_redactions: [acl: :owner]; null for everyone else.

    actors?: Actor[]

    Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry.

    agent?: string | null

    ID of the agent user that sent this message (agi_...). null for messages sent by human users.

    agent_mode?: "cli" | "embedded" | null

    Local agent execution mode for this message. One of cli, embedded, or null when the message was not created by a local agent execution path.

    attachments?: Attachment[]

    Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments.

    branched_thread?: string | null

    ID of the thread that was branched from this message (thr_...). null if this message has not spawned a branch thread.

    content?: string | null

    Text content of the message. null for messages that contain only attachments.

    context?: MessageContext[]

    Immutable structured context captured when the message was posted. Each entry has type, optional title and content, and scalar attributes. Always present; defaults to an empty array. Context is delivered to agents as escaped XML data, not as system instructions.

    created_at?: string

    When the message was posted (ISO 8601).

    has_replies?: boolean

    Whether this message has at least one reply. Only present when explicitly requested or computed by the server.

    id: string

    Message ID (msg_...).

    idempotency_key?: string | null

    Client-supplied idempotency key used to deduplicate message sends. null if the sender did not provide one.

    is_deleted?: boolean

    Whether this message is a deletion tombstone. true only on the message_updated broadcast emitted when a message is deleted: the original content is replaced with a placeholder and the message no longer exists on the server. Always false for live messages.

    legacy_agent?: string | null

    Identifier of the legacy chat agent that sent this message, if applicable. null for messages sent by users or modern agent users.

    metadata?: Record<string, unknown>

    Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set.

    org?: string | null

    ID of the organization that owns this message (org_...).

    reactions?: MessageReaction[]

    Emoji and other reactions added to this message by users. Empty array if no reactions have been added or the association is not preloaded.

    rendering_mode?: string | null

    Display hint for how the message should be rendered. One of "reply", "direct", or "inline". null for user-authored messages, which are always rendered as standard replies.

    replies?: Record<string, unknown>[]

    Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message.

    replies_after_cursor?: string | null

    Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response.

    replies_before_cursor?: string | null

    Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response.

    reply_count?: number

    Total number of direct replies to this message. Only present when explicitly requested or computed by the server.

    reply_to?: Record<string, unknown> | null

    The parent message this message is a reply to, expanded as a full message object when loaded. null if this is a top-level message or the association is not preloaded.

    root_message_id?: string | null

    ID of the root message in this reply chain (msg_...). null for a top-level message. The value is persisted when the reply is created, so callers can correlate a multi-turn session without walking parent messages.

    sandbox?: string | null

    ID of the developer sandbox this message belongs to (dsb_...). null for non-sandbox messages.

    team?: string | null

    ID of the team this message is scoped to (tem_...). null if the message is not team-scoped.

    thread?: string

    ID of the thread this message belongs to (thr_...).

    type?: string | null

    Optional client-defined classification for the message (for example note or status). Free-form string up to 64 characters. The value system is reserved for platform-authored messages and cannot be set by clients. null when unset.

    user?:
        | string
        | {
            alias?: string
            | null;
            app?: string | null;
            app_name?: string | null;
            created_by_agent_user?: string | null;
            created_by_developer?: string | null;
            created_by_org?: string | null;
            created_by_team?: string | null;
            created_by_user?: string | null;
            email?: string | null;
            id: string;
            is_system_user?: boolean;
            metadata?: Record<string, unknown>;
            name?: string | null;
            org?: string | null;
            org_name?: string | null;
            org_role?: string | null;
            org_slug?: string | null;
            sandbox?: string | null;
            sandbox_name?: string | null;
        }
        | null

    The human user who sent this message. Returns a public ID string (usr_...) when the association is not preloaded, or an expanded user object when it is. null for messages sent by agents.

    visibility?: "default" | "private"

    Message-level visibility. default is visible to anyone who can see the parent thread. private is restricted to the sender and explicit ACL read grantees.