# mailinglist\_unsubscribe

Source: https://zotonic.com/docs/1796/mailinglist_unsubscribe

URI: https://zotonic.com/id/1796

Language: en



Cancel a mailing list subscription. The recipient id is given with the `id` argument.

The `on_success` argument decides which actions are triggered after unsubscribe is successful; `on_error` actions are triggered when unsubscribe fails.

Both action arguments can be repeated. The `id` is passed to `m_mailinglist:recipient_delete/2`; the resource representing the mailing list is not deleted.

```django
{% button text="Unsubscribe" action={mailinglist_unsubscribe id=q.id on_success={show target="done"} on_error={show target="failed"}} %}
```

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1796?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1796?language=en>)
