Skip to main content

Create a folder.

POST/api/v1/foldersfolders:write

A new folder takes the parent's grants (not for a top folder) unless security says otherwise (group: your groups; none or user: only you), and always the caller, so it is never visible to nobody. Copying the parent's grants needs View Folder Security; giving users or groups access (by the parent's grants or security group) needs Grant Folder User Access or Grant Folder Group Access. code is the folder's code. A folder with the same name under the same parent is 409 already_exists; batch_create_folders reuses it instead.

Scopefolders:write
AsynchronousNo
MCP toolcreate_folder
Portal permissionscreate_folders

Parameters​

NameInTypeRequiredDescription
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonFolderCreateInput

Responses​

StatusDescriptionBody
201Success.application/json Folder or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409already_exists, conflict, idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

Folder​

FieldTypeRequiredDescription
codestringRequired
folder_idstringRequired
has_childrenbooleanRequiredWhether the folder has child folders the caller can see.
namestringRequired
parent_folder_idstring or nullRequirednull for a root folder
pathstring or nullRequiredCurrent ancestor names joined by ->; null without View Folder Tree or current access to every ancestor.
projectobject or nullRequiredThe project the folder is mapped to; null when none, when the caller cannot see it, or without projects:read and View Projects.

FolderCreateInput​

FieldTypeRequiredDescription
codestring or nullOptionalThe folder's code (the Portal's Code box); a generated unique one when absent.
namestringRequiredThe folder's name.
parent_folder_idstring or nullOptionalThe folder to create it in; null for a top folder.
securitystring: parent, none, user, group or nullOptionalWho the folder is shared with besides you: parent (the default: the users and groups the parent has; a top folder has none to copy), group (your groups), none or user (only you, as the dialog's No security and User security give).