Overview
The ShareWith API provides full programmatic access to your file management operations. You can list, upload, download, move, rename, and delete files and folders, as well as manage your account and API keys.
All API endpoints are prefixed with /api/v1/. The API uses JSON for request and response bodies (except file downloads and uploads). Authentication is done via API keys passed in the X-API-Key header.
Paths & Locations
Every endpoint that takes a path accepts the same virtual path namespace the file manager uses. A path either starts at your own root, or begins with a mount prefix that selects another location.
| Path looks like | Where it goes |
|---|---|
reports/q3.pdf | Your own files |
__adm_<id>/… | A server folder an administrator shared with you |
__conn_<id>/… | A mounted FTP, SFTP or Google Drive connector |
You do not have to guess the ids — call GET /locations, or list your root with GET /files and read the mount field on each entry.
From there, treat the mount like any other folder:
readOnly flag on listings and on /locations tells you in advance.Authentication
Every API request must include a valid API key in the X-API-Key HTTP header. You can generate API keys from the File Manager sidebar (API tab) or via the API itself (if you already have a key).
Header Format
Folder-Scoped Keys
API keys can be scoped to a specific folder. When creating a key, you can optionally set a Folder Scope to restrict the key's access to only that folder and its subfolders. If no folder scope is set, the key has full access to your entire storage.
Projects/Web, then path=images refers to Projects/Web/images. Requests outside the scope return a 403 error.Response Format
All API responses return JSON with a consistent structure:
Success Response
Error Response
Error Codes
| Status | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request - Missing or invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Path traversal or access denied |
| 404 | Not Found - File, folder, or resource not found |
| 409 | Conflict - Resource already exists |
| 413 | Payload Too Large - Storage quota exceeded |
Files
Returns your own files plus each shared folder and connector mount, with the virtual path to use for it. Start here instead of hard-coding mount ids.
Response
kind is one of own, shared, ftp, sftp, drive — or scoped when the key is restricted to a single folder.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| path | string | optional | Folder path. Empty = your root, which also lists shared folders and mounts. May start with __adm_<id> or __conn_<id>. |
Entries carry mount (shared, ftp, sftp, gdrive, or null for ordinary items), mountTarget, and readOnly.
Response
Example
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| path | string | required | Relative path to the file to download. |
Response
Returns the raw file content with appropriate Content-Type and Content-Disposition headers.
Example
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| path | string | optional | Target folder path. Empty = root. |
Request Body
Multipart form data with one or more files. The storage quota is checked before upload. If the upload would exceed the quota, a 413 error is returned.
Response
Example
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| path | string | optional | Parent folder path. Empty = root. |
| name | string | required | Name of the new folder. |
Response
Example
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| path | string | optional | Parent folder path. Empty = root. |
| name | string | required | Name of the new file (with extension). |
Response
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| from | string | required | Source path. May be inside a shared folder or a mount. |
| to | string | optional | Destination folder. Empty = your root. May be a different backend. |
Response
Same shape as move, but the source is left in place. This is how you pull data out of a read-only shared folder.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| from | string | required | Source path. Folders are copied recursively. |
| to | string | optional | Destination folder. Empty = your root. |
Example
Response
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| path | string | required | Relative path of the item to rename. |
| newName | string | required | New name for the file/folder. |
Response
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| path | string | required | Relative path of the file/folder to delete. |
Response
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| path | string | required | Relative path of the file/folder. |
Response
Account
Response
Example
API Keys
Response
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | required | A friendly name for the key (e.g., "My Script"). |
| folder | string | optional | Folder path to scope the key to (e.g., "Projects/Web"). Leave empty for full access. |
Response
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | required | The ID of the API key to revoke. |