Developer API
Public API Documentation

Programmatic access to your file and folder metadata.

Base URL

https://cryptfiles.cloud/api/public/v1

All endpoints are owner-scoped. A token can only access resources of the account that created it. Note: uploads are currently unavailable in the Public API due to the zero-knowledge model.

Quick Start
  1. Create a Bearer token in Dashboard -> Profile -> Public API Tokens.
  2. Store the token securely. The plain token is shown only once.
  3. Send requests with `Authorization: Bearer {token}` and `Accept: application/json`.
  4. Request only the scopes you really need (principle of least privilege).
Common Status Codes
  • 200 OK - request successful
  • 201 Created - resource created
  • 401 Unauthorized - missing/invalid token
  • 403 Forbidden - missing scope or restricted account
  • 404 Not Found - resource not visible for this owner
  • 422 Unprocessable Entity - validation errors
  • 429 Too Many Requests - rate limit reached
Security Model
  • Token secrets are never stored in plaintext server-side.
  • Strict owner checks prevent cross-account file or folder access.
  • Suspended or banned accounts are blocked from Public API access.
  • Upload endpoints are not available in the Public API due to the zero-knowledge model.
Required Headers
  • Authorization: Bearer {token}
  • Accept: application/json
  • Content-Type: application/json (for JSON bodies)
Account

Read account profile, storage and usage stats.

GET /account Scope: account:read Get account data

Returns account profile, storage quota/usage and aggregate stats for the token owner.

Request Details
Request Notes
  • No body required.
Response Fields
  • data.id: Account UUID
  • data.name: Profile display name
  • data.email: Account email
  • data.account_type: Current plan tier
  • data.storage.used_bytes: Stored bytes
  • data.storage.pending_bytes: Bytes reserved by running uploads
  • data.storage.quota_bytes: Max allowed bytes
  • data.storage.available_bytes: Remaining bytes
  • data.storage.usage_percentage: Storage usage in percent
  • data.stats.uploads_count: Total successful uploads
  • data.stats.downloads_count: Total successful downloads
  • data.stats.views_count: Total view/stream events
  • data.stats.shares_count: Total created share links
  • data.stats.files_count: Total tracked files in statistics
  • data.stats.bandwidth_used_bytes: Total transferred bandwidth in bytes
  • data.fair_use.daily_bandwidth_used_bytes: Current fair-use counter for today in bytes
  • data.fair_use.full_speed_limit_bytes: Throttle starts when this daily byte limit is reached
  • data.fair_use.heavy_throttle_from_bytes: Heavy throttle starts when this daily byte limit is reached
  • data.fair_use.moderate_delay_ms: Per-chunk delay in moderate throttle
  • data.fair_use.heavy_delay_ms: Per-chunk delay in heavy throttle
  • data.fair_use.current_delay_ms: Current per-chunk delay applied now
  • data.fair_use.current_state: full_speed|moderate|heavy
Notes
  • Always owner-bound. No cross-account lookup possible.
  • All bandwidth values are bytes.
  • Throttle is based on daily fair-use bytes and account tier.
  • Moderate throttle starts at daily_bandwidth_used_bytes >= full_speed_limit_bytes; heavy starts at >= heavy_throttle_from_bytes.
Example
curl -X GET "https://cryptfiles.cloud/api/public/v1/account" \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"
Files

List, inspect, update, share and delete file metadata.

GET /files Scope: files:read List file metadata

Returns paginated file metadata for the owner account.

Request Details
Query Parameters
  • folder_id (uuid optional)
  • status (uploading|processing|available|deleted optional)
  • is_video (boolean optional)
  • share_type (public|private optional)
  • per_page (integer 1-200 optional)
Response Fields
  • data.items[].id
  • data.items[].folder_id, original_file_id, reference_count
  • data.items[].status, share_type, is_video, mime_type
  • data.items[].file_size, file_size_encrypted, chunk_size, chunk_count
  • data.items[].download_count, stream_count
  • data.items[].metadata, thumbnail_path, thumbnail_nonce
  • data.items[].created_at, updated_at, expires_at
  • data.pagination.current_page, last_page, per_page, total
Notes
  • Defaults to status=available if no status filter is provided.
Example
curl -X GET "https://cryptfiles.cloud/api/public/v1/files?per_page=50" \
  -H "Authorization: Bearer {token}"
GET /files/{fileId} Scope: files:read Get one file metadata record

Returns metadata for a single owner file.

Request Details
Path Parameters
  • fileId (uuid)
Response Fields
  • data.id
  • data.folder_id, original_file_id, reference_count
  • data.status, share_type, is_video, mime_type
  • data.file_size, file_size_encrypted, chunk_size, chunk_count
  • data.download_count, stream_count
  • data.metadata, thumbnail_path, thumbnail_nonce
  • data.created_at, updated_at, expires_at
Notes
  • Returns 404 when file does not belong to token owner.
Example
curl -X GET "https://cryptfiles.cloud/api/public/v1/files/{file_id}" \
  -H "Authorization: Bearer {token}"
