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 by delegating to the same
:meth:OrganizationBootstrapService.request_bootstrap the webhook
uses. The row is created if absent and left untouched if present, so
a webhook and this endpoint racing converge on one row.
When this call is what created the row, emits the distinct
organization_bootstrap_self_healed event: in production that is the
signal that the webhook pipeline is failing and sign-ups are being
rescued by the fallback rather than the primary path.
The display name and slug are seeded from the organization ID as
placeholders; a subsequent organization.updated webhook overwrites
them with the real Clerk values once delivery recovers.
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