The harbor0 API
The harbor0 API lets your own scripts, servers and tools work with the files in your harbor0 My Drive. You can list folders, upload and download files, move and rename things, restore earlier versions and empty the trash, all over plain HTTPS and JSON.
Every request goes to one address:
https://api.harbor0.comand every route lives under /v1. Requests are authenticated with a personal access token that you create in the harbor0 web app.
Beta
The harbor0 API is in beta. It is ready to use with your own files, and we will keep it working while it changes:
- Routes, fields and limits may still change before the API is final. This site always describes the API as it is live.
- New fields can appear in responses at any time, so your code should ignore fields it doesn't know.
- The harbor0 API card in Settings, where you create API keys, may not be turned on for every account yet.
Tell us what works and what doesn't at contact@harbor0.com.
What you can do with a token
| Area | What it covers |
|---|---|
| Account | Read your account, storage use and whether end-to-end encryption is on. |
| Browsing | List folders, look items up by name, read metadata, search, measure folder sizes. |
| Managing | Create folders, rename, move, favorite, move to trash, restore, delete for good. |
| Uploads | Upload files of any size in parts, resume uploads, add new versions. |
| Downloads | Download any file or earlier version, or a whole folder as a ZIP. |
| Encryption | Read the wrapped keys of an end-to-end encrypted account so your code can decrypt it. |
A token is limited to My Drive on purpose. Signing in, account settings, sharing, devices and the tokens themselves need the harbor0 apps, so a leaked token can never take over your account. See Authentication for the full list.
End-to-end encrypted accounts
If your account uses end-to-end encryption, the server stores only encrypted file names and encrypted file contents, and it cannot read either. Your code has to do the decrypting (and, for uploads, the encrypting) itself, using your encryption passphrase or recovery key. These guides walk through every step, with complete code in Node.js and Python that has been checked against the harbor0 apps:
- How encryption works: the keys, the format and what the server sees.
- Unlocking the account key: from your passphrase to the keys that open names and files.
- Decrypting file names: turning
h0e1.…names back into real ones. - Decrypting files: the H0E1 file format, chunk by chunk, including range reads.
- Uploading to an encrypted account: encrypting names and files so the apps can read them.
- Complete examples: a small command-line client in each language, plus test vectors.
Where to start
- New to the API? Follow the Quickstart to make your first calls in a couple of minutes.
- Looking for a specific route? The API reference lists every route a token can call, with request and response shapes.
- Prefer a ready-made tool? harbor0 has its own build of rclone, which uses this API and handles encryption for you.