List Admin Agency Subaccounts
List every sub-account installation for an agency.
Mirrors what /api/agency/sympana/subaccounts returns on the consumer side, but without the "must be an enterprise-enabled agency" gate — admins need to see sub-accounts for revoked / legacy agencies too, otherwise the Places tab silently renders 0 and hides the real inventory (which was the exact bug reported by ops).
We deliberately pull the raw installations table directly instead of going through the agency_dashboard helpers so admins bypass the allowlist short-circuit and RLS-gated enterprise scope filtering. The endpoint is already gated by require_admin_auth so this does not widen the attack surface — it just surfaces truth the admins were already entitled to.
The entire body is wrapped in a broad try/except because this route is part of the agency-context Promise.all on the frontend. A 500 here propagates to ServerErrorMiddleware, which writes its error response outside the user middleware stack and strips CORS headers — so the browser sees ERR_FAILED and the Places tab goes dark. Returning an empty 200 keeps the rest of the agency context load alive and the failure is logged server-side.
Request
- Base URL: https://api.sympana.ai (the document declares no server; this is the origin it was published from)
- URL: https://api.sympana.ai/api/admin-portal/agencies/{company_id}/subaccounts
- Auth: none declared
Path parameters
Headers
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.