---
title: "Create resource group"
method: POST
path: "/api/organizations/{name}/resource-groups"
tags: ["resource-groups"]
---

# Create resource group

`POST /api/organizations/{name}/resource-groups`

Create a new resource group in the organization.

Requires the org to have a Team plan or higher.

## Path parameters

- `name` string, required

## Request body

- object
  - `name` string, required
  - `description` string
  - `users` object[]
    - `user` string, required
    - `role` 'admin' | 'write' | 'contributor' | 'read' | 'no_access', required
  - `repos` RepoId[]
    - `name` string, required
    - `type` 'dataset' | 'model' | 'space' | 'bucket' | 'kernel' | 'container', required
  - `autoJoin` union
    - object
      - `enabled` true, required
      - `role` 'admin' | 'write' | 'contributor' | 'read' | 'no_access', required
      - `scope` 'all' | 'read_plus'
    - object
      - `enabled` false, required

## Response `200`

The created resource group

- object
  - `id` string, required — A hex string of 24 characters representing an ObjectId.
  - `name` string, required
  - `description` string, nullable
  - `autoJoin` union
    - object
      - `enabled` true, required
      - `role` 'admin' | 'write' | 'contributor' | 'read' | 'no_access', required
      - `scope` 'all' | 'read_plus'
    - object
      - `enabled` false, required
  - `spendLimits` object
    - `total` integer
    - `inferenceProviders` integer
    - `spaces` integer
    - `jobs` integer
    - `endpoints` integer
  - `users` object[], required
    - `type` 'user', required
    - `_id` string, required — A hex string of 24 characters representing an ObjectId.
    - `fullname` string, required
    - `name` string, required
    - `avatarUrl` string, required
    - `role` 'admin' | 'write' | 'contributor' | 'read' | 'no_access', required
    - `addedBy` string
  - `resources` union[], required
    - union
      - object
        - `type` 'dataset' | 'model' | 'space' | 'bucket' | 'kernel' | 'container', required
        - `name` string, required
        - `addedBy` string
        - `private` boolean, required
      - object
        - `type` 'collection', required
        - `id` string, required — A hex string of 24 characters representing an ObjectId.
        - `slug` string, required
        - `title` string, required
        - `addedBy` string
        - `private` boolean, required
      - object
        - `type` 'blog', required
        - `id` string, required — A hex string of 24 characters representing an ObjectId.
        - `slug` string, required
        - `title` string, required
        - `addedBy` string
        - `private` boolean, required
      - object
        - `type` 'job', required
        - `id` string, required
        - `name` string
        - `addedBy` string
      - object
        - `type` 'scheduled-job', required
        - `id` string, required
        - `name` string
        - `addedBy` string

## Changes

- **2026-09-18** `74f2b0d17636` — 1 warning, 1 info
  - added the new `container` enum value to the `resources/items/oneOf[subschema #1]/type` response property for the response status `200`
  - added the new `container` enum value to the request property `repos/items/type`
- **2026-09-08** `bd17546f47b8` — 7 breaking, 5 info
  - removed `subschema #1, subschema #2` from the `autoJoin` request property `anyOf` list
  - the `repos/items/type` request property type changed from no type to `string`
  - the `users/items/role` request property type changed from no type to `string`
  - the response property `description` became nullable for the status `200`
  - …8 more
- **2026-08-14** `2980c6dae34a` — 1 info
  - added the optional property `spendLimits` to the response with the `200` status
- **2026-08-13** `99cb19038135` — 4 breaking, 10 warning, 12 info
  - removed `subschema #1, subschema #2` from the `autoJoin/anyOf[subschema #1]/role` request property `anyOf` list
  - removed `subschema #1, subschema #2` from the `users/items/role` request property `anyOf` list
  - request property `autoJoin/anyOf[subschema #1]/role` was restricted to a list of enum values
  - request property `users/items/role` was restricted to a list of enum values
  - …22 more
- …earlier changes not shown

[Full history](https://skmtc.dev/huggingface/apis/hub-api-endpoints/changes/api/organizations/:name/resource-groups/post.md)

---

[API](https://skmtc.dev/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.dev/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc.dev/huggingface/apis/hub-api-endpoints/revisions/b88d4a4da99f?raw)
