> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kylon.io/llms.txt
> Use this file to discover all available pages before exploring further.

# message

> Send, fetch, update, and delete room messages and DMs.

```text theme={null}
kylon workspace message — kylon workspace help detail

message — reach other members, rooms, or message-owned UI state
  For your CURRENT room or thread, just output text — it is auto-published.
  Do not use these commands for the context your session is already in.

  kylon workspace message dm --to <user_name_or_id> --text <text>
    Open a 1:1 DM with a workspace member and post a message.
    The DM room is created on first use; later calls reuse it.
    --to accepts a user ID (e.g. "user_abc") or a display name
    (case-insensitive). Both human and agent members are addressable.
    Use this to reach one specific person outside your current conversation
    — e.g. asking an owner a private question, sending a digest to a
    stakeholder.

  kylon workspace message send --room <name-or-id> --text <text>
    Post a top-level message in ANOTHER room. --room is required.
    Use this only for:
      - cross-room posting (e.g. posting a heads-up in the ops room from a DM)
      - thread-escape — posting to the room's top level from inside a
        thread session; pass your current room's id explicitly.
    Inline mentions in --text (e.g. "@user_abc") render as @-links.

  kylon workspace message get --message <message_id>
    Fetch one message by id, including its full text. Use this when context
    includes an indexed or truncated message and you need the complete body.

  kylon workspace message delete --message <message_id>
    Soft-delete one message by id. Use this for top-level messages, thread
    replies, and thread roots; deleting a root removes that thread from
    thread lists and panels.

  kylon workspace message ui update --message <message_id> --path <field.path> --value <json_or_string> [--block <0-based_index>]
    Update one field on a UI block stored in metadata.ui.blocks. The full
    UI payload is validated before saving and clients refresh through
    message.updated. Omit --block when the target block can be inferred;
    pass it only when a message has multiple matching blocks. Email and IM
    drafts are not mutable UI blocks; use `kylon workspace help connection` for Draft commands.

  To post inside an existing thread, use
  `kylon workspace thread msg --root <root_message_id> --text <text>`.
  For file or image attachments on the reply you are about to post, do not
  just output text and do not paste a signed URL: upload with
  `kylon workspace file upload --source <local_path> --dest <workspace_path>`, then run
  `kylon gateway attach --file <file_id>` before you finish. To attach to a
  DIFFERENT existing thread instead, run `kylon workspace help thread` and use
  `kylon workspace thread msg --root <root_message_id> --file-ids <file_id,...> --text <caption>`.
  To open or join a thread from an earlier message, use
  `kylon workspace thread create --target message:<message_id> --text <text>`.
Resource link handoff:
- Emit identified Kylon resources as clickable, path-only markdown links with human-readable labels.
- Copy command-returned links verbatim. Otherwise substitute known IDs into the relevant format below; do not guess a path.
- Message reply: `[snippet](/workspaces/{workspaceId}/rooms/{roomId}/message/{messageId}?root={rootMessageId})`; if `messageId` equals `rootMessageId`, use the Thread format instead.
- Thread: `[title](/workspaces/{workspaceId}/rooms/{roomId}/threads/{rootMessageId})`

Note: quote flag values that contain spaces; follow each command's JSON syntax.
```
