MCPcopy Create free account
hub / github.com/Roy3838/Observer / create_org

Function create_org

api/orgs.py:291–303  ·  view source on GitHub ↗

Called by hand after a deal closes. Creates the Stripe customer and an invoiced subscription, writes the org record to R2, and grants the first seat to the billing contact. Returns the hosted invoice URL and the join link so they can be pasted into the sales email — this does n

(body: OrgCreateRequest)

Source from the content-addressed store, hash-verified

289
290@orgs_router.post("/admin/orgs", dependencies=[Depends(get_admin_access)], summary="Provision an enterprise org")
291async def create_org(body: OrgCreateRequest):
292 """
293 Called by hand after a deal closes. Creates the Stripe customer and an
294 invoiced subscription, writes the org record to R2, and grants the first
295 seat to the billing contact.
296
297 Returns the hosted invoice URL and the join link so they can be pasted into
298 the sales email — this does not depend on Stripe's own invoice email being
299 configured or enabled.
300
301 Pass dry_run=true to validate inputs without touching Stripe or R2.
302 """
303 return await provision_org(body)
304
305
306def _add_months(dt: datetime, months: int) -> datetime:

Callers

nothing calls this directly

Calls 1

provision_orgFunction · 0.85

Tested by

no test coverage detected