Skip to main content
Version: v3

Filen API

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):

{
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 millseconds if Math.abs(millisecondsNow - timestamp) < Math.abs(millisecondsNow - timestamp * 1000), otherwise it is in seconds. Please refer the the official TypeScript SDK when to use timestamps in seconds or milliseconds.

Undocumented endpoints

There are a number of endpoints whose specifics are not documented here. If you need them, you can infer their definitions and usage from the TypeScript SDK's API wrappings.

  • user-related:
    • /user/avatar (upload an avatar)
    • /user/affiliate/payout (request an affiliate payout)
    • /user/loginAlerts (enable/disable login alerts)
    • /confirmation/send (resend a confirmation email)
    • /user/gdpr (get user's GDPR information)
    • /user/delete (delete account)
    • /user/delete/all (delete all files and directories)
    • /user/didExportMasterKeys (mark master keys as exported)
    • /user/lock (acquire a lock for a resource, which last 60 seconds)
    • /user/invoice (generate invoice)
    • /user/pushToken (assign a push token)
    • /user/lastActive/desktop (update last active timestamp for desktop)
    • subscriptions:
      • /user/sub/create (create a subscription checkout URL)
      • /user/sub/cancel (cancel a subscription)
    • password:
      • /user/password/forgot (send a password recovery email)
      • /user/password/forgot/reset (reset password using previously generated token)
      • /user/2fa/enable (enable two-factor authentication)
      • /user/2fa/disable (disable two-factor authentication)
    • account info:
      • /user/personal/update (update personal info)
      • /user/settings (get user's settings)
      • /user/info (get user's info)
      • /user/settings/email/change (change email)
      • /user/settings/password/change (change password)
      • /user/account (get account data)
      • /user/profile (get user profile)
      • /user/nickname (update nickname)
      • /user/appearOffline (update appear offline)
  • file versioning:
    • /user/versioning (enable/disable versioning)
    • /user/delete/versions (delete all file versions)
    • /file/version/restore (restore a file version)
    • /file/versions (get all versions of a file)
  • chat:
    • /chat/messages (get chat messaegs)
    • /chat/send (send chat message)
    • /chat/typing (send typing events)
    • /chat/edit (edit chat message)
    • /chat/message/embed/disable (disable message embed)
    • /chat/delete (delete chat message)
    • /chat/unread (get count of unread messages)
    • /chat/read (mark messages as read)
    • /chat/mute (mute/unmute chat)
    • /chat/lastFocus (get/update last focused timestamp of conversations)
    • conversations:
      • /chat/conversations (get conversations)
      • /chat/conversations/unread (get cound of unread messages)
      • /chat/conversations/read (mark messages as read)
      • /chat/conversations/create (create conversation)
      • /chat/conversations/name/edit (edit conversation name)
      • /chat/conversations/participants/add (add conversation participant)
      • /chat/conversations/participants/remove (remove conversation participant)
      • /chat/conversations/online (get online users in conversation)
      • /chat/conversations/leave (leave conversation)
      • /chat/conversations/delete (delete conversation)
  • notes:
    • /notes (get all notes)
    • /notes/create (create note)
    • /notes/content (get note content)
    • /notes/content/edit (edit note content)
    • /notes/type/change (change note type)
    • /notes/title/edit (edit note title)
    • /notes/delete (delete note permanently)
    • /notes/trash (trash note)
    • /notes/archive (archive note)
    • /notes/restore (restore note)
    • /notes/history (get note history)
    • /notes/history/restore (restore note from history)
    • participants:
      • /notes/participants/add (add note participant)
      • /notes/participants/remove (remove note participant)
      • /notes/participants/permissions (change participant permissions)
    • pinned/favorited/tagged:
      • /notes/pinned (pin/unpin note)
      • /notes/favorited (favorite/unfavorite note)
      • /notes/tags (get all tags)
      • /notes/tags/create (create tag)
      • /notes/tags/rename (rename tag)
      • /notes/tags/delete (delete tag)
      • /notes/tag/favorite (favorite tag)
      • /notes/tag (tag a note)
      • /notes/untag (untag a note)
  • contacts
    • /contacts (get all contacts)
    • /contacts/delete (delete contact)
    • requests:
      • /contacts/requests/in (get incoming contact requests)
      • /contacts/requests/in/count (get count of incoming contact requests)
      • /contacts/requests/out (get outgoing contact requests)
      • /contacts/requests/out/delete (delete outgoing contact request)
      • /contacts/requests/send (send contact request)
      • /contacts/requests/accept (accept contact request)
      • /contacts/requests/deny (deny contact request)
    • blocked:
      • /contacts/blocked (get blocked contacts)
      • /contacts/blocked/delete (unblock contact)
      • /contacts/blocked/add (block contact)
  • realtime events:
    • /user/events (get user events)
    • /user/event (get event info)
    • -> 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)