Bootstrap My Organization
Lazily bootstrap the caller’s own organization, healing a missing row.
Additive, idempotent companion to the Clerk organization.created
webhook. Deliberately exempt from the bootstrap-ready gate so a caller
whose shared-namespace row was never created — local development with
no inbound tunnel, or a production webhook outage — can drive its own
provisioning. The row is created if absent and left untouched if
present, so a webhook and this endpoint racing converge on one row.
A missing row is inserted with the organization’s name and slug as the identity provider reports them, the same values the webhook carries. A present row is answered without that lookup.
When the row is missing and its name and slug are temporarily
unavailable, the call answers 503 with Retry-After and creates
nothing, so the caller retries after the delay. When the lookup is
refused outright, the call answers 500, creates nothing, and a retry
cannot succeed.
Returns:
Public status envelope, identical in shape to GET /me/status,
reporting the row’s status after the bootstrap request is queued.
Response
Successful Response
Public bootstrap status payload for the authenticated organization.
Collapses the internal :class:OrganizationStatus lifecycle into
three user-facing states the web and CLI clients can switch on
without learning about intermediate internal states:
"bootstrapping"— the organization's platform stack is still being provisioned. Clients should keep polling and block access to tenant-scoped routes."ready"— every seeded platform resource has reachedREADY. The client can stop polling and render the app."failed"— the organization is in a terminal non-ready state (BOOTSTRAP_FAILED,DEACTIVATING, orDELETED). The client should stop polling and display a support-contact screen.
Deliberately minimal: no resource detail, no error text, no retry-after. The bootstrap gate already returns a structured 503 envelope for the tenant-scoped routes — this endpoint exists purely to tell clients when to stop polling.
bootstrapping, ready, failed