From your database to your first API response.

Connect PostgreSQL, model your content, publish your first entry, and retrieve it through SCHMA's Delivery API.

REQUIREMENTS

Before you begin.

SCHMA runs against your own infrastructure. Have these three items ready before you connect.

1. A PostgreSQL 15+ Database (pgvector)

A running customer-owned PostgreSQL 15+ database with the pgvector extension enabled (from providers like Supabase, Neon, Railway, AWS RDS, or a local Docker instance). You will need your connection URI. Review our database ownership architecture →

URI format: postgresql://...

2. Schema Migration Permissions

The database user in your connection URI requires permission to create extensions, tables, and indices (CREATE EXTENSION, CREATE TABLE, CREATE INDEX) for SCHMA's initial migrations (including pgvector).

Creates 6 isolated schma_* tables

3. Node.js (Optional for SDK)

Node.js 18+ is only required if you plan to query content using the TypeScript SDK (@schmadev/client) or frontend framework. Standard cURL requests require zero local tools.

Optional · HTTP requires no install
Commercial client use is permitted: You are explicitly allowed to build and deliver commercial client projects on SCHMA's ongoing Free tier within applicable quotas (10,000 monthly Delivery requests, 100 MB media storage; up to 2 workspace members including the owner; 100 MB SCHMA-managed DB storage, or customer-owned PostgreSQL where no size quota is imposed by SCHMA). Review the full plan limits on our Pricing page.
STEP-BY-STEP SETUP

The five-step setup journey.

Follow this sequential guide to connect your database, structure content, publish an entry, and obtain a secure delivery key.

STEP 01- ACCOUNT REGISTRATION

Sign up & create your account

Open SCHMA Studio and register using your work email or OAuth with Google or GitHub. Complete your profile credentials to gain secure access to your organization dashboard.

Once registered, you can create new isolated workspaces or be invited to existing team workspaces with full role-based access control out of the box.

Note: If email verification is enabled on your domain, confirm the verification link sent to your inbox before proceeding.
SCHMA Studio signup and account registration screen
SCHMA Studio database connection modal showing PostgreSQL connection URI input and migrations
STEP 02- DATABASE CONNECTION

Connect PostgreSQL & run migrations

Upon entering your workspace, open the Database Onboarding flow (also accessible in Settings → Database). Select your provider—Supabase, Neon, Railway, AWS RDS, or Custom PostgreSQL—and paste your connection URI.

Click Test Connection to verify connectivity, then click Connect & Run Migrations. SCHMA automatically creates its six isolated schma_* tables in your database to manage content types, entries, version history, media assets, API keys, and webhooks.

Customer-Owned Database Architecture:SCHMA stores schema definitions as structured JSON in your database. It never runs risky runtime DDL or alters tables outside the protected schma_* namespace.
STEP 03CONTENT MODELING

Create a content model

Navigate to Schemas in the Studio sidebar and click + New Schema. A content model defines the validated structure and field types of your entries.

Select the verified Blog Post starter template or build visually using drag-and-drop fields. The Blog Post model includes:

  • Title: String field (Required) — Article headline
  • Slug: String field (Required) — URL pathname identifier
  • Content: Rich Text field — Markdown or formatted HTML body
  • Featured: Boolean field — Toggle for promoted articles

SCHMA supports 11 visual field types in Studio including strings, numbers, dates, references, nested objects, media image references, and modular block layouts. Click Save Schema to persist your model.

SCHMA Schema Builder showing visual content modeling and field configurations
SCHMA Content Studio editorial interface and publishing workflow
STEP 04ENTRY PUBLICATION

Create and publish your first entry

Navigate to Content → Blog Post in the sidebar and click + New Entry. Fill in your post title (e.g. Welcome to Our New Website), slug, and article body.

Draft versus Published: While you type, SCHMA continuously autosaves your work as a Draft. Drafts reside safely in your PostgreSQL database (data_json), allowing you to preview and iterate privately.

When ready, click Publish. SCHMA executes a publication validation check, sets the entry status to published, timestamps the release date, and creates an immutable snapshot in published_data_json. Only published entries are queryable via the production Delivery API.

STEP 05AUTHENTICATION & CREDENTIALS

Create a Delivery API key

In the Studio, open Settings → API Keys and click Create API Key. Enter a label (e.g. Production Website) and select the delivery (read-only) scope.

Copy your newly generated key (schma_live_...). You will need this key and your workspace slug to execute your first delivery query.

Security Requirement

Treat your delivery key as a secret. Never commit keys to public GitHub repositories or expose them directly in browser-bundled client JavaScript. Store them securely in server-side environment variables (e.g. .env.local on Next.js or Astro servers).

SCHMA API Keys management interface showing scoped keys and tokens
THE TECHNICAL PAYOFF

Your first API request.

Execute this query in your terminal or server-side application to retrieve your published entry directly from your PostgreSQL database through SCHMA's edge Delivery API.

curl -X GET \
  "https://api.schma.dev/v1/delivery/entries?type=post&limit=10" \
  -H "Authorization: Bearer YOUR_DELIVERY_API_KEY" \
  -H "x-tenant-slug: YOUR_WORKSPACE_SLUG" \
  -H "x-environment: production"
YOUR_DELIVERY_API_KEY: Replace with your scoped delivery key from Step 5.YOUR_WORKSPACE_SLUG: Replace with your workspace slug (e.g. acme-media).type=post: Matches the model slug saved in Step 3.
EXPECTED OUTPUT

Confirm success.

A successful request returns an HTTP 200 OK with an entries array populated with your published content, plus edge caching and quota tracking headers.

RESPONSE BODY · JSON200 OK
{
  "entries": [
    {
      "id": "7b8f9a23-45cd-48e1-901a-82c5f1a94e32",
      "typeId": "e2a1b4c3-56df-49a0-812b-73d4e0a81f54",
      "dataJson": {
        "title": "Welcome to Our New Website",
        "slug": "welcome-to-our-new-website",
        "content": "<p>Content created in SCHMA Studio and stored in our own PostgreSQL database.</p>",
        "featured": true
      },
      "locale": "en-US",
      "status": "published",
      "publishedAt": "2026-10-22T08:15:00.000Z"
    }
  ],
  "meta": {
    "limit": 10,
    "offset": 0,
    "count": 1,
    "total": 1
  }
}
EDGE HEADERS RETURNED
Cache-Control:public, max-age=10, s-maxage=60, stale-while-revalidate=300
X-Quota-Remaining:9999 / 10000 (Free Tier)
X-RateLimit-Remaining:59 / 60 req/min
X-Response-Time:~24ms (Edge Cache Hit)
COMMON RESOLUTIONS

Troubleshooting common issues.

If your request does not succeed on the first try, use these verified diagnostic steps to resolve the issue quickly.

Need additional assistance? Read our dedicated Knowledge Base & Troubleshooting guide →
EXPAND YOUR STACK

Choose your next step.

Now that your database is connected and your delivery pipeline is verified, explore our official SDKs, AI coding assistant integrations, and architecture references.

Ready to build with your own database?

Create a free workspace, connect your PostgreSQL instance, and design structured content with complete data ownership.