Skip to main content

Create Folder

POST/apiv2/pub/foldersdocuments_write

Creates a new folder. Access is granted to all of the token user's groups.

Request

Content-Type: application/json

FieldTypeRequiredDefaultDescription
namestringRequiredFolder display name.
parent_idintegerOptional0Parent folder ID. 0 = root level.

Response

200 OK — The created folder.


Errors

StatusReason
401Invalid or expired token
403Token lacks documents_write scope
422Missing or invalid name

cURL

curl -i -X POST "https://portal.docwize.com/apiv2/pub/folders" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"name":"Q1 Reports","parent_id":10}'

{
"folder_id": 55,
"name": "Q1 Reports",
"full_path": "Finance->Q1 Reports",
"parent_id": 10,
"code": "c4d5e6f7-...",
"child_count": 0
}
{"detail": "Missing or invalid name"}