Custom data with a schema, versioned so old records keep their meaning.
Define fields in the console, publish them as a version, and store records against it. Your backend reads the records by collection slug over a token-authenticated REST API, and every form submission lands here as a record.
Your app is an organization in BuildBase. Your users sign in and work inside workspaces - one per team or customer.
You set up
In the console and the SDK
- The fields you want to store, in the console
- A new version when those fields change
- One fetch from your server to read the data
You get
For you and your team
- Structured data without building a database table
- Old records that keep their meaning after you change fields
- Every form submission stored for you
A schema you can change without breaking old data
Versions keep yesterday's records readable while you publish tomorrow's fields.
Fields as Versions
Your fields are saved as a version. Change them by publishing a new version, and old records stay readable.
Locked When Live
A published version cannot be edited, so nothing already stored changes meaning underneath you.
Common Field Types
Text, rich text, number, yes or no, date, color, link and email, each with a default and a required flag, plus image file fields that take up to ten files.
Read by Name
Fetch records by the collection's name, so the same code works in every environment.
Where Forms Save
Every form submission becomes a record in its collection.
Private by Default
Reading data needs your API token, so records never become public by accident.
Read records by slug from your backend
Call the records API with an org token from any backend, ideally from a background job. In JavaScript, the client in @buildbase/sdk/server reads the same records and keeps copies so reads are fast.
const res = await fetch(
'https://api.console.buildbase.app/api/collections/data/contact-requests?latest=true',
{ headers: { Authorization: process.env.BUILDBASE_TOKEN! } }
);
// Every record for the resolved version, unpaginated.
const records: {
_id: string;
versionId: string;
data: Record<string, unknown>;
createdAt: string;
}[] = await res.json();Read records from your backend
The client in @buildbase/sdk/server that reads your posts reads collections too. It runs on Node, Bun, Deno, Cloudflare Workers and other edge platforms.
Typed records, read fast
Describe the shape of a record once and get typed records back, so your editor knows every field. Reads keep a copy, and checking an unchanged collection costs one tiny request.
Told when records change
Creating, editing or deleting a record, or publishing a new version, sends a webhook. Your content handler clears the saved copy of just that collection.
In the build, if you prefer
The build step copies the records of every live collection into a JSON file, next to your posts and docs, so a static site reads them as plain files.
import { createServerClient } from '@buildbase/sdk/server';
const content = createServerClient({
serverUrl: process.env.BUILDBASE_SERVER_URL!,
apiToken: process.env.BUILDBASE_API_TOKEN!,
});
// The live version; pass { version: 3 } to pin one
const releases = await content.collections.data<{
title: string;
version: string;
}>('release-notes');Read more in the docs
Setup guides and reference for Collections & Custom Data.
Overview
Custom data schemas with versioned records and a token-authenticated REST API.
Records API
Read records for a collection by slug, and delete them by id.
Delivering content
Read records from your server with copies kept for speed, refresh them when records change, or pull them in at build time.
Forms
Build a form in the console, submit to it from anywhere without a token, and trigger a workflow.
Custom forms
Fetch the field schema and render your own form UI against the public endpoints.
Admin API
Authenticate with an org API token and call the REST API behind the console modules.
Frequently Asked Questions
What people ask about Collections.
Do my users see this?
Not directly. Collections store data for your app, and your server decides what to show.
Can I use it as a public CMS?
No. Every read needs your API token, so there is no public read path.
How do I change the fields?
Publish a new version. A published version cannot be edited, so records already stored keep their meaning.
Is there an SDK for collections?
On the server, yes. The server client in @buildbase/sdk/server reads a collection's records by its slug, keeps a cached copy, and refreshes it when records change. There is nothing for the browser, because every read needs your API token, and that has to stay on your server. Other languages use the REST API.
Define your first collection
Create a collection in the console, add fields to a version and publish it. Your backend reads the records by slug.