# Mark All Notifications Read

> Mark every unread notification of the key creator in this workspace as read, or only the unread ones in the categories you name.

Requires an API key with the `write` scope.

One set-based update. Only the key creator's notifications in the key's workspace are touched.

<ParamField query="category" type="string">Comma-separated: `replies`, `campaigns`, `inboxes`, `imports`, `billing`, `workspace`. Only the unread notifications in these categories are marked read and the rest stay unread. Leave it out to mark every unread notification.</ParamField>

## Response

Returns `{ "data": { "updated": 12 } }`, the number of notifications that were unread.

<RequestExample>
```bash cURL
curl -X POST "https://api.foxreach.io/api/v1/notifications/read-all" \
  -H "X-API-Key: otr_your_key"

# only one category
curl -X POST "https://api.foxreach.io/api/v1/notifications/read-all?category=billing" \
  -H "X-API-Key: otr_your_key"
```

```python Python SDK (beta)
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
result = client.notifications.mark_all_read()
billing_only = client.notifications.mark_all_read(category="billing")
```

```typescript TypeScript SDK (beta)
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
const result = await client.notifications.markAllRead();
const billingOnly = await client.notifications.markAllRead({ category: "billing" });
```

</RequestExample>

<ResponseExample>
```json
{ "data": { "updated": 12 } }
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `write` |
| `422` | `category` has a value that is not one of the six |

## Rate Limit

- **120 requests per minute, shared by every `write` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`write`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns, see [Rate Limiting](/rate-limiting).
