# Can't create new group via api (/admin/groups.json - post method)

**URL:** https://meta.discourse.org/t/cant-create-new-group-via-api-admin-groups-json-post-method/309452
**Category:** Development
**Tags:** rest-api
**Created:** [May 26, 2024, 12:41pm UTC](https://meta.discourse.org/t/cant-create-new-group-via-api-admin-groups-json-post-method/309452 "2024-05-26T12:41:28Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [May 26, 2024, 12:59pm UTC](https://meta.discourse.org/t/cant-create-new-group-via-api-admin-groups-json-post-method/309452/2 "2024-05-26T12:59:07Z")

</div>

Hi,

Can you share details on how you create a group?

Did you provide valid `Api-Key` and `Api-Username` headers?

> [@Discourse REST API Documentation](https://meta.discourse.org/t/discourse-rest-api-documentation/22706):
>
> Discourse API Please view the Discourse API Documentation site for detailed info: [https://docs.discourse.org](https://docs.discourse.org)information_source Authentication API requests must use HTTP header based authentication. Pass your Api-Key and Api-Username as HTTP headers. Authentication via query parameters or request body is not supported (this was removed in April 2020). Please see the example cURL request below. The only API endpoints that continue to support credentials in query parameters are requests to…

---

_[View the full topic](https://meta.discourse.org/t/cant-create-new-group-via-api-admin-groups-json-post-method/309452)._
