Skip to main content

API Overview

:::info Status Implemented — generated from the live FastAPI OpenAPI spec (127 endpoints as of this writing). Regenerate with npm run gen-api-docs after backend route changes; see the site README. :::

Every page under API Reference is generated directly from fastapi-backend's OpenAPI schema (app.openapi()) — not hand-written, so it cannot drift from the code's response_models and path operations. If an endpoint here looks wrong, the fix is in the backend's route/schema, then a regeneration — never a hand-edit of a generated .mdx file under docs/api/.

Authentication

Most endpoints require a JWT bearer token issued by /api/v1/auth/* — see Authentication. Superadmin-only endpoints are additionally gated by security.require_role(["superadmin"]), visible per-endpoint in the generated docs below.

Device-facing endpoints (/device-registry/*, /mosque-devices/*) use a different trust model — see Device Authorization before assuming a bearer token applies.

Grouped by tag

Tag (router prefix)Covers
authLogin, signup, superadmin 2FA
usersUser profile, push token registration
mosquesMosque CRUD, admins, activity
membershipsMosque membership approval
invites / joinInvite-code and join-code flows
devicesLegacy simple device CRUD
device-registryUnified device inventory: announce, claim, approve, transitions, ownership transfer, replace
mosque-devicesTransmitter/stream-player claim, config, commands, health
my-devicesA member's own bound devices — rebind/unbind
app-installsMobile app install enrollment, push token, preferences
triggersManual broadcast/azaan triggers
azan-autoOffline-azan scheduler settings/status/history
audio-filesAzan recording upload/management
broadcast-auditDelivery analytics per broadcast
prayer-timesPrayer time timetable and location
events / announcementsMosque events and announcements
device-invoicesDevice sales invoicing
stream-authScoped stream listener tokens
super-adminPlatform-wide operations (e.g. republish-retained)

Module-level behavior for the more involved domains is documented under Modules, not repeated here — this reference is the wire contract (request/response shape), not the "why."