Skip to main content
Use this pattern when your SaaS needs a private media area for every user, organization, or project. Convertly folders act as logical asset buckets inside a Convertly workspace. Your application remains the authority for which customer can access each folder.
A standard Convertly API key is scoped to its Convertly workspace, not to one folder. Keep it on your server. Never send it to a browser, mobile app, customer, or third-party webhook.

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

Store a mapping similar to this in your application database: 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:
The equivalent core relationship in Prisma is:
Use your own user table for individual accounts or your organization table for team accounts. 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.
Persist the returned folder ID against the authenticated tenant. If provisioning is retried, read the existing mapping before creating another folder.

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 return 202 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 arbitrary folderId from the client.
Return only the signed 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.
After the byte upload finishes, let the client send your own opaque upload ID back to your API. Your server should load the saved complete.body, verify that the upload belongs to the current tenant, and pass it unchanged to Convertly:
Do not trust a completion payload supplied by the browser. Keeping it server-side prevents a customer from changing the target folder or registering an object created for another tenant. After Convertly returns the stored file, save its ID in tenant_assets before returning success:

3. List and manage tenant assets

Resolve the folder ID from your database on every request:
Apply the same rule to rename, move, process, and delete operations. Before forwarding a file ID to Convertly, verify in your own data model that it belongs to the current tenant. Never authorize a request merely because the caller knows a Convertly file or folder UUID.

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:
Call 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 tenantId from 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.