Privacy notice

HansaChat uses session storage where account features require it and privacy-friendly Umami analytics on this website. Analytics runs independently of this notice.

Learn more
HansaChat

Documentation

Messages and reactions

Read, search, send, edit, delete, and react to messages.

Messages and reactions

Reading

hansa chat messages list --channel general --limit 50
hansa chat messages get --message <message-id>
hansa chat messages search --query "standup notes" --channel general

--limit accepts 1–100. Instead of pages you navigate by channel sequence numbers, which stay stable:

hansa chat messages list --channel general --before-sequence 120
hansa chat messages list --channel general --after-sequence 100
hansa chat messages list --channel general --around-message <message-id>

The response includes meta with the next cursor (next_before_sequence or next_after_sequence) so scripts can walk the history reliably.

Sending

hansa chat messages send --channel general --text "Deploy finished."

Plain text becomes the workspace's rich document format automatically. For raw control you can pass the document JSON directly:

hansa chat messages send --channel general --content-json '{"type":"doc","content":[…]}'
hansa chat messages send --channel general --content-file message.json

Additional options: --parent <message-id> for a reply, --mention <user-id> (repeatable) to mention people, and --file <file-id> (repeatable) to attach uploaded files (see invitations and file uploads).

Sending is deliberately not idempotent. Every invocation creates a new message — running the command twice sends two messages. This is what scripts that post notifications usually want; everything else in the CLI converges on desired state.

Editing and deleting

hansa chat messages edit --message <id> --text "Deploy finished successfully."
hansa chat messages delete --message <id>

Editing the same content twice is a no-op the second time, and deleting an already-deleted message succeeds unchanged. Both wait until the change is visible through the API; add --no-wait to return immediately with the accepted command.

Reactions

hansa chat reactions set --message <id> --emoji "👍" --present=true
hansa chat reactions set --message <id> --emoji "👍" --present=false

The CLI only calls the backend when the requested presence differs from the current state, so repeated commands are safe.

Privacy notice

HansaChat uses session storage where account features require it and privacy-friendly Umami analytics on this website. Analytics runs independently of this notice.

Learn more