# Email

URL: https://docs.hanzo.ai/docs/cli/email

> The `hanzo email` commands.

Also for this capability: [API](https://docs.hanzo.ai/docs/openapi/email) · **CLI** · [MCP](https://docs.hanzo.ai/docs/mcp-tools/email) · [SDKs](https://docs.hanzo.ai/docs/sdks)

[API reference →](https://docs.hanzo.ai/docs/openapi/email)

```bash
hanzo email list
```

Every command takes `--json` for the raw response and `--help` for its own flags. Sign in once with `hanzo auth login`; the commands below use that session, and the org they act in is the one it carries.

| Command                | What it does                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `hanzo email create`   | Sends commercial email from the org through SES or SendGrid: one message per recipient, each carrying its own signed unsubscribe link in the footer and in List-Unsubscribe and List-Unsubscribe-Post (RFC 8058), and every http(s) link tagged with utm\_source=email, utm\_medium=\<provider>, utm\_campaign=\<campaign>, utm\_content=link\<n> and from=\<message id>, each only where the link does not carry it already. |
| `hanzo email get <id>` | Reads one message of the org's ledger, sent through this API or told of by its provider, with what became of it.                                                                                                                                                                                                                                                                                                              |
| `hanzo email list`     | Reads a page of the org's ledger, newest first: every message sent through POST /v1/email, and every message SES or SendGrid told of by its events, sent from anywhere on the org's account.                                                                                                                                                                                                                                  |
| `hanzo email provider` | Sets the provider the org's mail leaves by when a send pins none: ses or sendgrid.                                                                                                                                                                                                                                                                                                                                            |
| `hanzo email stats`    | Counts the org's mail over a range: sent, delivered, opened, clicked, bounced, complained and unsubscribed, each a count of messages, in all, by provider, by campaign and by day or hour (UTC).                                                                                                                                                                                                                              |
| `hanzo email verify`   | Evaluates an email address using explicitly selected, composable checks.                                                                                                                                                                                                                                                                                                                                                      |

### Sendgrid

| Command                       | What it does                                                                                                                                                                                                                                             |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `hanzo email sendgrid status` | Reports the org's SendGrid configuration: whether it holds the credentials a send needs, the account's credits as SendGrid answers them, what the org's ledger counted sent by SendGrid in the last 24 hours, and the DNS records of the sending domain. |

### Ses

| Command                  | What it does                                                                                                                                                                                                                                                                                                               |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `hanzo email ses status` | Reports the org's Amazon SES configuration: whether it holds the credentials a send needs, the account's limits as SES answers them (sandbox, sending enabled, 24-hour quota, rate, sent in the last 24 hours), what the org's ledger counted sent by SES in the last 24 hours, and the DNS records of the sending domain. |

### Webhooks

| Command                         | What it does                                                                                                                                                                                                                                 |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `hanzo email webhooks sendgrid` | Receives SendGrid's Signed Event Webhook: the delivery is an array of events, signed (ECDSA P-256, SHA-256) over its timestamp header followed by the body, under the public key the organization holds (the webhook-public-key credential). |
| `hanzo email webhooks ses`      | Receives Amazon SES events as an SNS HTTPS subscription delivers them.                                                                                                                                                                       |
