# Is there an api to set the primary group for a user

**URL:** <https://meta.discourse.org/t/is-there-an-api-to-set-the-primary-group-for-a-user/309611>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [May 28, 2024, 12:29am UTC](https://meta.discourse.org/t/is-there-an-api-to-set-the-primary-group-for-a-user/309611 "2024-05-28T00:29:24Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Onlyanegg](https://avatars.discourse-cdn.com/v4/letter/o/e8c25b/32.png) [@Onlyanegg](https://meta.discourse.org/u/Onlyanegg)\
**Post date:** [May 28, 2024, 12:29am UTC](https://meta.discourse.org/t/is-there-an-api-to-set-the-primary-group-for-a-user/309611/1 "2024-05-28T00:29:24Z")

</div>

Ideally I’d like to set the primary group when I invite a user to be the group I’m adding in the invite, but I don’t see a way to do that. Is there any way via the api to set the primary group for a user?

Cheers

---

_[View the full topic](https://meta.discourse.org/t/is-there-an-api-to-set-the-primary-group-for-a-user/309611)._
