PersonalCloud API
Use your API key to upload, download, and manage files from other projects.
Authentication
Send your API key as a Bearer token in the Authorization header.
curl -H "Authorization: Bearer pcu_xxx" \
https://personal-cloud.dev/api/v1/files/initiateQuick start (connect your app)
Create a key, store it in env vars, and follow the 3-step upload flow.
- Create an API key in Docs → API Keys.
- Store it as an env var (e.g.
PC_API_KEY). - Initiate → upload to MinIO → complete.
// Example (Node / Next.js)
const apiKey = process.env.PC_API_KEY;
const initiate = await fetch("https://personal-cloud.dev/api/v1/files/initiate", {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "photo.jpg",
contentType: "image/jpeg",
sizeBytes: fileBuffer.length
})
}).then(r => r.json());
await fetch(initiate.uploadUrl, { method: "PUT", body: fileBuffer });
await fetch("https://personal-cloud.dev/api/v1/files/complete", {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json"
},
body: JSON.stringify({ fileId: initiate.fileId })
});Upload flow
Initiate, upload to MinIO, then complete.
# 1) Initiate
curl -X POST https://personal-cloud.dev/api/v1/files/initiate \
-H "Authorization: Bearer pcu_xxx" \
-H "Content-Type: application/json" \
-d '{"name":"photo.jpg","contentType":"image/jpeg","sizeBytes":12345}'# 2) Upload to MinIO
curl -X PUT "<uploadUrl>" --data-binary @photo.jpg# 3) Complete
curl -X POST https://personal-cloud.dev/api/v1/files/complete \
-H "Authorization: Bearer pcu_xxx" \
-H "Content-Type: application/json" \
-d '{"fileId":"FILE_ID"}'Download
Generate a signed download URL.
curl -H "Authorization: Bearer pcu_xxx" \
https://personal-cloud.dev/api/v1/files/FILE_ID/downloadPublic files
Mark files public, then use the public download URL.
curl -X PATCH https://personal-cloud.dev/api/v1/files/FILE_ID \
-H "Authorization: Bearer pcu_xxx" \
-H "Content-Type: application/json" \
-d '{"isPublic":true}'curl "https://personal-cloud.dev/api/v1/public/files/FILE_ID/download?token=PUBLIC_TOKEN"