{"openapi":"3.1.0","info":{"title":"StartupBuilder API","version":"2026-10-22.6eb5f478","description":"Ideate, build, launch, operate and grow startups: one API for every startup in the Studio and everything they do. Append @<point in time> to any path. Append @ to the last path segment to see it as of then: @idea|launch|traction|pmf (that Startup's stage), @2026-04-06, @2026-04-06T12:00:00Z, @1780358400 (unix), @v3 (this Thing after its 3rd Event). ?asOf= also works. It sticks as you click.\n\n## Writing\nA Verb is a URL: /{ns}/{collection}/{id}/{verb}, /{ns}/{collection}/{verb} or /{ns}/{verb} (the platform namespace drops its segment: /startups/create). GET it to preview its input and Modes; POST it, the input as a JSON body and an Idempotency-Key header, to run it. Every Verb POST that is not in try Mode needs that header (a replay with the same key returns the same Action). Prefer: mode=try previews: it runs once and stores nothing (no key needed); mode=send runs it durably where the Verb takes send: the Pending Action answers at once, to watch. Records take POST /{ns}/{collection} (create), PATCH / PUT / DELETE /{ns}/{collection}/{id}, POST /{ns}/$batch (one change set) and POST /{ns}/nouns (define a Noun; the same define is the Verb /{ns}/nouns/create), a JSON body with no Idempotency-Key header (they need none); each takes Prefer: mode=try, a preview that commits nothing (its answer says mode: try, stored: false; a write with no try Mode yet answers 400 bad_mode, never commits), and every write answer names its mode and whether it stored anything. Every write needs a token with sb:do; every one is versioned and revertible (…/revert). The records surface alone: https://api.sb/openapi/records.json."},"servers":[{"url":"https://api.sb"}],"paths":{"/":{"get":{"summary":"Home: api.sb, the platform namespace: the portfolio of startups.studio (the Studio, a tenant) and the Studios it holds","parameters":[],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/startups":{"get":{"summary":"Every Startup","parameters":[],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Create a Startup in your Studio, /{studio}/{slug} (a member of the Studio); you fill its owner Role. A bare Domain ({slug} alone) is 403 domain_claim_requires_proof unless RECORDS_DOMAIN_CLAIMS allows it, or the Studio's Owner names a Domain the Studio holds (its own Startup, the Domain assigned to it). Prefer: mode=try previews it: the checks do runs, then the would-be record or results and `would` (its $id, the fields that change) and `unchecked`; nothing is committed and no Action is kept (mode: try, stored: false). mode=send is 400 bad_mode","security":[{"idorgai":["sb:do"]}],"parameters":[{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ studio: \"startups.new\", slug: \"acme\", name? }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}":{"get":{"summary":"One Startup (or a Studio: a Startup whose Product is a Portfolio of Startups) at its home Domain: summary, next steps, relationships. Another Domain of the same Thing renders it in place (links.canonical names this address)","parameters":[{"name":"domain","in":"path","required":true,"description":"its home Domain, e.g. barcoding.dev or demo.startups.studio (a dot marks a Domain)","schema":{"type":"string"}}],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}},"patch":{"summary":"Its settings (owner, Live only): name, collections.<name>.isNamespace (the Tenants) and .scope (shared, provider or customer: where a Primitive writing it keeps its records, #416), settings.<NAME> (the live gate: { on, gates: [\"<verb>\" | \"<collection>/<verb>\"] }, null drops it), settings.DOMAIN_EXPIRY_WINDOW ({ days }: a Domain within it of its expiry reads expiring; unset by default), settings.DECLARED_EVENTS ({ \"<name as captured>\": \"<Event, Noun.verb>\" }: the posthog-js names a Metric on that Event counts). Prefer: mode=try previews it: the checks do runs, then the would-be record or results and `would` (its $id, the fields that change) and `unchecked`; nothing is committed and no Action is kept (mode: try, stored: false). mode=send is 400 bad_mode","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ name?, collections?: { customers: { isNamespace: true } }, settings?: { INVEST_LIVE: { on: false, gates: [\"investments/sign\"] } } }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}/{area}":{"get":{"summary":"A Startup's area: selling, market, money, goals, team, web, legal, ops, portfolio, or metrics","parameters":[{"name":"domain","in":"path","required":true,"description":"home Domain","schema":{"type":"string"}},{"name":"area","in":"path","required":true,"description":"area slug","schema":{"type":"string"}}],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/{domain}/{collection}":{"get":{"summary":"A Startup's (or a Studio's) collection: sites, pages, content, files, implementations, evaluators, outcome-contracts, changes, versions, problems, flags, interviews, …","parameters":[{"name":"domain","in":"path","required":true,"description":"home Domain","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"description":"collection name","schema":{"type":"string"}}],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Create a record; $slug names it (else its id is its slug). Prefer: mode=try previews it: the checks do runs, then the would-be record or results and `would` (its $id, the fields that change) and `unchecked`; nothing is committed and no Action is kept (mode: try, stored: false). mode=send is 400 bad_mode","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"description":"a Collection name: lower-case, no dot; not one of api.sb's typed Collections (products, offers, pages, …)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"the record's fields, and $slug?","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}/{collection}/{slug}":{"get":{"summary":"One Thing","parameters":[{"name":"domain","in":"path","required":true,"description":"home Domain","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"description":"collection name","schema":{"type":"string"}},{"name":"slug","in":"path","required":true,"description":"the Thing's slug or id","schema":{"type":"string"}}],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Where {id} names a static Verb of the Collection's Noun (#419: a slug never takes a Verb's name), A static Verb a Noun's row declares with a Function (#390: contact-points/findEmail, contact-points/verifyEmail, prospects/search, and the lookups): the Verb executor runs it. Idempotency-Key outside try (a replay is the same Action and answers the same result, calling no upstream again); Prefer: mode=try|send|do. 201 Done, 202 Pending, 403 born Refused (action.reason: NoPermission, LiveOnly, TryOnly), 502 Failed; the answer is { action, result }","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"description":"a Collection name: lower-case, no dot; not one of api.sb's typed Collections (products, offers, pages, …)","schema":{"type":"string"}},{"name":"slug","in":"path","required":true,"description":"the record's slug, or its id","schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"the Verb's input","content":{"application/json":{"schema":{"type":"object"}}}}},"patch":{"summary":"Merge fields. If-Match: \"<version>\" → 412 version_mismatch when stale. Prefer: mode=try previews it: the checks do runs, then the would-be record or results and `would` (its $id, the fields that change) and `unchecked`; nothing is committed and no Action is kept (mode: try, stored: false). mode=send is 400 bad_mode","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"description":"a Collection name: lower-case, no dot; not one of api.sb's typed Collections (products, offers, pages, …)","schema":{"type":"string"}},{"name":"slug","in":"path","required":true,"description":"the record's slug, or its id","schema":{"type":"string"}},{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"fields to set","content":{"application/json":{"schema":{"type":"object"}}}}},"put":{"summary":"Replace (creates at this slug when missing; If-None-Match: * = create only). Prefer: mode=try previews it: the checks do runs, then the would-be record or results and `would` (its $id, the fields that change) and `unchecked`; nothing is committed and no Action is kept (mode: try, stored: false). mode=send is 400 bad_mode","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"description":"a Collection name: lower-case, no dot; not one of api.sb's typed Collections (products, offers, pages, …)","schema":{"type":"string"}},{"name":"slug","in":"path","required":true,"description":"the record's slug, or its id","schema":{"type":"string"}},{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"the whole record","content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"summary":"Delete: a tombstone, history kept; restore with POST …/{id}/revert {to}. Prefer: mode=try previews it: the checks do runs, then the would-be record or results and `would` (its $id, the fields that change) and `unchecked`; nothing is committed and no Action is kept (mode: try, stored: false). mode=send is 400 bad_mode","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"description":"a Collection name: lower-case, no dot; not one of api.sb's typed Collections (products, offers, pages, …)","schema":{"type":"string"}},{"name":"slug","in":"path","required":true,"description":"the record's slug, or its id","schema":{"type":"string"}},{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/startups/{domain}":{"get":{"summary":"An alias of /{domain}: the same page in place (200, never a redirect), links.self and links.canonical the /{domain} $id; the rest of the path, the query and @ carry","parameters":[{"name":"domain","in":"path","required":true,"description":"home Domain","schema":{"type":"string"}}],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/{collection}":{"get":{"summary":"Every Thing of a Noun, across the portfolio","parameters":[{"name":"collection","in":"path","required":true,"description":"sites, pages, content, files, implementations, evaluators, outcome-contracts, changes, versions, problems, flags, interviews, lenses, channels, threads, deals, quotes, meetings, keywords, referrals, handles, posts, mentions, reviews, gatherings, registrations, forms, periods, tools, memories, skills, projects, comments, decisions, parties, purposes, consents, suppressions, trademarks, patents, ideas, settings, studios, companies, startups, ventures, brands, products, systems, instances, interfaces, routes, standards, offers, partners, agreements, credentials, grants, reserved-acts, attestations, coverages, accounts, entries, transactions, invoices, subscriptions, orders, rails, policies, shares, instruments, holders, goals, key-results, metrics, hypotheses, evidence, experiments, visitors, acquisitions, contacts, prospects, leads, organizations, customers, icps, personas, stories, sources, campaigns, ads, funnels, sequences, enrollments, messages, conversations, mailboxes, templates, documents, roles, teams, permissions, entitlements, limits, mandates, workers, domains, resources, integrations, mappings, publications, errors, monitors, actions, events, relationships, workflows, triggers, collections, tenants, listings","schema":{"type":"string"}}],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/search":{"get":{"summary":"Search names and descriptions","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/nouns/{noun}":{"get":{"summary":"A Noun's page: its definition and avoid line from the canonical registry, its Verbs, and its word at /context/{word}","parameters":[{"name":"noun","in":"path","required":true,"description":"e.g. Startup, Offer","schema":{"type":"string"}}],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/context":{"get":{"summary":"The glossary, from the canonical registry: the map, its areas (?area=), search (?q=); Markdown with ?md (CONTEXT-MAP.md)","parameters":[],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user; Markdown when asked (?md or Accept: text/markdown)","content":{"application/json":{"schema":{"type":"object"}},"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/context/{word}":{"get":{"summary":"One word: definition, Avoid words, rulings (date, conviction, supersedes), proposals, related words; an avoid word renders the word to use in place. Markdown: ?md or {word}.md","parameters":[{"name":"word","in":"path","required":true,"description":"e.g. Offer, Startup.launch, Ticket (an avoid word)","schema":{"type":"string"}}],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user; Markdown when asked (?md or Accept: text/markdown)","content":{"application/json":{"schema":{"type":"object"}},"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/{domain}/context":{"get":{"summary":"A Startup's own context: its words and refinements (they win), what its Studio passes down, and canon as it pins it","parameters":[{"name":"domain","in":"path","required":true,"description":"e.g. barcoding.dev","schema":{"type":"string"}}],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user; Markdown when asked (?md or Accept: text/markdown)","content":{"application/json":{"schema":{"type":"object"}},"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/{domain}/context/{word}":{"get":{"summary":"One word as that Startup means it","parameters":[{"name":"domain","in":"path","required":true,"description":"e.g. barcoding.dev","schema":{"type":"string"}},{"name":"word","in":"path","required":true,"description":"e.g. Startup","schema":{"type":"string"}}],"responses":{"200":{"description":"An api.sb response: api, links, one or more data objects keyed by Noun, relationships, discover, user; Markdown when asked (?md or Accept: text/markdown)","content":{"application/json":{"schema":{"type":"object"}},"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/llms.txt":{"get":{"summary":"llms.txt: the conventions, then every word from the registry","parameters":[],"responses":{"200":{"description":"Markdown: the conventions, then every word from the registry","content":{"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"Nothing there (type: EMPTY)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/studios":{"post":{"summary":"Create a builder's Studio (the Studio's Owner only): its Domain, its owners. Prefer: mode=try previews it: the checks do runs, then the would-be record or results and `would` (its $id, the fields that change) and `unchecked`; nothing is committed and no Action is kept (mode: try, stored: false). mode=send is 400 bad_mode","security":[{"idorgai":["sb:do"]}],"parameters":[{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ slug: \"startups.new\", name?, owners: [\"human:user_…\"] }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/startups/create":{"get":{"summary":"Preview Startup.create: its input, its Modes and how to POST it; nothing runs","parameters":[{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"The preview","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Create a Startup: the Verb the home's “Create a Startup” link names (the same mint as POST /startups, as an Action). Modes: do, try (default do)","description":"Create a Startup: in your builder’s Studio (`studio`), or a bare Domain (`slug` a Domain, while Domain claims are open). Its Action is the Studio’s","security":[{"idorgai":["sb:do"]}],"parameters":[{"$ref":"#/components/parameters/Environment"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/Prefer"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","description":"its name: a-z 0-9 - in a Studio (`kennel`), or a Domain for a bare-Domain Startup (`kennel.com`)"},"studio":{"type":"string","description":"the builder’s Studio it is created in, by its Domain (`<your Studio>`: one whose member Role or above you fill; GET this door signed in names yours); none: a bare Domain"},"name":{"type":"string","description":"its display name (default: the slug)"}},"required":["slug"]}}}},"responses":{"200":{"description":"try Mode: what it would do; nothing stored","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Done: { action, result }","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Pending: { action }, to poll","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}},"x-verb":"Startup.create"}},"/{domain}/startups":{"get":{"summary":"The Studio's Startups","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Studio's Domain","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/{domain}/revert":{"get":{"summary":"Its door: its input, its Modes and where its versions are (#700)","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Undo a seq range (a change set's pointer) as a new commit; 409 changed_since unless force. Or { to }: the Startup Thing back to a version ?versions lists (its owner, in Live). Prefer: mode=try previews it: the checks do runs, then `would` (the version restored, the fields that change, the Things restored or deleted, the Relationships) and `unchecked`; nothing is committed and no Action is kept (mode: try, stored: false). mode=send is 400 bad_mode","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ seq_first, seq_last, force? } | { to }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}/{collection}/{slug}/revert":{"get":{"summary":"Its door: its input, its Modes and where its versions are (#700)","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"description":"a Collection name: lower-case, no dot; not one of api.sb's typed Collections (products, offers, pages, …)","schema":{"type":"string"}},{"name":"slug","in":"path","required":true,"description":"the record's slug, or its id","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Back to version `to` as a new version (restores a deleted record). Prefer: mode=try previews it: the checks do runs, then `would` (the version restored, the fields that change, the Things restored or deleted, the Relationships) and `unchecked`; nothing is committed and no Action is kept (mode: try, stored: false). mode=send is 400 bad_mode","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"description":"a Collection name: lower-case, no dot; not one of api.sb's typed Collections (products, offers, pages, …)","schema":{"type":"string"}},{"name":"slug","in":"path","required":true,"description":"the record's slug, or its id","schema":{"type":"string"}},{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ to }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}/{collection}/{slug}/{verb}":{"post":{"summary":"A gated Verb: one that moves money or does legal work, or one a Setting names. Test and Dev: 202, test mode. Live: 202 when every Setting gating it is on, else 403 live_gate_off (kept as a Refused Action)","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"description":"a Collection name: lower-case, no dot; not one of api.sb's typed Collections (products, offers, pages, …)","schema":{"type":"string"}},{"name":"slug","in":"path","required":true,"description":"the record's slug, or its id","schema":{"type":"string"}},{"name":"verb","in":"path","required":true,"description":"sign, charge, …","schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ input? }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}/$batch":{"get":{"summary":"Its door (#760): each op's shape, its Modes and who may; nothing runs","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"One change set: every op commits together or none does. Prefer: mode=try previews it: the checks do runs, then the would-be record or results and `would` (its $id, the fields that change) and `unchecked`; nothing is committed and no Action is kept (mode: try, stored: false). mode=send is 400 bad_mode","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ ops: [{ op: create|update|replace|delete, collection, id?, data?, ifVersion? } | { op: emit, event, data?, object? }] }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}/versions":{"get":{"summary":"The change feed: every event after ?since=<seq>, oldest first; links.next pages, links.poll resumes","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/{domain}/actions":{"get":{"summary":"Its Actions, newest first: each change set with its Verb (Noun.verb, never an event), object, status, input, changes (field names), by, at and revert link; ?limit= (at most 100), links.next pages on (?before=<seq>)","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/{domain}/actions/{action}":{"get":{"summary":"One change set by its Action id","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"action","in":"path","required":true,"description":"act_…","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/{domain}/actions/{action}/revert":{"get":{"summary":"Its door: its input and its Modes (#700)","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"action","in":"path","required":true,"description":"act_…","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Undo one change set. Prefer: mode=try previews it: the checks do runs, then `would` (the version restored, the fields that change, the Things restored or deleted, the Relationships) and `unchecked`; nothing is committed and no Action is kept (mode: try, stored: false). mode=send is 400 bad_mode","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"action","in":"path","required":true,"description":"act_…","schema":{"type":"string"}},{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ force? }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}/nouns":{"get":{"summary":"The Startup's own Nouns, and the platform Nouns (api.sb's) they inherit","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Define a Noun (admin): its Collection's records are then stored as it and checked against its fields. A platform Noun's name extends it for this Startup only (its fields join the base Noun's). Prefer: mode=try previews it: the checks do runs, then the would-be record or results and `would` (its $id, the fields that change) and `unchecked`; nothing is committed and no Action is kept (mode: try, stored: false). mode=send is 400 bad_mode","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ name, supertypes?: [Noun], collection?, fields: { <key>: { type: text|number|yesNo, required?, indexed? } } }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/api.sb/nouns":{"get":{"summary":"The platform's Nouns: the ones api.sb defines (every Startup's base Nouns) and the compiled ones","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Define a platform Noun (the Studio's Owner): a base Noun of every Startup","security":[{"idorgai":["sb:do"]}],"parameters":[{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ name, supertypes?: [Noun], collection?, fields: { <key>: { type: text|number|yesNo, required?, indexed? } } }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/api.sb/nouns/{noun}":{"get":{"summary":"One platform Noun","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"noun","in":"path","required":true,"description":"a Noun name, PascalCase","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/{domain}/nouns/{noun}":{"get":{"summary":"One Noun: its own or a platform one, with what it inherits, every field its records take, and its history (head and published Versions; a platform Noun's: this Startup's overlay)","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"noun","in":"path","required":true,"description":"a Noun name, PascalCase","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Edit it by Ops on its part paths (admin): one new Version, rebased onto a head that moved unless it overlaps (409 version_conflict); 422 ops_rejected names the Op; 200 UNCHANGED writes none. On a platform Noun: this Startup's overlay on it (its Variant). Prefer: mode=try previews it (#912): the same checks, then the definition as the Ops leave it (`noun`), the Version's `changes` and `major`, and `would` (its $id, the Version it would be); nothing is committed and no Action is kept (mode: try, stored: false)","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"noun","in":"path","required":true,"description":"a Noun name, PascalCase","schema":{"type":"string"}},{"$ref":"#/components/parameters/Prefer"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ baseVersionId?, ops: [{ op: set|add|remove|rename|move, path, value?, to?, index? }], summary? }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}/nouns/{noun}/versions":{"get":{"summary":"Its Versions, newest first (?run= a Run's, ?after= those after one: oldest first)","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"noun","in":"path","required":true,"description":"a Noun name, PascalCase","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/{domain}/nouns/{noun}/versions/{version}":{"get":{"summary":"One Version","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"noun","in":"path","required":true,"description":"a Noun name, PascalCase","schema":{"type":"string"}},{"name":"version","in":"path","required":true,"description":"a Version's id","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/{domain}/nouns/{noun}/publish":{"post":{"summary":"Move its published pointer to a Version (admin); the head stays","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"noun","in":"path","required":true,"description":"a Noun name, PascalCase","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ version }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}/nouns/{noun}/revert":{"post":{"summary":"Revert to a Version (admin): a new Version equal to it","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"noun","in":"path","required":true,"description":"a Noun name, PascalCase","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ to }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}/definition":{"get":{"summary":"The Startup's Definition (startups.new's StartupDefinition): its head and published Versions","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Its first Version, seeded by the system (admin)","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ definition }","content":{"application/json":{"schema":{"type":"object"}}}}},"patch":{"summary":"A Version (admin): startups.new's VersionStore.commit","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ baseVersionId, ops | definition, author?, source?, runId?, messageId?, summary?, pivot?: { summary? }, rebase?: false }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}/definition/versions":{"get":{"summary":"Its Versions, newest first (?run= a Run's, ?after= those after one: oldest first)","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/{domain}/definition/versions/{version}":{"get":{"summary":"One Version","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"version","in":"path","required":true,"description":"a Version's id","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/{domain}/definition/publish":{"post":{"summary":"Move its published pointer (admin)","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ version }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}/definition/revert":{"post":{"summary":"Revert to a Version (admin): a new Version equal to it","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ to }","content":{"application/json":{"schema":{"type":"object"}}}}}},"/{domain}/roles":{"get":{"summary":"The Roles (owner, admin, member, viewer) and who fills each","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/{domain}/roles/{role}":{"get":{"summary":"One Role","security":[{"idorgai":["sb:read"]},{}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"role","in":"path","required":true,"description":"owner | admin | member | viewer","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Fill or vacate it: owner any Role, admin member and viewer","security":[{"idorgai":["sb:do"]}],"parameters":[{"name":"domain","in":"path","required":true,"description":"the Startup: its home Domain (acme.com)","schema":{"type":"string"}},{"name":"role","in":"path","required":true,"description":"owner | admin | member | viewer","schema":{"type":"string"}},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"OK (application/json)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"description":"{ add?: [id.org.ai Person id (human:user_…)], remove?: [...] }","content":{"application/json":{"schema":{"type":"object"}}}}}}},"components":{"securitySchemes":{"idorgai":{"type":"oauth2","description":"id.org.ai (OAuth 2.1, PKCE S256). Ask for resource=https://api.sb (RFC 8707): the access token is an RFC 9068 at+jwt with aud https://api.sb. sb:do includes sb:read. client_credentials cannot carry the sb scopes (they need a Person's consent).","flows":{"authorizationCode":{"authorizationUrl":"https://id.org.ai/oauth/authorize","tokenUrl":"https://id.org.ai/oauth/token","refreshUrl":"https://id.org.ai/oauth/token","scopes":{"sb:read":"read the Startups whose Roles you fill","sb:do":"write them (includes sb:read)"}}}}},"parameters":{"Environment":{"name":"sb-environment","in":"header","required":false,"description":"live (default), test or dev","schema":{"type":"string","enum":["live","test","dev"]}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Required on a Verb POST outside try Mode (400 idempotency_key_required): a unique string, 1 to 200 visible ASCII characters. A replay with the same key returns the same Action and calls nothing again","schema":{"type":"string","pattern":"^[\\x21-\\x7e]{1,200}$"}},"Prefer":{"name":"Prefer","in":"header","required":false,"description":"The Mode a Verb or a records write runs in: mode=try previews (runs once, stores nothing, needs no Idempotency-Key; the answer says mode: try, stored: false), mode=send runs it durably where the Verb takes send (the Pending Action answers at once; a records write refuses it, 400 bad_mode), mode=do runs it (the default for most Verbs and every records write)","schema":{"type":"string","enum":["mode=try","mode=send","mode=do"]}}},"responses":{"Error":{"description":"BLOCKED: { type, error: { status, code, message, … } }","content":{"application/json":{"schema":{"type":"object"}}}}}},"x-error-codes":{"unauthenticated":"401: no credential (a read with none is answered only where the namespace's READ Setting is public; `read` says which it is)","invalid_token":"401: the credential was refused (expired, wrong audience, an id_token, …)","insufficient_scope":"403: the token lacks sb:read (reads) or sb:do (writes)","person_required":"403: records act for a Person","tenant_exists":"409: a Tenant name once used stays used (its namespace keeps its Roles and data); restore the old one, or pick another","estate_unavailable":"503: the registrar sync could not be read; claims fail closed","domain_claim_requires_proof":"403: a bare-Domain Startup awaits proof of control (RECORDS_DOMAIN_CLAIMS); create it in your Studio. The Studio's Owner creates one for a Domain the Studio holds","studio_owner_required":"403: only the Studio's Owner makes a builder's Studio","role_required":"403: the caller fills a Role too low for this (a revert that touches the Roles, the Startup Thing or a Tenant needs the owner)","not_found":"404: nothing there you may see; a Startup that does not exist and one you fill no Role on answer alike (a read: the pages’ 404)","not_claimable":"400: not a Domain (Public Suffix List), or the Studio’s, its estate’s, or a name api.sb serves","no_tenants":"404: the Startup declares no Collection as a namespace boundary","method_not_allowed":"405","not_a_verb":"405","not_supported":"405","bad_input":"400","bad_query":"400","bad_address":"400","bad_if_match":"400","bad_environment":"400","reserved_field":"400","live_only":"400","already_exists":"409","slug_taken":"409","startup_exists":"409","changed_since":"409: a revert over later changes (send force)","nothing_to_revert":"409: a revert whose events hold nothing to undo (no Thing, no Relationship): nothing was reverted","not_revertible":"400: a Startup is never reverted out of existence (Startup.revert {to: 0}, or an undo of the change set that created it): Startup.shutDown ends one","last_owner":"409","version_mismatch":"412: If-Match (or ifVersion) is stale; the ETag header carries the current version","too_large":"413","quota_exceeded":"429: Startups per Person per Studio, Tenants per Startup","rate_limited":"429: writes per minute per Person in one namespace (each write of a batch counts); Retry-After","write_refused":"422: the engine refused one write of the batch; nothing committed","derived_field":"422: a Key Result's progress or a Metric's value is read, never written (record the Events instead)","not_built":"501","engine_lacks_reads":"501: the bound engine predates list/changes","engine_failed":"502","engine_unavailable":"503: no engine bound, or the owner DO was cold or reset (retry-after)"}}