Set subscription preferences (unsubscribe or per-scope subscription)
Set subscription preferences (unsubscribe or per-scope subscription) with the Mailly email API for AI agents: PUT /preferences. Parameters, request body, responses and code samples.
Use POST /preferences/resubscribe for workspace-level resubscribes; a workspace-level unsubscribe also marks the matching workflow contacts as suppressed.
bearerAuthAuthorizationBearer <token>Mailly API key(Authorization: Bearer )
application/json- body
email?stringscope?string"workspace""sender""topic"senderEmail?stringRequired when scope=sender
topic?stringRequired when scope=topic
subscribed?booleansource?string[key: string]?unknownPreferences updated
application/json- response
success*booleanpreference*[key: string]?unknowncurl -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}Resubscribe (requires consent evidence) POST
Resubscribe (requires consent evidence) with the Mailly email API for AI agents: POST /preferences/resubscribe. Parameters, request body, responses and code samples.
Suppression list GET
Suppression list with the Mailly email API for AI agents: GET /suppressions. Parameters, request body, responses and code samples.