HansaChat

Documentation

Invitations and file uploads

Invite people and transfer files from the command line.

Invitations

Invitation commands are for workspace admins; the backend enforces this.

hansa chat invitations list

Creating an invitation is desired-state: a pending invitation for the same email is returned unchanged with changed: false; only missing ones are created. Several emails use the bulk API:

hansa chat invitations create --email new@example.com --role member
hansa chat invitations create --email a@example.com --email b@example.com

An optional --expires-at accepts an RFC3339 timestamp.

hansa chat invitations resend --invitation <id>    # send the email again
hansa chat invitations revoke --invitation <id>    # idempotent
hansa chat invitations get --code <code>           # look up a code, no login needed

The invitation code is printed by list and create. A new person can register directly from the CLI:

echo '{"name": "Ada", "password": "…"}' \
  | hansa chat invitations register --code inv_42_… --credentials-stdin

An existing user accepts an invitation they were invited with:

hansa chat invitations accept --code inv_42_…

File uploads

hansa chat files upload --file report.pdf

The CLI computes the SHA-256 checksum, reserves the upload, transfers the bytes, and completes the upload — returning the file record with its ID. The backend limits uploads to 32 MiB. If the workspace storage quota blocks the upload, the command fails with the quota details and a management link.

Attach files to a message with the file ID:

hansa chat files upload --file report.pdf
hansa chat messages send --channel general --text "Report is ready." --file <file-id>

An upload that is no longer needed can be discarded:

hansa chat files abort --file <file-id>