Dokumentation
ReferenzDirectories

Create a directory.

POST
/directories

Create a directory. Regular users need edit permission on the parent directory; creating a top-level directory (no parent) requires the tenant manager or administrator role. The new directory inherits the permissions of its parent.

A project directory has no subdirectories and allows none; naming one as parent is refused with 403.

Authorization

apiKey
headerX-API-Key<token>

API key issued in the Galilea settings.

Request Body

application/json
  1. body

Request body for creating a directory.

name*string

Display name of the new directory. Names of siblings must be unique.

Lengthlength <= 100
parent?|

ID of the parent directory. The calling user must have edit permission on it. Omitted or null creates a top-level directory, which requires the tenant manager or administrator role.

Formatuuid

Response Body

The directory was created.

application/json
  1. response

Full representation of a directory, returned after creating one.

id*string

Identifier of the directory.

Formatuuid
name*string

Display name of the directory. Names of siblings are unique.

parentPath*array<>

IDs of the directories on the path from the tree root down to the parent of this directory. The first entry is always a top-level directory; the array is empty for a top-level directory.

children*array<>

IDs of the direct child directories.

documents*array<>

IDs of the documents directly inside this directory.

createdBy?

The user who created this directory.

createdAt*string

Creation timestamp of the directory.

Formatdate-time
lastModifiedAt*string

Last modification timestamp of the directory.

Formatdate-time
userPermissions*array<>

The calling user's permissions on this directory, the same strings the Galilea application works with:

  • directory.view read the directory and the documents in it
  • directory.create_subfolder create directories in it
  • directory.create_document add documents to it, by POST /uploads with this directory
  • directory.rename rename it
  • directory.move move it to another parent
  • directory.delete delete it with everything in it
  • directory.view_permissions read which user groups may reach it
  • directory.set_permissions share it with user groups
  • directory.remove_permissions stop sharing it
userGroups*array<>

User groups with permissions on this directory or one of its ancestors. Empty when the calling user has no edit permission on the directory or the directory is restricted.

displayStyle?string

Display style of the directory: default for normal directories, personal for the personal directory of a user, project for the directory of a project.

Default"default"
Value in"default""personal""project"
curl -X POST "https://example.com/directories" \  -H "Content-Type: application/json" \  -d '{    "name": "Invoices 2026"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "parentPath": [    "7924443e-e7c3-4361-a028-25053af0dbf9"  ],  "children": [    "4feb20ac-04ac-4bd8-9baa-d4924dafff88"  ],  "documents": [    "117f7992-66ce-4ba8-bec7-dc516f479ad2"  ],  "createdBy": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string"  },  "createdAt": "2019-08-24T14:15:22Z",  "lastModifiedAt": "2019-08-24T14:15:22Z",  "userPermissions": [    "directory.view"  ],  "userGroups": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "type": "tenant_all",      "name": "string",      "acronym": "st",      "color": "string",      "emailAddress": "string",      "numberOfMembers": 0,      "tenant": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string"      },      "user": {},      "createdAt": "2019-08-24T14:15:22Z",      "lastModifiedAt": "2019-08-24T14:15:22Z"    }  ],  "displayStyle": "default"}