# Unsubscribing a user from all emails via an API call?

**URL:** <https://meta.discourse.org/t/unsubscribing-a-user-from-all-emails-via-an-api-call/133319>\
**Category:** Product Support\
**Created:** [13 november 2019 om 18:32 UTC](https://meta.discourse.org/t/unsubscribing-a-user-from-all-emails-via-an-api-call/133319 "2019-11-13T18:32:27Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [23 september 2020 om 17:41 UTC](https://meta.discourse.org/t/unsubscribing-a-user-from-all-emails-via-an-api-call/133319/6 "2020-09-23T17:41:27Z")

</div>

Note that the method of passing `api_key` and `api_username` via query parameters is now deprecated, you should use `Api-Key` and `Api-Username` headers [nowadays](https://meta.discourse.org/t/discourse-api-documentation/22706/266).

---

_[View the full topic](https://meta.discourse.org/t/unsubscribing-a-user-from-all-emails-via-an-api-call/133319)._
