Resource
Document folder
The per-record folder trees that documents are filed in — one tree for each owning company, person or project. Create, list, rename and move folders, download a folder's documents as a zip bundle, and delete a folder and its subtree behind an acknowledged cascade.
The endpoint reference below is kept in English in both language trees. It mirrors the API contract verbatim and there is no generator to rebuild it from, so a translated copy would drift from the API the first time an endpoint changes.
Folders nest. Every folder belongs to exactly one owning record — a company, a person or a project — and sits either at that owner's top level or under another of that owner's folders. The list endpoint returns the whole tree flat, parents before children, and each node carries both its parentId and its slash-joined path: Invoices/2026 is how a folder is addressed in output, while requests always address it by its masked id.
A move re-parents a folder together with everything beneath it, and a delete takes the whole subtree — one call each, not one call per level. The documents filed in these folders, and the placements that put them there, are documented under Document; a folder rename or reparent is recorded on the feed under Document changes.
Endpoints
Six endpoints, in the order they are documented below.
- POST
/document/folder— Create a document folder - GET
/document/folder— List an owning entity's document folders - PUT
/document/folder/{folderId}— Rename a document folder - PUT
/document/folder/{folderId}/move— Move a document folder under a new parent - GET
/document/folder/{folderId}/content— Download a folder's documents as a zip bundle - DELETE
/document/folder/{folderId}— Delete a document folder and its subtree
Every endpoint on this page can additionally answer the shared errors — 401, 403, 404 (unknown instance) and 500. They are documented once, under Errors and troubleshooting.
Create a document folder
POST /{instanceName}/api/v1/{locale}/document/folder
Creates a folder on the owning entity. Omit parentFolderId to create at top level. Duplicate sibling names are permitted, matching the platform. 201 with a Location header.
Request body
application/json → DocumentFolderCreateDto
Responses
| Status | Description |
|---|---|
| 201 | Folder created. DocumentFolderNodeDto · application/json |
| 400 | Blank name, unrecognised entityType, or the id is not a valid id. |
| 404 | No folder with the given parentFolderId. |
| 422 | The owning entity does not exist, or the parent folder belongs to another entity. |
Example
curl -X POST "https://api.visena.example/acme/api/v1/en/document/folder" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"entityType": "Company",
"entityId": "bQ4wR8",
"name": "Contracts"
}'
List an owning entity's document folders
GET /{instanceName}/api/v1/{locale}/document/folder
Returns the owner's folder tree as a flat list ordered so a parent always precedes its children, which is all a caller needs to rebuild the tree from parentId. A top-level folder reports parentId: null; the internal system folder is never included. An owner that has no folders yet answers an empty list — the read never creates one.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
entityType required |
query | string, one of Company Person Project |
Owning entity type. |
entityId required |
query | string |
Masked id of the owning record. |
Responses
| Status | Description |
|---|---|
| 200 | The owner's folders, parents before children. array of DocumentFolderNodeDto · application/json |
| 400 | Unrecognised entityType, or the id is not a valid id. |
| 422 | The referenced entityId does not exist for the given entityType. |
Example
curl "https://api.visena.example/acme/api/v1/en/document/folder?entityType=Company&entityId=bQ4wR8" \
-H "Authorization: Bearer $TOKEN"
Rename a document folder
PUT /{instanceName}/api/v1/{locale}/document/folder/{folderId}
Renames the folder. The owning entity's internal system folder cannot be renamed.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
folderId required |
path | string |
Masked folder id. |
entityType required |
query | string, one of Company Person Project |
Owning entity type. |
entityId required |
query | string |
Masked id of the owning record. |
Request body
application/json → DocumentFolderRenameDto
Responses
| Status | Description |
|---|---|
| 200 | The renamed folder. DocumentFolderNodeDto · application/json |
| 400 | Blank name, or the id is not a valid id. |
| 404 | No folder with that id. |
| 422 | The folder is the owner's internal system folder. |
Example
curl -X PUT "https://api.visena.example/acme/api/v1/en/document/folder/fR5sK1" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Contracts 2026"
}'
Move a document folder under a new parent
PUT /{instanceName}/api/v1/{locale}/document/folder/{folderId}/move
Re-parents the folder. A null destinationFolderId moves it to top level. Source and destination must belong to the same owning entity, and a folder cannot be moved into itself or into one of its own descendants — that is rejected with 409 rather than silently ignored.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
folderId required |
path | string |
Masked folder id. |
entityType required |
query | string, one of Company Person Project |
Owning entity type. |
entityId required |
query | string |
Masked id of the owning record. |
Request body
application/json → DocumentFolderMoveDto
Responses
| Status | Description |
|---|---|
| 204 | Folder moved. |
| 400 | An id is not a valid id. |
| 404 | No folder with that id, or no destination folder with that id. |
| 409 | The destination is the folder itself or one of its descendants. |
| 422 | The folder is the owner's internal system folder, or the destination belongs to another entity. |
Example
curl -X PUT "https://api.visena.example/acme/api/v1/en/document/folder/fR5sK1/move" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"destinationFolderId": "fR5sK1"
}'
Download a folder's documents as a zip bundle
GET /{instanceName}/api/v1/{locale}/document/folder/{folderId}/content
Streams the folder's documents as a single zip, reproducing the folder structure so an unpacked bundle mirrors the tree. The owning entity's internal system folder cannot be bundled, and a tree deeper than 32 levels or holding more than 5000 documents is refused with 413 before any bytes are streamed. recursive defaults to true (the whole subtree); pass false for the folder's own documents only. Which was served is stated in the Content-Disposition file name.
Authorization is per folder, by the declared owning entity: the folder must belong to entityType/entityId, and the bundle then contains every document placed in it. It is not filtered document by document, so a bundle is all-or-nothing rather than a partial result. Two documents resolving to the same entry name are both included under distinct names, and same-named sibling folders are kept apart — nothing is silently dropped or merged. Empty folders appear as directory entries.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
folderId required |
path | string |
Masked folder id. |
entityType required |
query | string, one of Company Person Project |
Owning entity type. |
entityId required |
query | string |
Masked id of the owning record. |
recursive |
query | booleandefault true |
Include the whole subtree (default) or only the folder's own documents. |
Responses
| Status | Description |
|---|---|
| 200 | The bundle, streamed.file · application/zip |
| 400 | The id is not a valid id. |
| 404 | No folder with that id. |
Example
curl "https://api.visena.example/acme/api/v1/en/document/folder/fR5sK1/content?recursive=true" \
-H "Authorization: Bearer $TOKEN"
Delete a document folder and its subtree
DELETE /{instanceName}/api/v1/{locale}/document/folder/{folderId}
Deletes the folder, its sub-folders, and the documents placed in them.
This destroys documents, and its effect reaches outside the folder. A document whose primary placement is in the deleted subtree is deleted outright, which also removes every shortcut placement of it — including placements under other owning entities. Only a shortcut placement inside the subtree is removed on its own, leaving the document intact elsewhere.
Because of that, a delete whose extent is not placement-only answers 409 whose detail states how many documents would be destroyed and how many shortcut placements would go with them, and nothing is deleted. Re-send with acknowledgeCascade=true to proceed. A folder whose subtree holds nothing, or only shortcut placements, deletes straight away. The owning entity's internal system folder cannot be deleted.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
folderId required |
path | string |
Masked folder id. |
entityType required |
query | string, one of Company Person Project |
Owning entity type. |
entityId required |
query | string |
Masked id of the owning record. |
acknowledgeCascade |
query | booleandefault false |
Confirm a delete whose extent goes beyond the targeted placement; see the endpoint description. |
Responses
| Status | Description |
|---|---|
| 204 | Folder, subtree and contained documents deleted. |
| 400 | The id is not a valid id. |
| 404 | No folder with that id. |
| 409 | The delete would destroy documents; detail states the extent. Nothing was deleted. |
| 422 | The folder is the owner's internal system folder. |
Example
curl -X DELETE "https://api.visena.example/acme/api/v1/en/document/folder/fR5sK1" \
-H "Authorization: Bearer $TOKEN"
Object shapes
The request and response bodies used above, in the order they are first referenced.
DocumentFolderCreateDto
| Field | Type | Description |
|---|---|---|
entityType required |
string |
Owning entity type: Company, Person or Project. |
entityId required |
string (masked id) |
|
name required |
string |
Folder name. Must not be blank; duplicate sibling names are allowed. |
parentFolderId |
string (masked id) |
DocumentFolderNodeDto
| Field | Type | Description |
|---|---|---|
id |
string (masked id) |
|
name |
string |
Folder name as displayed. |
parentId |
string (masked id) |
|
path |
string |
Slash-joined folder path including this folder's own name, e.g. Invoices/2026. |
actedBy |
string (masked id) |
DocumentFolderRenameDto
| Field | Type | Description |
|---|---|---|
name required |
string |
New folder name. Must not be blank. |
DocumentFolderMoveDto
| Field | Type | Description |
|---|---|---|
destinationFolderId |
string (masked id) |