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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Required | — | Folder display name. |
parent_id | integer | Optional | 0 | Parent folder ID. 0 = root level. |
Response
200 OK — The created folder.
Errors
| Status | Reason |
|---|---|
| 401 | Invalid or expired token |
| 403 | Token lacks documents_write scope |
| 422 | Missing 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
}