PATCH /files/{fileId} Scope: files:write Update file metadata (not content)

Updates owner-visible metadata fields such as folder assignment, share type, expiry and metadata.

Request Details
Path Parameters
  • fileId (uuid)
Body Parameters (JSON)
  • folder_id (uuid|null optional)
  • share_type (public|private optional)
  • is_video (boolean optional)
  • expires_at (date|null optional)
  • metadata (string|null optional)
Response Fields
  • Same file object fields as GET /files/{fileId}
Notes
  • folder_id must belong to the same owner account.
  • No content bytes are modified by this endpoint.
  • If no updatable field is provided, endpoint returns 422.
Example
curl -X PATCH "https://cryptfiles.cloud/api/public/v1/files/{file_id}" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"share_type":"private"}'
DELETE /files/{fileId} Scope: files:write Delete file

Deletes a file with owner authorization checks and existing safe deletion logic.

Request Details
Path Parameters
  • fileId (uuid)
Response Fields
  • success
  • message
Notes
  • Returns 404 for non-owner resources.
Example
curl -X DELETE "https://cryptfiles.cloud/api/public/v1/files/{file_id}" \
  -H "Authorization: Bearer {token}"
POST /files/{fileId}/share Scope: files:write Create file share link

Creates a share token for one owner file.

Request Details
Path Parameters
  • fileId (uuid)
Body Parameters (JSON)
  • password (string min 4 optional)
  • max_downloads (integer >= 1 optional)
  • expires_in_days (integer 1-365 optional)
Response Fields
  • data.share_id, share_token, share_url
  • data.expires_at, has_password
  • message
Notes
  • Owner-only endpoint.
Example
curl -X POST "https://cryptfiles.cloud/api/public/v1/files/{file_id}/share" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"max_downloads":25}'
Folders

Create and manage folder structure aligned to existing system.

GET /folders Scope: folders:read List folders

Returns folders in flat or tree format.

Request Details
Query Parameters
  • format (flat|tree optional default flat)
Response Fields
  • data[].id, parent_folder_id, name, display_order
  • data[].created_at, updated_at, deleted_at
  • data[].file_count, subfolder_count, object_count
  • data[].children[] (only when format=tree, recursive same fields)
Notes
  • Results are always owner-scoped.
  • Invalid format values return 422 validation errors.
Example
curl -X GET "https://cryptfiles.cloud/api/public/v1/folders?format=tree" \
  -H "Authorization: Bearer {token}"
GET /folders/{folderId} Scope: folders:read Get folder details

Returns folder metadata and breadcrumb path.

Request Details
Path Parameters
  • folderId (uuid)
Response Fields
  • data.folder.id, parent_folder_id, name, display_order
  • data.folder.created_at, updated_at, deleted_at
  • data.folder.file_count, subfolder_count, object_count
  • data.breadcrumbs[] with same folder fields
Notes
  • 404 for non-owner folders.
Example
curl -X GET "https://cryptfiles.cloud/api/public/v1/folders/{folder_id}" \
  -H "Authorization: Bearer {token}"
POST /folders Scope: folders:write Create folder

Creates a new folder in the existing hierarchy.

Request Details
Body Parameters (JSON)
  • name (required non-empty string)
  • parent_folder_id (uuid|null optional)
  • display_order (integer >= 0 optional)
Response Fields
  • data.id, parent_folder_id, name, display_order
  • data.created_at, updated_at, deleted_at
  • data.file_count, subfolder_count, object_count
Notes
  • parent_folder_id must belong to owner account.
Example
curl -X POST "https://cryptfiles.cloud/api/public/v1/folders" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"name":"Project Alpha"}'
PATCH /folders/{folderId} Scope: folders:write Update folder metadata

Renames, moves or reorders an existing folder.

Request Details
Path Parameters
  • folderId (uuid)
Body Parameters (JSON)
  • name (non-empty string optional)
  • parent_folder_id (uuid|null optional)
  • display_order (integer >= 0 optional)
Response Fields
  • data.id, parent_folder_id, name, display_order
  • data.created_at, updated_at, deleted_at
  • data.file_count, subfolder_count, object_count
Notes
  • Move target parent must belong to owner account.
  • If no updatable field is provided, endpoint returns 422.
  • Invalid folder moves (self/descendant) return 422.
Example
curl -X PATCH "https://cryptfiles.cloud/api/public/v1/folders/{folder_id}" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"display_order":3}'
DELETE /folders/{folderId} Scope: folders:write Delete folder

Deletes folder.

Request Details
Path Parameters
  • folderId (uuid)
Response Fields
  • success
  • message
Notes
  • 404 for non-owner folders.
Example
curl -X DELETE "https://cryptfiles.cloud/api/public/v1/folders/{folder_id}" \
  -H "Authorization: Bearer {token}"

We use technically necessary cookies for the security and functionality of the platform. Further information can be found in our Privacy Policy.