# Cannot update group owners via Ruby or REST API

**URL:** <https://meta.discourse.org/t/cannot-update-group-owners-via-ruby-or-rest-api/98253>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [28 בספטמבר,‏ 2018,‏ 6:17am UTC](https://meta.discourse.org/t/cannot-update-group-owners-via-ruby-or-rest-api/98253 "2018-09-28T06:17:30Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![typeoneerror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/typeoneerror/32/80817_2.png) [@typeoneerror](https://meta.discourse.org/u/typeoneerror)\
**Post date:** [28 בספטמבר,‏ 2018,‏ 6:17am UTC](https://meta.discourse.org/t/cannot-update-group-owners-via-ruby-or-rest-api/98253/1 "2018-09-28T06:17:30Z")

</div>

The ruby API [shows an option to assign `owner_usernames`](https://github.com/discourse/discourse_api/blob/master/lib/discourse_api/api/groups.rb#L54) on `create_group` and `update_group`. The `create_group` seems to work (and the owner is there after the group is created) but it appears that `owner_usernames` are only assignable on `create` [on the REST side of things](https://github.com/discourse/discourse/blob/master/app/controllers/admin/groups_controller.rb#L45). So we can’t promote a user to an existing group owner without the UI (at least with the Ruby API).

Is this by design or is this worth a PR? Am I correct in assuming the Ruby side of things would need matching methods for `groups#add_owners` and `groups#remove_owner`?

---

_[View the full topic](https://meta.discourse.org/t/cannot-update-group-owners-via-ruby-or-rest-api/98253)._
