Skip to content

api.sb

api.sb is the one API behind StartupBuilder, serving every Noun, Verb, and record.

api.sb is the one API behind StartupBuilder, serving every Noun, Verb and record. Every Builder, App and Agent calls it; none keeps a backend of its own.

What it does

Every Startup has a namespace on api.sb, named by its Domain: https://api.sb/acme.com. Each Noun is a collection under it, and each Verb a route.

The namespace serves the Startup's own Workers, its test environment and its previews. Its Customers never see it: they call the Startup's Publication at acme.com/api, which serves the same Verbs under the Startup's Brand.

Every write runs as an Action, attributed to its caller, and emits an Event. A caller picks a Mode per call: try, send or do. Every response is one envelope: the record under its Noun's name, links to read next, and the Verbs the caller may run.

Before any call runs, api.sb checks the key, Permissions, Entitlements, Mandates and Limits. The key's prefix picks the environment: sk_test_ or sk_live_.

Every Capability behind api.sb keeps one contract, so learning one teaches the rest:

RuleWhat it means
One Noun familyA Capability exposes Nouns and their Verbs, called as Noun.verb in a Mode.
Every call is an ActionEach Action records who acted, for whom, through which Interface and under which Version.
Checked before, metered afterLimits are checked before a call runs, and a Meter counts it after, exactly once.
The upstream is dataWho performs a Verb is a ranked row behind it. Swapping the upstream changes the row, never the call.
Records stay homeEvery record lives in db.sb, in the namespace of the Startup that made it.
Nothing is lostA delete is a marker, and every past state reads back.
Test and LiveEvery Verb runs in both environments, with separate keys and records.
Every choice is testableEach upstream, model and default is a row a Flag can split, so two run as variants against a Metric.

One call reads the same in every Interface:

Text
Show me the last 20 customers.

Built from

Surfaces

  • The HTTP API at https://api.sb/{namespace}, with an OpenAPI 3.1 document generated for each Startup.
  • The MCP server at https://api.sb/mcp, with three Tools: search, fetch and do.
  • The startup-builder package: the typed $ client for TypeScript, and the CLI.
  • Signed webhooks, one delivery per Event, through each Watch.

Next steps

  • The API: the seven parts of every API, its two kinds of caller, and StartupBuilder built from the same parts.
  • API, SDK, CLI and MCP: the same calls in each Interface.
  • db.sb: where every record and Event lives.
  • Platform: every Capability api.sb serves.