Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
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.
openapi: 3.2.0
info:
title: Filen File Transfers 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.
### 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 scheme (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
}
```
### Internal endpoints
There are a number of internal endpoints whose specifics are not documented here.
If you need them, you can infer their definitions and usage from the TypeScript SDK''s API wrapper.'
version: v3
servers:
- url: https://gateway.filen.io/v3
tags:
- name: File Transfers
paths:
/upload/done:
post:
tags:
- File Transfers
summary: Mark an upload completed
description: Marks an upload as completed. Use this after you've uploaded file chunks to the Ingest API.
requestBody:
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
description: the UUID of the uploaded file
example: (file uuid)
name:
type: string
description: the file name (metadata-encrypted)
example: (file name, metadata-encrypted)
nameHashed:
type: string
description: the hex-encoded SHA-512 hash of the file name
example: (SHA-512 hash of file name, as hex)
size:
type: string
description: the file's total size in bytes (metadata-encrypted)
example: (file size in bytes, metadata-encrypted)
chunks:
type: integer
description: the number of chunks uploaded
example: (number of chunks uploaded)
mime:
type: string
description: the file's MIME type
example: (file MIME type)
rm:
type: string
description: a cryptographically-secure random string of length 32
example: (random string of length 32)
metadata:
type: string
description: "the file's metadata (stringified and 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: string, // the file's creation time in milliseconds\n}\n```"
example: (-> see description)
version:
type: string
description: the file encryption version, currently `2`
example: 2
uploadKey:
type: string
description: a cryptographically-secure random string of length 32, which had been passed along with each file chunk
example: (upload key from chunk uploads)
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
type: boolean
message:
type: string
code:
type: string
data:
type: object
properties:
chunks:
type: number
description: the number of chunks uploaded
example: (number of chunks uploaded)
size:
type: number
description: the file's total size in bytes
example: (file size in bytes)
operationId: postUploadDone
x-operation-id-source: derived
components:
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