Organisations
Make a folder
Makes a folder and every folder above it, so it shows before anything is filed in it.
POST
/orgs/{org}/foldersTL;DR
| Question | Answer |
|---|---|
| What does it do? | Make a folder. |
| What does it take? | A JSON body of type CreateFolderBody. |
| What does it return? | Status 204 with no body. |
| What can go wrong? | 400 the path breaks the folder rule (validation.failed; details says why); 401 not signed in; 403 the role may not make folders (orgs.forbidden), a rule keeps the folder from the caller (orgs.folder_restricted), the limit is reached (orgs.folder_limit_reached), or the request came from an origin that may not make changes; 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
Makes a folder and every folder above it, so it shows before anything is filed in it. A folder that is there already answers the same. Owner, admin or member.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
Request body
The body has the type CreateFolderBody.
| Field | Type | Required | Description |
|---|---|---|---|
path | string | yes | Folder names from the outermost in, joined with a slash, such as "Payments/Checkout", with no slash at either end. Folder names may use letters A to Z, numbers, spaces, - and _. No space at either end of a name and never two together. Up to 5 levels and 40 characters a name. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 204 | The folder is there. | none |
| 400 | The path breaks the folder rule (validation.failed; details says why). | ErrorResponse |
| 401 | Not signed in. | ErrorResponse |
| 403 | The role may not make folders (orgs.forbidden), a rule keeps the folder from the caller (orgs.folder_restricted), the limit is reached (orgs.folder_limit_reached), or the request came from an origin that may not make changes. | ErrorResponse |
| 404 | No such organisation, or the caller is not a member of it. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 503 | Organisations are not set up on this server. | ErrorResponse |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |