Also available: Markdown version · llms.txt · full site content
Storage
Buckets
A bucket is a named container with a visibility mode, an optional file size cap, and an optional MIME allowlist. Names are unique within the project.
Create a bucket
Bucket names are 2–63 characters: lowercase letters, digits, dots, dashes, and underscores, starting with a letter or digit. Creating, updating, and deleting buckets requires a secret API key (or a Console owner/admin session).
POST https://example-project.api.cubibase.com/storage/v1/buckets
apikey: cb_pub_EXAMPLE_ONLY
Authorization: Bearer <SECRET_API_KEY>
Content-Type: application/json
{
"name": "avatars",
"public": true,
"allowedMimeTypes": ["image/*"]
}| Field | Type | Meaning |
|---|---|---|
name | string, required | Unique within the project |
public | boolean, default false | true = anonymous read-only downloads |
fileSizeLimitBytes | integer or null | Per-bucket cap; can only lower the plan maximum |
allowedMimeTypes | string[] or null | Allowlist of exact types or type/* wildcards; null allows any |
Public versus private
- Public: anyone with the publishable key can read published objects at
/storage/v1/public/{bucket}/{path}. Reads are metered against bandwidth. - Private: reads require an end-user JWT, a secret API key, or a signed download token. Listing private metadata always requires authorization.
- Neither mode allows anonymous uploads, overwrites, or deletions. Public is a read setting, not a write setting.
- Visibility can be flipped at any time with
PATCH; existing signed links keep their expiry.
Size cap and MIME allowlist
The effective maximum file size is the smaller of the plan limit and the bucket cap. The MIME allowlist is checked twice: against the declared type when the upload starts, and against the verified content type reported by S3 at completion — a client cannot sneak a disallowed type past it by lying in the request.