Skip to content

Sending Secure Messages

This page shows the full process for sending secure messages using hxtransfer commands. You may also want to read more about the available commands, or how to configure the CLI. Working with existing transfers and sharing requests using the CLI involves using the ID field, read more about working with IDs.

Getting Started

Before you begin, ensure you have a working CLI installation by testing it with hxtransfer version, and that you have created an API key under your user account.

Authenticating

Ensure your shell environment has the HXTRANSFER_API_KEY variable set to the full API Key, and if you are using a different service from https://transfer.hexiosec.com that you have also set HXTRANSFER_BASE_URL.

Test that you can sign in successfully:

text
$ hxtransfer auth

  ┌───────────────┬─────────────────────────┐
  │               │          Value          │
  ├───────────────┼─────────────────────────┤
  │ Authenticated │ true                    │
  ├───────────────┼─────────────────────────┤
  │ Email         │ [email protected]
  ├───────────────┼─────────────────────────┤
  │ Name          │ Your Name               │
  ├───────────────┼─────────────────────────┤
  │ User ID       │ XvOXgMS5thivsdfVOmyvvA  │
  └───────────────┴─────────────────────────┘

More info: hxtransfer auth

Sending Secure Messages

Messages can be sent in two main ways, either by specifying the message content as a command argument, or by reading from stdin.

The message subject is optional, if omitted it will be set to "Secure Message".

$ hxtransfer send message "Message content."

Link:         https://transfer.hexiosec.com/d/B_Bzvub9W6YLurcsdfk_Ig#l8sL8H9UQVCwL5Eha_FTsdfZhf17bh-1OpJ-OViQncY
Sharing code: D0ZR77FQ6ZNDUC2XUPWPYGJ9Z4ABWP2ZGFXA42MSDFY8J2UZHAEZWMPC5ZNXPW7XN7A97WEARJ2EWC

Reading from a file is more useful if the message content is larger or contains line breaks.

$ hxtransfer send message < file.txt

Link:         https://transfer.hexiosec.com/d/B_Bzvub9W6YLurcsdfk_Ig#l8sL8H9UQVCwL5Eha_FTsdfZhf17bh-1OpJ-OViQncY
Sharing code: D0ZR77FQ6ZNDUC2XUPWPYGJ9Z4ABWP2ZGFXA42MSDFY8J2UZHAEZWMPC5ZNXPW7XN7A97WEARJ2EWC

Markdown Support

In the case of Markdown-formatted content, the format can be specified to render it correctly.

$ hxtransfer send message --format=markdown < message.md

Link:         https://transfer.hexiosec.com/d/B_Bzvub9W6YLurcsdfk_Ig#l8sL8H9UQVCwL5Eha_FTsdfZhf17bh-1OpJ-OViQncY
Sharing code: D0ZR77FQ6ZNDUC2XUPWPYGJ9Z4ABWP2ZGFXA42MSDFY8J2UZHAEZWMPC5ZNXPW7XN7A97WEARJ2EWC

This example can be used to demonstrate the supported markdown syntax

markdown
:div[TLP\:CLEAR]{.text-center.text-bg-secondary}

# Example Markdown

This message contains some example features and formatting that can be achieved in Markdown Secure Messages.
The syntax is mostly Github-Flavoured Markdown, rendered using [marked](https://marked.js.org/) with a number of enabled extensions.

> [!WARNING]
> Whilst Markdown does support raw HTML, not all elements are allowed to be rendered.
>
> Check the preview before sending a message.

## Packages

_List of available packages_

| Package               | Description                                      |
| --------------------- | ------------------------------------------------ |
| marked-alert          | Alert-style blocks                               |
| marked-directive      | Allow custom elements and more advanced styling  |
| marked-footnote[^1]   | Support footnotes                                |
| marked-gfm-heading-id | Support linking to headings within the same page |

[^1]: Documentation is available for each of these packages separately.

## Other Elements

- Unordered lists
  - Nested
    - as needed

1. Numbered
2. Lists

> **Block Quotes**
>
> Can span multiple lines.

```
// Code example
const props = defineProps<{
  markdown: string;
}>();
```

Either the Link or Sharing Code can be sent to your recipient. There is no difference in security between the two approaches, the link is more convenient however in some cases email systems have been known to corrupt parts of the link. Sharing Code can be used by pasting it into the home page.

Managing Sent Transfers

All sent transfers can be viewed in a list, regardless of whether the content is shared files or a secure message.

See the command help for more information, or the example in Sending Files.