# List an organisation's folder rules

> Page: https://docs.plotwork.dev/api/get-orgs-org-folder-rules. Index of every page: https://docs.plotwork.dev/llms.txt

Each restricted folder with the roles and the people let in.

`GET /orgs/{org}/folder-rules`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | List an organisation's folder rules. |
| What does it take? | `org` in the path. |
| What does it return? | Status 200 with a body of type [`FolderRuleList`](https://docs.plotwork.dev/api/schemas.md#folderrulelist). |
| What can go wrong? | `401` not signed in; `403` the caller's role may not read the rules (orgs.forbidden); `404` no such organisation, or the caller is not a member of it; `429` too many requests; `503` organisations are not set up on this server. Every failure uses the one error envelope. |

## What it does

Each restricted folder with the roles and the people let in. The owner and the admins may read them. A rule covers the folder and every folder inside it, and the nearest rule wins.

## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `org` | `string` | yes | The organisation's id or its slug. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | The rules. | [`FolderRuleList`](https://docs.plotwork.dev/api/schemas.md#folderrulelist) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 403 | The caller's role may not read the rules (orgs.forbidden). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | No such organisation, or the caller is not a member of it. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | Organisations are not set up on this server. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

A 200 answer has the type [`FolderRuleList`](https://docs.plotwork.dev/api/schemas.md#folderrulelist).

| Field | Type | Required | Description |
|---|---|---|---|
| `items` | `FolderRule[]` | yes | By folder, at most 50. |
| `items[].folder` | `string` | yes | The restricted folder, in the form diagrams carry in their `folder`. |
| `items[].roles` | `("admin" \| "member" \| "reader" \| "key")[]` | yes | The roles let in, apart from the owner, who is always allowed: `admin`, `member`, `reader`, and `key` for the organisation's own API keys. |
| `items[].users` | `FolderRuleUser[]` | yes | The people let in by name, whatever their role. |
| `items[].users[].userId` | `string` | yes | The member's account id. |
| `items[].users[].email` | `string` | yes | The member's address, as the member list shows it. |
| `items[].createdAt` | `integer` | yes | Milliseconds since the epoch. When the rule as it now stands was set; replacing a rule sets it again. |

## See also

| Doc | Why |
|---|---|
| [API reference](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
