# POST /v1/tracking-opt-outs

Add a not-tracked address

Puts an address on the server’s list. New mail to it goes untracked, and its later opens and clicks are not recorded, from mail already sent too. An address already on the list changes nothing, so a repeat is safe.

Takes a server key (`sk_…`, or `sk_test_…` on a test server) as a bearer token. TypeScript: `sendora.trackingOptOuts.add({ address })`. Python: `sendora.tracking_opt_outs.add(address=...)`. PHP: `$sendora->trackingOptOuts->add(address: $address)`. Java: `sendora.trackingOptOuts().add(address)`.

## Request body

- `address` (string (email), required): The address never to track.

Example:

```json
{
  "address": "anna@example.com"
}
```

## Responses

### 200 The entry: a new one, or as it stood if the address was on the list.

- `address` (string or null, required): The recipient, lower-cased. Null when only a keyed hash is left: after an erasure, or when the recipient asked from mail that had left the log.
- `source` ("manual" | "recipient", required): manual: added through the API or the dashboard. recipient: the recipient asked for it, so remove it only after new consent.
- `messageId` (string (uuid) or null, required): The message that a recipient asked from. Null on a manual entry, and once that message or the address has gone.
- `createdAt` (string (date-time), required)

Example:

```json
{
  "address": "anna@example.com",
  "source": "manual",
  "messageId": null,
  "createdAt": "2026-11-06T12:00:00.000Z"
}
```

## Errors

Every error answers `error`, the code, and `message`, a sentence for a person. A code that adds fields is shown in full below the table.

| Code | Status | Meaning |
| --- | --- | --- |
| `invalid_request` | 400 | The body, the query or a header does not match what the route takes. |
| `unauthorized` | 401 | The key is missing, malformed or revoked. |
| `wrong_token_kind` | 403 | The key is of the other kind: a server key (sk_) where an account key (ak_) is needed, or the reverse. The message names the kind the operation takes. |
| `not_for_connections` | 403 | A connected app called an operation that no tool of the MCP server calls. An API key can. |
| `read_only_connection` | 403 | A connected app may only read here: the account is read only through a connection, and a live server takes changes only if the person allowed them when connecting. |
| `test_server_only` | 403 | A connected app may create a secret, or do what cannot be undone, on a test server only. |

Headers sent with an error:

- `WWW-Authenticate` ("Bearer") on 401: Always Bearer: send the key as Authorization: Bearer <key>.

### `invalid_request`

- `issues` (array of object): One entry per invalid field; absent when a header is wrong.
  - `path` (string, required): The field, dotted, such as to.0.email; empty when the whole body is wrong.
  - `message` (string, required)

Example:

```json
{
  "error": "invalid_request",
  "message": "The request is invalid: to.0: Invalid email address",
  "issues": [
    {
      "path": "to.0",
      "message": "Invalid email address"
    }
  ]
}
```
