---
title: "Set subscription preferences (unsubscribe or per-scope subscription)"
method: PUT
path: "/preferences"
tags: ["governance"]
---

# Set subscription preferences (unsubscribe or per-scope subscription)

`PUT /preferences`

## Request

- Base URL: `https://api.mailly.site` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mailly.site/preferences`
- Auth: HTTP bearer

Use POST /preferences/resubscribe for workspace-level resubscribes; a workspace-level unsubscribe also marks the matching workflow contacts as suppressed.

## Request body

- object
  - `email` string
  - `scope` 'workspace' | 'sender' | 'topic'
  - `senderEmail` string: Required when scope=sender
  - `topic` string: Required when scope=topic
  - `subscribed` boolean
  - `source` string

## Response `200`

Preferences updated

- object
  - `success` boolean, required
  - `preference` object, required

## Other responses

- `400`: Invalid parameters
- `401`: Missing or invalid API key
- `409`: Use the resubscribe endpoint

---

[API](https://skmtc.dev/mailly/apis/mailly-api.md) · [All operations](https://skmtc.dev/mailly/apis/mailly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mailly/apis/mailly-api/revisions/1ceb29637301?raw)
