# How can i rename a group with the help of discourse api?

**URL:** https://meta.discourse.org/t/how-can-i-rename-a-group-with-the-help-of-discourse-api/101030
**Category:** Support
**Created:** [1 בנובמבר,‏ 2018,‏ 5:37am UTC](https://meta.discourse.org/t/how-can-i-rename-a-group-with-the-help-of-discourse-api/101030 "2018-11-01T05:37:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Siddhu\_Dhangar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/siddhu_dhangar/32/123849_2.png) [@Siddhu\_Dhangar](https://meta.discourse.org/u/Siddhu_Dhangar)
#### Post date: [1 בנובמבר,‏ 2018,‏ 5:37am UTC](https://meta.discourse.org/t/how-can-i-rename-a-group-with-the-help-of-discourse-api/101030/1 "2018-11-01T05:37:35Z")

</div>

I have referred following url,

> **[Discourse API Docs](https://docs.discourse.org/#tag/Groups%2Fpaths%2F~1groups~1%7Bname%7D.json%2Fput)**

With the help of above url, i can update a group title but i want to rename a group.  
So there is any way to rename a group using discourse api.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1 בנובמבר,‏ 2018,‏ 12:03pm UTC](https://meta.discourse.org/t/how-can-i-rename-a-group-with-the-help-of-discourse-api/101030/2 "2018-11-01T12:03:08Z")

</div>

See [Reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576)

---

<div class="post-metadata">

### Author: ![Siddhu\_Dhangar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/siddhu_dhangar/32/123849_2.png) [@Siddhu\_Dhangar](https://meta.discourse.org/u/Siddhu_Dhangar)
#### Post date: [5 בנובמבר,‏ 2018,‏ 8:51am UTC](https://meta.discourse.org/t/how-can-i-rename-a-group-with-the-help-of-discourse-api/101030/3 "2018-11-05T08:51:51Z")

</div>

I did some reverse engineering, by following below steps now i can rename a group.

GET /groups/{name}.json  
Firstly i get group info with the help of name  
e.g GET /groups/staff.json

Then I have a group id which i already fetched using above method. Replaced below id to actual group id.  
PUT /groups/{id}.json  
e.g PUT /groups/12.json and includes a group name in your PUT request.

Now it is working. Thanks.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [5 בדצמבר,‏ 2018,‏ 8:52am UTC](https://meta.discourse.org/t/how-can-i-rename-a-group-with-the-help-of-discourse-api/101030/4 "2018-12-05T08:52:01Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
