Choose the isolation boundary
For most multi-tenant applications, use one Convertly workspace per environment and a top-level folder per tenant. Keep production and staging in separate Convertly workspaces or, at minimum, under separate top-level folders and API keys.
Convertly does not treat a folder name as an authorization boundary. The security boundary is your backend plus the folder ID mapping stored in your database.
Architecture
Add a unique constraint on
(convertly_workspace, tenant_id). This prevents concurrent signup requests from creating multiple buckets for the same tenant.
Example PostgreSQL schema
This example links each SaaS tenant to one Convertly folder and records every Convertly file owned by that tenant:convertly_workspace is an application-defined environment key such as production or staging; it is not a secret.
1. Create the logical bucket
Create the folder from a trusted server process during tenant provisioning. Use an opaque application identifier in your database mapping. Do not derive authorization from the folder name or expose customer email addresses in folder names.Retry-safe provisioning
Creating a database row and calling an external API cannot be one atomic transaction. Use a short provisioning lease so only one worker creates the folder. Other requests should return202 Accepted or wait for the existing job instead of creating another folder.
findExactRootFolder should call GET /api/folders?parentId=null&q=tenant-{tenantId} and accept only an exact name match. This recovers safely if the worker created the Convertly folder but stopped before saving its UUID locally. Keep email addresses and other personal information out of the label.
2. Create a direct upload session
Your backend must select the folder. Do not accept an arbitraryfolderId from the client.
upload instructions to the client. Save the returned complete.body on your server with a short-lived upload record. The client can then upload the bytes directly to the signed URL without receiving your Convertly API key.
complete.body, verify that the upload belongs to the current tenant, and pass it unchanged to Convertly:
tenant_assets before returning success:
3. List and manage tenant assets
Resolve the folder ID from your database on every request:Reusable authorization helpers
Derive the user from your verified session. The helper below checks organization membership, loads the ready bucket, and then verifies file ownership from the local mapping:requireTenantBucket before listing or uploading. Call requireTenantAsset before reading, renaming, processing, moving, or deleting a file. Return 404 for an unknown cross-tenant file so the response does not confirm that another tenant owns it.
4. Deliver assets safely
Choose delivery based on the asset’s visibility:
Folder placement does not make a public CDN URL private. For private media, require signed delivery and generate signatures only on your backend. Use short expirations, avoid logging complete signed URLs, and rotate signing keys by creating a replacement before deleting the old key.
See Presets and signing for signed CDN delivery.
Security checklist
- Keep the Convertly API key and signing keys in a server-side secret manager.
- Derive
tenantIdfrom the authenticated session, never from an untrusted request body. - Resolve folder IDs from your own database and reject cross-tenant file IDs.
- Validate filename, MIME type, and size before creating an upload session.
- Store upload completion data server-side and expire abandoned sessions.
- Add application-level per-user quotas and rate limits before Convertly usage limits are reached.
- Use separate workspaces or credentials for production and non-production data.
- Delete or export the tenant folder as part of account deletion and retention workflows.
- Record destructive actions in your audit log and make webhook processing idempotent.
Storage quota and overage
Stored source files, generated outputs, and packaged streaming assets count toward HDAM storage. Free and Starter stop at their included storage limits. Pro and Business can continue when metered overage is enabled for the workspace.
Convertly bills storage overage from the workspace’s monthly peak usage above its included allowance. Review all current quotas on the Limits page.
Files and Storage API
Upload sessions, folders, file operations, storage behavior, and direct-upload details.