Launch internal API
Internal only
These routes belong to spark_launch and are reached only through the backend. The browser calls /launch/* (client) or /system/launch/* (staff) on the backend; the backend checks the session and permission, then forwards to the internal path below with a service token. Every error answers { reason }; anything unmatched under /internal answers 404 { reason: "not_found" }.
Mounts
| Browser path (backend) | Internal mount | Scope |
|---|---|---|
/launch/* | /internal/launch | org (the token's organization only) |
/launch/content/* | /internal/content | either |
/system/launch/* | /internal/system/launches | system (staff) |
/system/launch/content/* | /internal/system/content | system |
| (service only) | /internal/launches/:orgId/readiness | spark-flows, or backend system scope |
| (none) | /health | public liveness check, no data |
CELL below stands for /cells/:criterion/:target.
Client routes (org scope)
| Method & path | Purpose | Permission |
|---|---|---|
GET /view | The full readiness view: stages, cells, guides, history, readiness summary | launch.read |
GET /setup | Setup state and proposed primary assets (rolling out) | launch.read |
PUT /setup | Save country, business type, platforms, primary assets (rolling out) | launch.write |
POST CELL/claim | "I've done it — check now": re-checks api cells at once, sends others to Spark review | launch.write |
POST CELL/assist | "Ask Spark to do it" | launch.write |
GET /identity · PUT /identity | Read or save the business identity | launch.read · launch.write |
POST /identity/draft-descriptions | AI draft of a description for a platform and language | launch.write |
GET /brand-kit · PUT /brand-kit | Read or save the brand kit | launch.read · launch.write |
GET /brand-kit/export | Logo or cover exported in a platform's size | launch.read |
GET /documents | List verification documents | verification.documents (else 404) |
POST /documents | Upload a document (consent required) | verification.documents + launch.write |
GET /documents/:id/download | Download (decrypts, writes an access-log entry) | verification.documents |
DELETE /documents/:id | Delete a document | verification.documents + launch.write |
Staff routes (system scope)
| Method & path | Purpose |
|---|---|
GET / | All-clients overview list, with filters |
GET /summary | Totals and most common missing criteria across clients |
POST / | Start a launch for an organization |
POST /ensure | Create a launch if none exists (idempotent; used when a subscription becomes active) (rolling out) |
GET /:orgId/view | The same view as the client, plus staff-only blocks |
GET /:orgId/assets | Connected assets to choose primary assets from |
PUT /:orgId/settings | Change platforms, primary assets, business type, owner |
POST /:orgId + CELL/confirm | Set a cell's status; done needs an evidence file |
POST /:orgId + CELL/note | Add a staff-only note |
POST /:orgId/check-now | Run all api checks now |
POST /:orgId/flows-override | Record (or clear) a written reason to let flows run before the launch is ready |
POST /:orgId/offboard | Mark the client offboarded (starts the 90-day document retention clock) |
/:orgId/identity, /:orgId/brand-kit, /:orgId/documents… | Same identity routes as the client |
GET /:orgId/documents/access-log | Document access log (system only) |
POST /:orgId/evidence | Upload a staff evidence file (system only) |
Content routes
| Method & path | Purpose | Scope |
|---|---|---|
GET /languages | Supported languages | either |
POST /resolve | Resolve content keys to text in a language | either |
POST /ui | Translate a UI message catalogue | org |
GET /pending | Texts awaiting review, with the English text | system |
PUT /:key/:lang | Mark a text reviewed (or correct it) | system |
Readiness for flows
GET /internal/launches/:orgId/readiness returns a ReadinessSummary (percent, counts, readyToLaunch, missingRequired, etaDays, flowsOverride). With no launch it returns an empty summary with reason: "no_launch"; before setup, reason: "launch_setup_required".