Mailly文档

Set subscription preferences (unsubscribe or per-scope subscription)

PUT
/preferences

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

Authorization

bearerAuth
headerAuthorizationBearer <token>

Mailly API key(Authorization: Bearer )

Request Body

application/json
  1. body
email?string
scope?string
Value in"workspace""sender""topic"
senderEmail?string

Required when scope=sender

topic?string

Required when scope=topic

subscribed?boolean
source?string
[key: string]?unknown

Response Body

Preferences updated

application/json
  1. response
success*boolean
preference*
[key: string]?unknown
curl -X PUT 'https://api.mailly.site/preferences' \  -H 'Content-Type: application/json' \  -d '{  "property1": null,  "property2": null}'
{  "success": true,  "preference": {    "property1": null,    "property2": null  },  "property1": null,  "property2": null}