Skip to main content

Messages

The message command group covers sending, reading, and managing threads and inboxes.


Sending

message new-thread

Create a new thread and send the first message to a recipient.

packet message new-thread --to <pubkey> --content "Hello!" [options]

Required:

FlagDescription
--to <pubkey>Recipient Solana public key

Content (exactly one required):

FlagDescription
--content <text>Inline message body, URL, Irys gateway URL, or raw Irys CID
--file <path>Read message body from a file
--url <url>Send an existing URL or Irys gateway URL as a pointer

Content options:

FlagDefaultDescription
--subject <text>Optional subject; wraps body in {subject, message} JSON envelope
--rawfalseSend/upload the exact content without wrapping in a JSON envelope
--content-type <type>autoauto, text, url, or irys
--uploadfalseUpload --content/--file payload to Irys; message stores the CID
--encryptfalseEncrypt the payload before sending. Requires the recipient to have a registered key or uses wallet-derived key.

Inbox / targeting:

FlagDescription
--inbox <id|address>Target a specific inbox ID or PDA address (default: inbox 0)
--thread <id>Optional explicit thread ID

Payment:

FlagDescription
--payment-sol <amount>Attach a WSOL payment (e.g. 0.05)
--payment-to <pubkey>Override the payment destination (defaults to recipient's ATA)
--payment-to-rawTreat --payment-to as a raw token account, not an owner wallet

Transaction:

FlagDescription
--skip-preflightSkip transaction preflight
--priority-fee <microLamports>Set a priority fee

Examples:

# Plain text
packet message new-thread --to 3xK...abc --content "Hello!"

# Encrypted
packet message new-thread --to 3xK...abc --content "Secret" --encrypt

# Upload a file and send as Irys CID
packet message new-thread --to 3xK...abc --file ./report.pdf --upload

# Encrypted upload
packet message new-thread --to 3xK...abc --file ./doc.txt --upload --encrypt

message new

Send a new message to an existing thread.

packet message new --thread <id> --content "Reply!" [options]

Required:

FlagDescription
--thread <id>Existing thread ID

Accepts the same --content/--file/--url, content options, and payment flags as new-thread.

Additional flag:

FlagDefaultDescription
--disable-paymentfalseSkip payment even if the inbox has a payment rule

Reading

message inboxes

List all inboxes belonging to your configured wallet.

packet message inboxes [--json]

Output includes inbox ID, address, name, thread count, and payment rule.


message inbox <inbox>

Load an inbox and display its threads with last messages.

packet message inbox 0 [options]
packet message inbox <pda-address> [--owner <pubkey>] [options]
Argument/FlagDescription
<inbox>Inbox ID (uses --owner wallet) or inbox PDA address
--owner <pubkey>Inbox owner when <inbox> is a numeric ID (defaults to configured wallet)
--limit <n>Max threads to return (default 25)
--max-pages <n>Max archive pages to scan (default 5)
--no-decryptPrint raw/encrypted content without decrypting
--no-load-contentSkip fetching URL/Irys bodies; print pointer only
--jsonPrint JSON output

message activity

Load all threads your wallet has sent or received.

packet message activity [--limit <n>] [--max-pages <n>] [--json]
FlagDefaultDescription
--limit <n>25Thread count
--max-pages <n>5Max activity pages to scan
--no-decryptSkip decryption
--jsonJSON output

message thread

Show metadata for a specific thread.

packet message thread --thread <id> [--json]

message messages

Load messages from a thread.

packet message messages --thread <id> [options]
FlagDefaultDescription
--thread <id>requiredThread ID
--limit <n>50Message count
--from-seq <seq>Start from a specific sequence number
--direction <dir>backwardbackward (newest first) or forward
--no-decryptSkip decryption
--no-load-contentSkip fetching URL/Irys bodies
--jsonJSON output

message last

Load the most recent message from a thread.

packet message last --thread <id> [--no-decrypt] [--json]

Inbox Management

message create-inbox

Create a new inbox, optionally with a WSOL payment wall.

packet message create-inbox [--inbox <id>] [--name <name>] [options]
FlagDefaultDescription
--inbox <id>0Inbox ID
--name <name>Display name
--uri <uri>""Metadata URI
--ephemeralfalseCreate an ephemeral inbox instead of standard
--payment-sol <amount>Require SOL payment to open a thread (e.g. 0.05)
--payment-to <pubkey>Override payment destination
--payment-to-rawfalseTreat --payment-to as a raw token account
--escrowfalseHold payments in escrow until approved
--jsonJSON output

Example:

# Inbox with 0.1 SOL payment wall + escrow
packet message create-inbox --inbox 0 --name "My Inbox" --payment-sol 0.1 --escrow

message edit-inbox-payment

Edit or remove the payment rule on an existing inbox.

packet message edit-inbox-payment <inbox> [--owner <pubkey>] [options]
Argument/FlagDescription
<inbox>Inbox ID or PDA address
--owner <pubkey>Inbox owner when <inbox> is numeric
--payment-sol <amount>New required SOL payment
--clear-paymentRemove the payment rule entirely
--escrowEnable escrow on the new rule
--jsonJSON output

Escrow

message escrow approve

Approve and release the escrow for a thread.

packet message escrow approve --thread <id>

message escrow withdraw

Withdraw released escrow funds.

packet message escrow withdraw --thread <id> [--receiver-token-account <pubkey>]
FlagDescription
--receiver-token-account <pubkey>Override receiver token account