---
title: "Enable a directory for a group"
method: POST
path: "/v1/groups/{group_id}/directories"
tags: ["Groups"]
---

# Enable a directory for a group

`POST /v1/groups/{group_id}/directories`

## Request

- Base URL: `https://api.capacity.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.capacity.com/v1/groups/{group_id}/directories`
- Auth: one of:
  - API key in header `x-capacity-id`
  - HTTP bearer

Enable a directory for a group. Returns a status code of 404 if group or directory does not exist. Returns a status code of 400 if the directory is already enabled for the group.

## Path parameters

- `group_id` string, required

## Request body

- object
  - `directory_id` string, required: ID of a directory not yet enabled for the group

## Response `200`

The newly enabled directory

- object
  - `body` object: Json body data in the request
  - `parameters` object: Query parameters in the request
  - `result` DirectoryGetSchema[]
    - `id` string: ID of the directory
    - `name` string: Name of the directory

## Other responses

- `400`: The request contains malformed data or violates data integrity
- `404`: The requested resource could not be found

---

[API](https://skmtc.dev/capacity/apis/capacity-api-docs.md) - [All operations](https://skmtc.dev/capacity/apis/capacity-api-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/capacity/apis/capacity-api-docs/revisions/74c85bb61004?raw)
