---
title: "Set the weekly email"
description: "Turns the weekly analytics email on or off."
canonical_url: https://docs.markdrop.in/api/analytics/set-the-weekly-email
last_updated: 2026-10-30
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Set the weekly email

`PATCH https://api.markdrop.in/api/v1/me/preferences`

Turns the weekly analytics email on or off.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Guide:** [Weekly email](https://docs.markdrop.in/analytics/weekly-email)

## Request body

`application/json`, required.

- `analytics_digest` ("weekly" | "off", required): `weekly` sends the weekly analytics email; `off` stops it.

## Responses

- `200`: OK.
- `401`: No token, or the token is revoked or mistyped.
- `422`: The request didn't validate. `detail` lists each problem, with where it is (`loc`) and why (`msg`).

## Examples

**curl**

```bash
curl -X PATCH https://api.markdrop.in/api/v1/me/preferences \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"analytics_digest":"off"}'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/me/preferences", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "analytics_digest": "off"
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.patch(
    "https://api.markdrop.in/api/v1/me/preferences",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={"analytics_digest": "off"},
)
r.raise_for_status()
print(r.json())
```
