# Correct method for updating category group permission level via API

**URL:** https://meta.discourse.org/t/correct-method-for-updating-category-group-permission-level-via-api/108984
**Category:** Development
**Created:** [February 12, 2019, 9:06pm UTC](https://meta.discourse.org/t/correct-method-for-updating-category-group-permission-level-via-api/108984 "2019-02-12T21:06:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![plosprawrs](https://avatars.discourse-cdn.com/v4/letter/p/5daacb/32.png) [@plosprawrs](https://meta.discourse.org/u/plosprawrs)
#### Post date: [February 12, 2019, 9:06pm UTC](https://meta.discourse.org/t/correct-method-for-updating-category-group-permission-level-via-api/108984/1 "2019-02-12T21:06:50Z")

</div>

Hello,

1. We are creating a group via API, for instance, SAMPLE-CATEGORY-001
2. We are creating a category via API, category SAMPLE-CATEGORY-001
3. We are trying to make the category tied to the group permission upon creation

When referencing:

> **[Discourse API Docs](https://docs.discourse.org/#tag/Categories)**

I see "“group\_permissions” array declared, and the permissions param which seems to be null on all my live categories.

` "http://ourwebsite.com/categories/70?api_key= ****&api_username=***** &name=SAMPLE-CATEGORY-001&color=fff&text_color=295288&group_permissions={"permission_type": 1, "group_name": "SAMPLE-CATEGORY-001"}"1, "group_name": "SAMPLE-CATEGORY-001"}"`

What is the correct syntax to update the category with the group permissions?

Any help would be appreciated, as we are trying to create an automatic process for our users.

Regards

---

<div class="post-metadata">

### Author: ![plosprawrs](https://avatars.discourse-cdn.com/v4/letter/p/5daacb/32.png) [@plosprawrs](https://meta.discourse.org/u/plosprawrs)
#### Post date: [February 14, 2019, 5:17pm UTC](https://meta.discourse.org/t/correct-method-for-updating-category-group-permission-level-via-api/108984/2 "2019-02-14T17:17:01Z")

</div>

Hello,

any devs with the answer PM me, I’m looking to hire some part-time dev work for specific items purely related to discourse development.

regards

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [March 1, 2019, 10:24am UTC](https://meta.discourse.org/t/correct-method-for-updating-category-group-permission-level-via-api/108984/3 "2019-03-01T10:24:34Z")

</div>

Do the same thing in Discourse and look at your browser’s console network tab to see how the request is made.

> [@Reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576):
>
> Discourse is backed by a complete JSON api. Anything you can do on the site you can also do using the JSON api. The API is documented at [docs.discourse.org](https://docs.discourse.org). You can also use the [discourse\_api](https://github.com/discourse/discourse_api) Ruby gem as a client library. However, not every endpoint is documented. To determine how to do something with the JSON API here are some steps you can follow. Example: recategorize a topic. Go to a topic and start editing a category: Open Chrome dev tools, switch to the Network tab, select …
