> ## Documentation Index
> Fetch the complete documentation index at: https://ahasend.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> AhaSend stores all message data in the EU. See /facts.
> The API base URL is https://api.ahasend.com. Send the API key in the Authorization: Bearer header. See /api-reference/authentication.
> Use send.ahasend.com for SMTP. Ports 25, 587 and 2525 use STARTTLS. Port 465 is not supported. See /smtp.
> For send-only integrations, create an API Key v2 under Credentials → Add and scope it to messages:send:{your-domain}. See /send-api/credentials and /api-reference/scopes.

# Tracking and Retention per Message

> Turn open and click tracking on or off for a single email, and choose how long AhaSend keeps its content and metadata, overriding your account settings.

Your account settings decide whether opens and clicks are tracked and how long AhaSend keeps your messages. The `tracking` and `retention` fields change that for a single send, for example no tracking on a password reset and no stored content for a message with sensitive data.

Available on Free, Pro and Max. See [plans and features](https://ahasend.com/docs/facts.md#plans-and-features).

## How do I turn tracking on or off for one email?

```json theme={null}
{
  "tracking": {
    "open": false,
    "click": false
  }
}
```

`true` turns tracking on, `false` turns it off, and leaving a field out keeps your account setting. Tracking needs a tracking domain set up for the sending domain; without it the message is sent without tracking. Open tracking works on HTML email only, click tracking on `http://` and `https://` links. To keep one link untracked, add `data-as-no-track` to it. See [open tracking](https://ahasend.com/docs/tracking/open-tracking.md) and [click tracking](https://ahasend.com/docs/tracking/click-tracking.md).

> [!TIP]
>
> Leave tracking off for login codes, password resets and other security mail. Rewritten links in those messages make them look less trustworthy, and some security scanners click links, which can use up one-time links.

## How do I choose how long a message is kept?

```json theme={null}
{
  "retention": {
    "metadata": 7,
    "data": 0
  }
}
```

| Field | What it keeps | Range |
| - | - | - |
| `metadata` | Delivery status, timestamps, recipient and tracking events | 1 to 30 days, within your [plan's range](https://ahasend.com/docs/retention.md) |
| `data` | The content: body, headers and attachments | 0 to 30 days, within your plan's range |

`data: 0` keeps no copy of the content after it's sent. It applies to accounts allowed to turn off message data retention; on other accounts the message keeps the account's default. See [data retention](https://ahasend.com/docs/retention.md).

Over SMTP, the same settings use [special headers](https://ahasend.com/docs/smtp/special-headers.md).

## Related guides

* [Open tracking](https://ahasend.com/docs/tracking/open-tracking.md), [Click tracking](https://ahasend.com/docs/tracking/click-tracking.md), [Data retention](https://ahasend.com/docs/retention.md).
* [Send email](https://ahasend.com/docs/send-api/send-email.md), [SMTP special headers](https://ahasend.com/docs/smtp/special-headers.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.