---
title: "Set collection resource group"
method: POST
path: "/api/collections/{namespace}/{slug}-{id}/resource-group"
tags: ["collections"]
---

# Set collection resource group

`POST /api/collections/{namespace}/{slug}-{id}/resource-group`

Assign, move, or unassign an organization-owned collection to a resource group. Pass null to unassign. User-owned collections are not eligible.

## Path parameters

- `namespace` string, required
- `slug` string, required
- `id` string, required

## Request body

- object
  - `resourceGroupId` string, nullable, required — The resource group to assign the collection to. If null, the collection is removed from any resource group.

## Response `200`

Minimal information about the collection after the assignment

- object
  - `id` string, required
  - `slug` string, required
  - `title` string, required
  - `private` boolean, required
  - `addedBy` string, required

---

[API](https://skmtc.net/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.net/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/hub-api-endpoints/versions/2713a59ee753/schema)
