Folder Endpoints
Complete API reference for folder management endpoints.
Folder endpoints are part of the Admin API tier. All endpoints are under /api/v1/folders and require API key authentication.
POST /folders
Create a new folder.
curl -X POST https://api.tzzl.io/api/v1/folders \
-H "Authorization: Bearer sk_a1b2c3d4..." \
-H "Content-Type: application/json" \
-d '{
"name": "photos",
"space_id": "01HQ..."
}'
Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Folder name |
space_id | string | Yes | Parent space ID |
parent_id | string | No | Parent folder ID (for nesting) |
GET /folders
List folders.
curl "https://api.tzzl.io/api/v1/folders?space_id=SPACE_ID" \
-H "Authorization: Bearer sk_a1b2c3d4..."
GET /folders/:id
Get a single folder.
curl https://api.tzzl.io/api/v1/folders/FOLDER_ID \
-H "Authorization: Bearer sk_a1b2c3d4..."
Response:
{
"data": {
"id": "01HQ...",
"name": "photos",
"path": "photos/",
"space_id": "01HQ...",
"parent_id": null,
"has_children": true,
"access_control": { ... },
"security": { ... }
}
}
PUT /folders/:id
Update a folder.
curl -X PUT https://api.tzzl.io/api/v1/folders/FOLDER_ID \
-H "Authorization: Bearer sk_a1b2c3d4..." \
-H "Content-Type: application/json" \
-d '{ "name": "new-name" }'
DELETE /folders/:id
Delete a folder. The folder must be empty (no files and no subfolders).
curl -X DELETE https://api.tzzl.io/api/v1/folders/FOLDER_ID \
-H "Authorization: Bearer sk_a1b2c3d4..."
PUT /folders/:id/access-control
Update folder access control. Files within the folder inherit these settings.
curl -X PUT https://api.tzzl.io/api/v1/folders/FOLDER_ID/access-control \
-H "Authorization: Bearer sk_a1b2c3d4..." \
-H "Content-Type: application/json" \
-d '{
"access_control": {
"requires_auth": true
}
}'
DELETE /folders/:id/access-control
Reset folder access control to space defaults.
curl -X DELETE https://api.tzzl.io/api/v1/folders/FOLDER_ID/access-control \
-H "Authorization: Bearer sk_a1b2c3d4..."
PUT /folders/:id/security
Update folder security settings.
curl -X PUT https://api.tzzl.io/api/v1/folders/FOLDER_ID/security \
-H "Authorization: Bearer sk_a1b2c3d4..." \
-H "Content-Type: application/json" \
-d '{ "security": { ... } }'
DELETE /folders/:id/security
Reset folder security to defaults.
curl -X DELETE https://api.tzzl.io/api/v1/folders/FOLDER_ID/security \
-H "Authorization: Bearer sk_a1b2c3d4..."