Skip to content
Connect an agent

Organisations

Make a folder

Makes a folder and every folder above it, so it shows before anything is filed in it.

POST/orgs/{org}/folders

TL;DR

QuestionAnswer
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

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Request body

The body has the type CreateFolderBody.

FieldTypeRequiredDescription
pathstringyesFolder 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

StatusMeaningBody
204The folder is there.none
400The path breaks the folder rule (validation.failed; details says why).ErrorResponse
401Not signed in.ErrorResponse
403The 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
404No such organisation, or the caller is not a member of it.ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools