Filen Items: Directories API
The Items: Directories API from Filen — 15 operation(s) for items: directories.
The Items: Directories API from Filen — 15 operation(s) for items: directories.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/filen:filen-items-directories-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: 'Filen Items: Directories API'
description: 'The Filen API is used by Filen clients for uploading and downloading files, managing files and directories, sharing items, accessing notes and contacts, having chat conversations, managing user-specific settings, and more.
If you need a more in depth documentation, please refer to our generated OpenAPI specs.
### API hosts
The Filen API is located at `gateway.filen.io`.
For file transfers, there''s `ingest.filen.io` and `egest.filen.io`. `ingest.filen.io` is used for uploads while `egest.filen.io` is used for downloads.
### API responses
All API responses follow the schema (TypeScript type definition):
```ts
{
status: boolean, // indicates whether the request was successful
message: string, // additional information
code: string, // a status code
data: any? // optionally, response data
}
```
### Format of timestamps
Some endpoints (where noted) provide timestamps that are *either in milliseconds or in seconds*. To handle them correctly, a calculation like this might be helpful: A timestamp is in milliseconds if `Math.abs(millisecondsNow - timestamp) for a full description of the realtime events API, see the SDK''s implementations
- `/versions` (get current client versions)
- `/mobile/offline/files` (get offline files info)'
version: v3
servers:
- url: https://gateway.filen.io/v3
tags:
- name: 'Items: Directories'
paths:
/dir:
post:
tags:
- 'Items: Directories'
summary: Get directory info
description: Returns information about a directory.
requestBody:
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
description: the desired directory's UUID
example: (directory UUID)
required: true
security:
- api_key: []
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/response'
- type: object
properties:
uuid:
type: string
description: the directory's UUID
example: (directory UUID)
nameEncrypted:
type: string
description: the directory's name (metadata-encrypted)
example: (directory name, metadata-encrypted)
nameHashed:
type: string
description: the hex-encoded SHA-512 hash of the directory's name
example: (SHA-512 hash of directory name, hex-encoded)
parent:
type: string
description: the parente directory's UUID
example: (parent directory UUID)
trash:
type: boolean
description: whether this directory is in trash
example: (whether the directory is trashed)
favorited:
type: boolean
description: whether this directory is favorited
example: (whether the directory is favorited)
color:
type: string
description: the directory's assigned color (as hex code `#000000` or valid CSS value), or `null` if none is set
example: (directory color, or null)
operationId: postDir
x-operation-id-source: derived
/dir/content:
post:
tags:
- 'Items: Directories'
summary: Get directory content
description: Returns information about the files and directories inside a directory.
requestBody:
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
description: the directory's uuid, or `"favorites"`, `"recents"`, `"links"`, `"trash"` for special directories
example: ('favorites', 'recents', 'links', 'trash', or directory uuid)
foldersOnly:
type: boolean
description: whether only directories should be returned (optional; defaults to `false`)
example: (whether to only return directories, default = false)
required: true
security:
- api_key: []
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/response'
- type: object
properties:
data:
type: object
properties:
uploads:
type: array
description: the files inside this directory
items:
type: object
properties:
uuid:
type: string
description: the file's UUID
example: (file uuid)
metadata:
type: string
description: "the file's metadata (metadata-encrypted) following the schema (TypeScript type definition):\n```ts\n{\n name: string, // the file name\n size: number, // the file size in bytes\n mime: string, // the file's MIME type\n key: string, // the key used to encrypt the file chunks\n lastModified: number, // the file's modification time in milliseconds\n creation: number, // the file's creation time in milliseconds\n}\n```"
rm:
type: string
description: (#todo)
timestamp:
type: integer
description: (#todo)
chunks:
type: integer
description: the number of chunks this file is split into
example: (number of chunks)
size:
type: integer
description: the file's size in bytes (#todo)
bucket:
type: string
description: the storage bucket this file is stored in (needed for downloading it)
example: (storage bucket)
region:
type: string
description: the storage region this file is stored in (needed for downloading it)
example: (storage region)
parent:
type: string
description: the parent directory's UUID
example: (parent directory UUID)
version:
type: integer
description: the file encryption version, currently `1` or `2`
example: (file encryption version)
favorited:
type: integer
description: whether this file is favorited, expressed as `1` or `0`
example: (whether this file is favorited, as 1 or 0)
folders:
type: array
description: the directories inside this directory
items:
type: object
properties:
uuid:
type: string
name:
type: string
parent:
type: string
color:
type: string
timestamp:
type: integer
is_sync:
type: integer
is_default:
type: integer
operationId: postDirContent
x-operation-id-source: derived
/dir/download:
post:
summary: Get directory tree
tags:
- 'Items: Directories'
description: Retrieve complete folder tree (flattened)
requestBody:
description: Body JSON
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
example: uuidv4
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: boolean
message:
type: string
example: string
code:
type: string
example: string
data:
type: object
properties:
files:
type: string
example: array
folders:
type: string
example: array
xml:
name: main
x-codegen-request-body-name: body
operationId: postDirDownload
x-operation-id-source: derived
/dir/tree:
post:
summary: Get flattened directory tree
tags:
- 'Items: Directories'
description: Get a complete directory tree (meant for syncing, flattened)
requestBody:
description: Body JSON
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
example: uuidv4
deviceId:
type: string
example: uuidv4
skipCache:
type: string
example: 0 | 1
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: boolean
message:
type: string
example: string
code:
type: string
example: string
data:
type: object
properties:
folders:
type: string
example: array
files:
type: string
example: array
xml:
name: main
x-codegen-request-body-name: body
operationId: postDirTree
x-operation-id-source: derived
/dir/create:
post:
summary: Create directory
tags:
- 'Items: Directories'
description: Create a folder
requestBody:
description: Body JSON
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
example: uuidv4
name:
type: string
example: encrypted string
nameHashed:
type: string
example: string
parent:
type: string
example: uuidv4
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: boolean
message:
type: string
example: string
code:
type: string
example: string
data:
type: object
properties:
uuid:
type: string
example: uuidv4
xml:
name: main
x-codegen-request-body-name: body
operationId: postDirCreate
x-operation-id-source: derived
/dir/present:
post:
summary: Check if directory exists
tags:
- 'Items: Directories'
description: Check if a directory exists
requestBody:
description: Body JSON
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
example: uuidv4
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: boolean
message:
type: string
example: string
code:
type: string
example: string
data:
type: object
properties:
present:
type: string
example: boolean
trash:
type: string
example: boolean | undefined
xml:
name: main
x-codegen-request-body-name: body
operationId: postDirPresent
x-operation-id-source: derived
/dir/exists:
post:
summary: Check if directory exists by name
tags:
- 'Items: Directories'
description: Check if a directory exists inside a parent with a given name
requestBody:
description: Body JSON
content:
application/json:
schema:
type: object
properties:
parent:
type: string
example: uuidv4
nameHashed:
type: string
example: string
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: boolean
message:
type: string
example: string
code:
type: string
example: string
data:
type: object
properties:
exists:
type: string
example: boolean
uuid:
type: string
example: string?
xml:
name: main
x-codegen-request-body-name: body
operationId: postDirExists
x-operation-id-source: derived
/dir/size:
post:
summary: Get directory size
tags:
- 'Items: Directories'
description: Retrieve directory size
requestBody:
description: Body JSON
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
example: uuidv4
sharerId:
type: string
example: number | 0
receiverId:
type: string
example: number | 0
trash:
type: string
example: 0 | 1
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: boolean
message:
type: string
example: string
code:
type: string
example: string
data:
type: object
properties:
size:
type: string
example: number
xml:
name: main
x-codegen-request-body-name: body
operationId: postDirSize
x-operation-id-source: derived
/dir/move:
post:
summary: Move directory
tags:
- 'Items: Directories'
description: Move a directory
requestBody:
description: Body JSON
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
example: uuidv4
to:
type: string
example: uuidv4
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: boolean
message:
type: string
example: string
code:
type: string
example: string
xml:
name: main
x-codegen-request-body-name: body
operationId: postDirMove
x-operation-id-source: derived
/dir/rename:
post:
summary: Rename directory
tags:
- 'Items: Directories'
description: Rename a directory
requestBody:
description: Body JSON
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
example: uuidv4
name:
type: string
example: string
nameHashed:
type: string
example: string
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: boolean
message:
type: string
example: string
code:
type: string
example: string
xml:
name: main
x-codegen-request-body-name: body
operationId: postDirRename
x-operation-id-source: derived
/dir/trash:
post:
summary: Trash directory
tags:
- 'Items: Directories'
description: Move a directory to the trash
requestBody:
description: Body JSON
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
example: uuidv4
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: boolean
message:
type: string
example: string
code:
type: string
example: string
xml:
name: main
x-codegen-request-body-name: body
operationId: postDirTrash
x-operation-id-source: derived
/dir/restore:
post:
summary: Restore directory
tags:
- 'Items: Directories'
description: Restore a directory from the trash
requestBody:
description: Body JSON
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
example: uuidv4
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: boolean
message:
type: string
example: string
code:
type: string
example: string
xml:
name: main
x-codegen-request-body-name: body
operationId: postDirRestore
x-operation-id-source: derived
/dir/delete/permanent:
post:
summary: Delete directory permanently
tags:
- 'Items: Directories'
description: Delete a directory permanently
requestBody:
description: Body JSON
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
example: uuidv4
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: boolean
message:
type: string
example: string
code:
type: string
example: string
xml:
name: main
x-codegen-request-body-name: body
operationId: postDirDeletePermanent
x-operation-id-source: derived
/dir/color:
post:
summary: Change directory color
tags:
- 'Items: Directories'
description: Change folder color
requestBody:
description: Body JSON
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
example: uuidv4
color:
type: string
example: default | blue | green | purple | gray | red
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: boolean
message:
type: string
example: string
code:
type: string
example: string
xml:
name: main
x-codegen-request-body-name: body
operationId: postDirColor
x-operation-id-source: derived
/dir/shared:
post:
summary: Check if directory is shared
tags:
- 'Items: Directories'
description: Check if a folder is shared
requestBody:
description: Body JSON
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
example: uuidv4
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: boolean
message:
type: string
example: string
code:
type: string
example: string
data:
type: object
properties:
sharing:
type: string
example: boolean
users:
type: string
example: '{ email: string, publicKey: string }[]'
xml:
name: main
x-codegen-request-body-name: body
operationId: postDirShared
x-operation-id-source: derived
components:
schemas:
response:
type: object
properties:
status:
type: boolean
message:
type: string
code:
type: string
securitySchemes:
api_key:
type: apiKey
name: API Key
in: header
externalDocs:
description: Get general information about usage of the Filen API at docs.filen.io
url: https://docs.filen.io/docs/api