Skip to content

Quickstart

This guide takes you from nothing to an entitlement decision in your own code. You set everything up in the Console, then ask the API one question: how many projects may this Customer create?

You need: a GitHub or Google account, and Go 1.23+ or Node.js 20.3+ for step 7.

Open console.seal0.app and sign in with GitHub or Google. Your email address must be verified there.

  1. Name your Account, for example Acme.
  2. Choose New project, name it Web App with slug web-app.

Every project gets a Development and a Production environment, which share nothing. Use Development for this guide.

Open Features, choose Web App · Development, then New feature twice:

Key Name Type
max_projects Projects Number
sso Single sign-on Boolean

Keys are permanent. A number is a whole number up to 2^53−1, or unlimited.

  1. Open Plans, choose New plan: key pro, name Pro.
  2. Choose Start a draft. Include max_projects with value 10 and sso with value On.
  3. Save draft, then Publish.

This creates version 1. Published versions never change: to change the plan, publish version 2 and move subscriptions to it when you choose.

Open API keys, choose New API key, name it quickstart and pick the Evaluate scope. It can only evaluate, which is all an application server needs. Copy the key: it starts with s0_dev_ and is shown only once.

Terminal window
export SEAL0_API_KEY='<API_KEY>'

Keep keys on your server. Never put them in browser or mobile code.

Seal0 knows Customers only by your own ID for them, with no names or emails. Open Customers, look up cus_test_0001, choose Register Customer, then Assign subscription: plan pro, status Active. The inspector below now shows max_projects = 10 from the plan and sso = On.

Terminal window
npm install @seal0/sdk
import { Seal0, limit } from "@seal0/sdk";
const seal0 = new Seal0({ apiKey: process.env.SEAL0_API_KEY! });
const { entitlement } = await seal0.evaluate("cus_test_0001", "max_projects");
const l = limit(entitlement.value); // { unlimited: false, n: 10 }
const mayCreate = l !== undefined && (l.unlimited || currentProjects < l.n);

The response:

{
"customer_id": "cus_test_0001",
"evaluated_at": "2026-11-17T09:00:00Z",
"subscription": { "id": "…", "status": "active", "plan": { "key": "pro", "version": 1 } },
"entitlement": {
"feature_key": "max_projects", "feature_type": "number", "granted": true, "value": 10,
"source": "plan", "reason": "included_in_plan", "override_id": null, "valid_until": null, "usage": null
}
}
  • Override: on the Customer page, add an override max_projects = unlimited. Evaluate again: source becomes override. Overrides win over the plan, but never over an ineligible subscription. See Overrides.
  • Lifecycle: edit the subscription to canceled with a cancel time in the past. Evaluation now returns granted: false with reason subscription_canceled. A missing entitlement is a normal 200, not an error. See Subscriptions.
  • Everything at once: seal0.evaluateAll("cus_test_0001"), or POST /v1/entitlements/evaluate-all.
  • Automate setup: a Full-scope key manages features, plans and Customers through the same API, so your billing code can assign subscriptions when payments succeed. See Automating setup.