Documentation
v1 · 25 November 2026Ruza DriveThe public REST API of Ruza Drive, by Ruza'Gency.
Base URL
Every call starts from this address, over HTTPS only:
https://api.ruzagency.com/drive/v1JSON in UTF-8, RFC 3339 dates in UTC, sizes in bytes, UUID identifiers; root names the root of the drive. A downloaded file is always served as an attachment.
Authentication
Every request carries an API key in the Authorization header:
Authorization: Bearer rza_YOUR_KEYCreate your keys in your Ruza'Gency account, API keys: you choose their permissions and may restrict them to a folder, to IP addresses and to a lifetime. The full key is shown only once; keep it like a password, never in a URL nor in front-end code (key security).
Terms of use
The API is open to every Ruza'Gency account, the Free plan included, within each plan's rate limits. Its use must stay reasonable; in case of abuse, API access may be blocked, keys revoked or the account suspended.
Use of the API is subject to the Ruza'Gency terms, article 46 in particular.
Permissions
Every endpoint requires precise permissions, stated under "Access"; a write permission does not imply reading. The 12 permissions
Rate limits
Per account, per minute and per day by plan; every answer gives X-RateLimit-Remaining. Beyond: 429 and Retry-After. Limits
Errors
An error answers {"error": {"code", "message", "request_id"}}; test code, never the message. Code catalogue
Pagination
Lists return next: pass it back as after for the next page; null marks the last one. limit sets the page size.
Idempotency
POST requests accept Idempotency-Key: a retry with the same value gets the same answer for 24 hours. If-Match guards against concurrent changes (412).
Versions
v1 is stable: only compatible additions. A breaking change will open v2, and v1 will stay served for 12 months at least. Changelog
Quickstart
Guided example: a key, your drive, a file uploaded then shared, step by step (fictive data).
OpenAPI 3.1 contract
The full contract of the endpoints, to generate a client or import it into your tool.
Ruza Drive
Service
State of the service and this contract. No key needed.
Service status
The public state of the Ruza services (incidents, maintenance), as the status page shows it.
Access: public, no key.
Responses
200The current state.
This contract
This OpenAPI 3.1 document.
Access: public, no key.
Responses
200The document.
Ruza Drive
Key and account
The key in use, the account's plan, quota and usage.
The key in use
What the key of the request may do, its restrictions, its expiry and the account's request rates. Any valid key.
Access: any valid key, whatever its permissions.
Responses
200The key.
401Missing, invalid or expired key
429Too many requests
The account
Plan, quota, space used, what the account may do now and the measures in force.
Access: key with the permission drive.account:read (See the plan, the quota and the space used).
Key restricted to a folder: accepted, limited to that folder.
Responses
200The account.
401Missing, invalid or expired key
403The key or the account may not do this
429Too many requests
Space by file type
The live files (current versions, outside the trash) totalled by lower-case extension; "" for names without one.
Access: key with the permission drive.account:read (See the plan, the quota and the space used).
Key restricted to a folder: refused (403 folder_restricted).
Responses
200The totals.
401Missing, invalid or expired key
403The key or the account may not do this
429Too many requests
Space by top-level folder
For each folder at the top of the drive, the files, subfolders and bytes of its whole subtree, keyed by folder ID.
Access: key with the permission drive.account:read (See the plan, the quota and the space used).
Key restricted to a folder: refused (403 folder_restricted).
Responses
200The totals.
401Missing, invalid or expired key
403The key or the account may not do this
429Too many requests
Ruza Drive
Files and folders
Files and folders of the drive.
Find an entry by its path
The live entry at a path from the root of the drive (or of the key's folder), names compared ignoring case and accents, as the application does.
Access: key with the permission drive.files:read (See files and folders).
Key restricted to a folder: accepted, limited to that folder.
Query parameters
Responses
200The entry and its path
400Malformed request
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
429Too many requests
Get an entry
A file or folder with its path from the root. root names the root of the drive (or of the key's folder).
Access: key with the permission drive.files:read (See files and folders).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Responses
200The entry and its path
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
429Too many requests
Rename or move an entry
Give name, parent_id, or both. With If-Match (the entry's revision, its ETag), the change fails with 412 if the entry changed meanwhile.
Access: key with the permission drive.files:write (Add and organise files).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Headers
Body (application/json)
Responses
200The entry, changed
400Malformed request
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
412The resource changed meanwhile
429Too many requests
Move an entry to the trash
The entry, and everything below a folder, goes to the trash, restorable for the time the plan keeps it.
Access: key with the permission drive.files:trash (Move to the trash and restore).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Responses
200The entry
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
429Too many requests
List a folder
The live children of a folder, folders first then by name. Pass next back as after for the next page.
Access: key with the permission drive.files:read (See files and folders).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Query parameters
next of the previous page.100Responses
200A page of entries
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
429Too many requests
Create a folder
A new folder in parent_id (a folder ID or root). 409 name_conflict if the name is taken, with the existing entry's ID.
Access: key with the permission drive.files:write (Add and organise files).
Key restricted to a folder: accepted, limited to that folder.
Headers
Body (application/json)
Responses
201The entry
400Malformed request
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
429Too many requests
Copy a file
A new file in parent_id whose first version shares the source's content. No byte is written and no quota is used.
Access: key with the permission drive.files:write (Add and organise files).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Headers
Body (application/json)
Responses
201The entry
400Malformed request
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
429Too many requests
Add to favourites
Marks the entry as a favourite.
Access: key with the permission drive.files:write (Add and organise files).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Responses
200The entry
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
429Too many requests
Remove from favourites
Removes the favourite mark.
Access: key with the permission drive.files:write (Add and organise files).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Responses
200The entry
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
429Too many requests
List favourites
The favourite entries. For a key restricted to a folder, only those below it (a page may then hold fewer entries than asked).
Access: key with the permission drive.files:read (See files and folders).
Key restricted to a folder: accepted, limited to that folder.
Query parameters
next of the previous page.100Responses
200A page of entries
401Missing, invalid or expired key
403The key or the account may not do this
429Too many requests
Recent files
The live files most recently added or changed, newest first, each with the name of the folder holding it (null at the top); 50 at most.
Access: key with the permission drive.files:read (See files and folders).
Key restricted to a folder: accepted, limited to that folder.
Query parameters
50Responses
200The recent files.
401Missing, invalid or expired key
403The key or the account may not do this
429Too many requests
Search by name
Entries whose name contains q, case and accents ignored, best match first. Content is not searched.
Access: key with the permission drive.files:read (See files and folders).
Key restricted to a folder: accepted, limited to that folder.
Query parameters
50Responses
200The hits.
400Malformed request
401Missing, invalid or expired key
403The key or the account may not do this
429Too many requests
Follow changes
Everything that happened to the drive since cursor. Without a cursor, a snapshot of the live tree, paged, then the journal: apply every change in order and keep the last cursor.
410 resync_required: the cursor is older than the journal, start again without one. 410 restored: the catalogue was restored from a backup, start again without a cursor and delete nothing the server lacks.
Access: key with the permission drive.files:read (See files and folders).
Key restricted to a folder: refused (403 folder_restricted).
Query parameters
500Responses
200A page of the feed.
400Malformed request
401Missing, invalid or expired key
403The key or the account may not do this
410No longer valid
429Too many requests
Cursor from now on
A cursor at the head of the journal, to follow only what happens from now on, without a snapshot.
Access: key with the permission drive.files:read (See files and folders).
Key restricted to a folder: refused (403 folder_restricted).
Responses
200The cursor.
401Missing, invalid or expired key
403The key or the account may not do this
429Too many requests
Ruza Drive
Content and versions
Downloads, versions and ZIP archives.
Download a file
The content of the current version, or of version. Supports Range (206), If-None-Match, If-Range and HEAD. Always served as an attachment.
Access: key with the permission drive.files:download (Download file contents).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Query parameters
Headers
Responses
200The content, as an attachment
206Part of the content (Range)
304Not modified (If-None-Match)
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
416Range outside the file
429Too many requests
List versions
The versions kept, the current one included, newest first.
Access: key with the permission drive.files:read (See files and folders).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Responses
200The versions.
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
429Too many requests
Restore a version
Makes an older version current again by adding a new version that reuses its content. Nothing is overwritten.
Access: key with the permission drive.files:write (Add and organise files).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Responses
200The file and its new version
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
429Too many requests
Delete a version
Permanently deletes an older version. The current version cannot be deleted (409 current_version).
Access: key with the permission drive.files:delete (Delete permanently).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Responses
200Deleted.
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
429Too many requests
Prepare a ZIP archive
Checks a selection of files and folders and returns a single-use download address, valid a few minutes, to fetch with the same key.
Access: key with the permission drive.files:download (Download file contents).
Key restricted to a folder: accepted, limited to that folder.
Headers
Body (application/json)
Responses
201The archive is ready to download.
400Malformed request
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
413Too large
429Too many requests
Download a ZIP archive
The ZIP of a prepared selection, once. Files are stored uncompressed.
Access: key with the permission drive.files:download (Download file contents).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Responses
200The archive.
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
429Too many requests
Ruza Drive
Uploads
Single-request uploads up to 100 MiB, resumable uploads of any size.
Upload a new version
The whole new content in the body (100 MiB at most, Content-Length required). With If-Match (the current version ID, the ETag of a download), 412 if another version was added meanwhile.
Access: key with the permission drive.files:write (Add and organise files).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Query parameters
Headers
Body (application/octet-stream)
The file's bytes, as they are (application/octet-stream).
Responses
201The file and its new version
400Malformed request
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
411Content-Length missing
412The resource changed meanwhile
413Too large
429Too many requests
507Not enough storage
Upload a file
The whole file in the body, 100 MiB at most (Content-Length required): the server cuts it into blocks and checks it. Beyond, use a resumable upload.
if_exists: fail (default, 409 name_conflict), new_version (adds a version to the file of that name) or rename ("report (2).pdf").
Access: key with the permission drive.files:write (Add and organise files).
Key restricted to a folder: accepted, limited to that folder.
Query parameters
fail, new_version, rename (default fail)Body (application/octet-stream)
The file's bytes, as they are (application/octet-stream).
Responses
201The file and its new version
400Malformed request
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
411Content-Length missing
413Too large
429Too many requests
507Not enough storage
Start a resumable upload
Opens a session for a file of any size. Send its blocks of block_size bytes (4 MiB, the last one shorter) in any order, possibly in parallel, then complete it with the content hash.
base_version_id: the version a new content derives from; completion then fails with 412 if the file has another current version.
Access: key with the permission drive.files:write (Add and organise files).
Key restricted to a folder: accepted, limited to that folder.
Headers
Body (application/json)
Responses
201The upload session
400Malformed request
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
429Too many requests
507Not enough storage
State of an upload
The blocks received, as inclusive index ranges, and when the session expires. Resume by sending the missing blocks.
Access: key with the permission drive.files:write (Add and organise files).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Responses
200The upload session
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
429Too many requests
Cancel an upload
Cancels the session and frees what its blocks reserved.
Access: key with the permission drive.files:write (Add and organise files).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Responses
204Done, no content
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
410No longer valid
429Too many requests
Send a block
One block of the file, Content-Digest giving its SHA-256 (RFC 9530). Sending a block again with the same content is harmless.
Access: key with the permission drive.files:write (Add and organise files).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Headers
Body (application/octet-stream)
The file's bytes, as they are (application/octet-stream).
Responses
200The block is stored.
400Malformed request
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
410No longer valid
422The content does not match what was announced
429Too many requests
Complete an upload
Checks content_hash against the blocks received and creates the file, or a new version of the file of that name unless fail_if_exists. name and parent_id may replace the session's target (to resolve a conflict).
The content hash is the SHA-256 of the concatenation of the SHA-256 digests of the 4 MiB blocks, in order (the empty file: SHA-256 of nothing). See the uploads guide.
Access: key with the permission drive.files:write (Add and organise files).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Headers
Body (application/json)
falseResponses
200The file and its new version
400Malformed request
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
410No longer valid
412The resource changed meanwhile
422The content does not match what was announced
429Too many requests
Ruza Drive
Trash
The account's trash.
List the trash
The entries in the trash, each with trash_expires_at, when it is permanently deleted.
Access: key with the permission drive.files:trash (Move to the trash and restore).
Key restricted to a folder: refused (403 folder_restricted).
Query parameters
next of the previous page.100Responses
200A page of entries
401Missing, invalid or expired key
403The key or the account may not do this
429Too many requests
Empty the trash
Permanently deletes everything in the trash. Irreversible.
Access: key with the permission drive.files:delete (Delete permanently).
Key restricted to a folder: refused (403 folder_restricted).
Responses
200What was permanently deleted
401Missing, invalid or expired key
403The key or the account may not do this
429Too many requests
Restore from the trash
Puts the entry back into its folder, optionally under another name. Restoring an entry trashed long ago needs a recent sign-in, in the application (403 web_only).
Access: key with the permission drive.files:trash (Move to the trash and restore).
Key restricted to a folder: refused (403 folder_restricted).
Path parameters
Body (application/json)
Responses
200The entry
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
410No longer valid
429Too many requests
Delete permanently
Permanently deletes an entry of the trash. Irreversible.
Access: key with the permission drive.files:delete (Delete permanently).
Key restricted to a folder: refused (403 folder_restricted).
Path parameters
Responses
200What was permanently deleted
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
409Conflict with the drive's state
429Too many requests
Ruza Drive
People
The people your files and folders are shared with. Invitations are sent from the applications.
Everyone with access
Each shared entry with the people who have access to it. Pass next_cursor back as cursor.
Access: key with the permission drive.members:read (See who has access).
Key restricted to a folder: refused (403 folder_restricted).
Query parameters
Responses
200A page of shared entries.
401Missing, invalid or expired key
403The key or the account may not do this
429Too many requests
People with access to an entry
The people an entry is shared with, their role and whether they opened it.
Access: key with the permission drive.members:read (See who has access).
Key restricted to a folder: accepted, limited to that folder.
Path parameters
Responses
200The people.
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
429Too many requests
Change a role
viewer reads and downloads; editor also adds, renames, moves and trashes within the share.
Access: key with the permission drive.members:write (Manage people's access).
Key restricted to a folder: refused (403 folder_restricted).
Path parameters
Body (application/json)
viewer, editorResponses
200The person's new role.
400Malformed request
401Missing, invalid or expired key
403The key or the account may not do this
404Not found, or outside the key's folder
429Too many requests
Remove an access
The person loses access at once.
Access: key with the permission drive.members:write (Manage people's access).
Key restricted to a folder: refused (403 folder_restricted).