mirror of
https://github.com/hanzoai/notify.git
synced 2026-10-30 15:04:32 +00:00
Add the missing POST/GET /v1/notify/tenants surface. Every other collection (templates, providers, events, messages, meter) has a `tenant` RelationField pointing at the tenants table; POSTs against those routes return validation_missing_rel_records until the org's tenants row exists. The platform plugin propagates X-Org-Id from the JWT owner claim, but it never seeds the row — that has to live in the notify API itself so operators don't need direct DB access on the distroless image. Body.id is ignored — the only id a caller is allowed to write is the slug their JWT says they own. Forecloses one-tenant-creating-another via a forged body. Idempotent upsert by id so seed scripts can re-run without churn. Surfaces in <tenant>/universe seed-notify-iam-otp-templates.sh.