# Changing Category Permissions via API

**URL:** <https://meta.discourse.org/t/changing-category-permissions-via-api/42735>\
**Category:** Product Support\
**Created:** [18 Aprile 2016, 5:04pm UTC](https://meta.discourse.org/t/changing-category-permissions-via-api/42735 "2016-04-18T17:04:43Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)\
**Post date:** [18 Aprile 2016, 7:34pm UTC](https://meta.discourse.org/t/changing-category-permissions-via-api/42735/8 "2016-04-18T19:34:46Z")

</div>

Personally I always:

1. get the existing properties for the category from Discourse first
2. reduce the result properties down to a known whitelist of properties
3. add the permissions
4. then make the `PUT` request

It might be that one or more of the of the properties is required.

The category permissions editor built into Discourse follows a similar process, however it knows exactly what should be sent back without needing a whitelist.

Filtering by a whitelist could be risky if other properties are added (by a new version of Discourse, a plugin, or custom fields), I haven’t checked the Discourse code to see if it removes the property if not set.

---

_[View the full topic](https://meta.discourse.org/t/changing-category-permissions-via-api/42735)._
