Base URL

All API requests are made to the following base URL:

https://api.bhkcloud.com/v1

Authentication

Include your API key as a Bearer token in every request:

curl
curl -H "Authorization: Bearer YOUR_API_KEY" \
     https://api.bhkcloud.com/v1/files

Files

GET /files

List all files in your storage. Supports pagination and prefix filtering.

ParameterTypeDescription
prefixstringFilter by key prefix
limitintegerMax results (default 100, max 1000)
cursorstringPagination cursor from previous response
Response 200
{
  "files": [
    {
      "id": "file_8xk2m9",
      "key": "documents/report.pdf",
      "size": 245760,
      "content_type": "application/pdf",
      "created_at": "2026-05-01T10:30:00Z",
      "checksum": "sha256:a1b2c3..."
    }
  ],
  "cursor": "eyJrIjoiZG9jcy8...",
  "has_more": true
}

POST /files/upload

Upload a file to your storage. Send the file as multipart/form-data.

FieldTypeDescription
filebinaryThe file to upload (max 5 GB)
keystringDestination path and filename
content_typestringMIME type (auto-detected if omitted)
curl
curl -X POST \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -F "file=@report.pdf" \
     -F "key=documents/report.pdf" \
     https://api.bhkcloud.com/v1/files/upload

DELETE /files/{id}

Permanently delete a file by its ID.

curl
curl -X DELETE \
     -H "Authorization: Bearer YOUR_API_KEY" \
     https://api.bhkcloud.com/v1/files/file_8xk2m9

Returns 204 No Content on success.


Folders

GET /folders

List top-level folders. Use the parent parameter to list subfolders.

ParameterTypeDescription
parentstringParent folder ID (omit for root)

POST /folders

Create a new folder.

Request Body
{
  "name": "project-assets",
  "parent": "folder_root"
}

Sharing

POST /share

Generate a shareable link for a file or folder.

Request Body
{
  "resource_id": "file_8xk2m9",
  "expires_in": 86400,
  "password": "optional-password"
}
Response 201
{
  "url": "https://share.bhkcloud.com/s/abc123",
  "expires_at": "2026-05-13T10:30:00Z"
}