Quickstart
Get from zero to your first file upload in under 5 minutes. All you need is an account and your API key.
Create an account
Sign up at tenantbox.dev/register and verify your email. No credit card required.
Create a project and get your API key
From the dashboard, create a new project. You'll receive an API key — it's shown only once. Copy it immediately and store it securely.
Never expose your API key in client-side code, public repositories, or anywhere users can see it. Use it only in server-side code.
Make your first upload
Uploading a file is a two-step process. First request a presigned URL from Tenantbox, then upload directly to Tenantbox storage. Your file never touches Tenantbox's servers.
# Step 1 — Get presigned upload URL
curl -X POST https://api.tenantbox.dev/api/storage/upload/ \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"tenant_id": "user_123",
"filename": "contract.pdf"
}'
# Step 2 — Upload directly to Tenantbox storage
curl -X PUT "<presigned_url>" \
-H "Content-Type: application/pdf" \
--data-binary @contract.pdf{
"presigned_url": "https://xxx.r2.cloudflarestorage.com/...",
"file_path": "projects/abc.../tenants/def.../xyz_contract.pdf",
"tenant_id": "user_123",
"is_new_tenant": true
}is_new_tenant: true means Tenantbox automatically created this tenant on first upload. You don't need to create tenants in advance.
Tenant id should be unique for every Tenant. This can be user id, unique email address or unique username.
Check the dashboard
After uploading, visit your dashboard to see the tenant created for user_123, their file, and storage usage — all tracked automatically.