Skip to content

Org (Admin) Dashboard — Sections & APIs ​

Section-by-section reference for every Org (Admin) menu item: its route, the backend API it calls (method + path), the controller/service behind it, and the MongoDB collection(s) it writes.

No screenshots exist for this dashboard. Menu order and item names come from app/src/layouts/AdminLayout.tsx; routes from the /admin/* group in app/src/routes.tsx. UI-layout claims not confirmable from code are tagged > ⚠️ Unverified. See the Org overview for role gating.

Architecture Overview ​

All admin APIs mounted from admin.routes.ts share one guard: router.use(verifyJwt, requireRole("admin"), requireOrg). Paths below are shown with their mount prefix (/admin for admin.routes.ts, /admin/provisioning for provisioning, /api/org-config for the config replica).

1. Dashboard — /admin/dashboard ​

Landing KPI view. Page: pages/admin/DashboardPage.tsx. It aggregates existing admin reads (customers, credit summary); it has no dedicated write.

  • Customer count / listing → GET /admin/customers (listCustomers)
  • Org credit summary → GET /admin/credit-summary (getOrgCreditSummary)

⚠️ Unverified — the exact KPI cards rendered on the landing page are not confirmable from code alone.

2. Customers — /admin/customers ​

Create, list, edit customers; reset passwords; review KYC; manage per-customer credits and pricing. Controllers: admin.controller.ts, kyc.controller.ts, credit.controller.ts, servicePricing.controller.ts, deletion.controller.ts, emailAuth.controller.ts.

ActionMethod + PathHandlerCollection(s) written
Create customerPOST /admin/customerscreateCustomerUser
List customersGET /admin/customerslistCustomers— (read)
Get customerGET /admin/customers/:customerIdgetCustomer— (read)
Update customerPUT /admin/customers/:customerIdupdateCustomerUser
Reset passwordPUT /admin/customers/:customerId/reset-passwordresetCustomerPasswordUser
Delete customerPOST /admin/customers/:customerUID/deletedeleteCustomerUser (+ cascades)
Resend onboardingPOST /admin/resend-onboarding/:userUIDadminResendOnboardingEmailToken
Get KYCGET /admin/customers/:customerId/kycgetCustomerKyc— (read)
Review KYCPUT /admin/customers/:customerId/kyc/reviewreviewCustomerKycKyc
Grant KYC gracePUT /admin/customers/:customerId/kyc/gracegrantCustomerKycGraceKyc
Update KYCPUT /admin/customers/:customerId/kycupdateCustomerKycKyc
Per-customer service pricingPUT /admin/customers/:customerUID/service-pricing/:presetIdupsertCustomerServicePricingServicePricing
Remove service pricingDELETE /admin/customers/:customerUID/service-pricing/:presetIddeleteCustomerServicePricingServicePricing

3. Tickets — /admin/tickets (entitlement TICKETING) ​

Org-wide helpdesk view. Page: pages/admin/TicketsPage.tsx. Uses the shared ticket API (ticket.routes.ts, mounted at /), with four layers of checks (verifyJwt → requireFeatureAccess → resolveTicketScope → requireTicketPermission).

  • List tickets → GET /api/tickets (listTickets) — reads Ticket
  • Ticket stats → GET /api/tickets/stats (getTicketStats)
  • Ticket detail → GET /api/tickets/:id (getTicketById) — reads Ticket, TicketMessage, TicketEvent

See Customer → Tickets for the full ticket data model.

4. Call Feedback — /admin/feedback ​

Post-call feedback list + stats. Controller: admin.controller.ts.

  • Feedback list → GET /admin/feedback (getFeedbackList)
  • Feedback stats → GET /admin/feedback/stats (getFeedbackStats)
  • Stream a recording (org access) → GET /admin/recording/:contactUID (adminStreamRecording)

Reads live-call feedback aggregated from the Contact / call records; this view does not write new collections.

5. User Insights — /admin/user-insights (entitlement ADMIN_ANALYTICS) ​

Aggregates Contact data by unique phone number across all campaigns/agents in the org. Route file: userInsight.routes.ts (gated by FEATURE_MAP.tokenAnalytics). Controller: userInsight.controller.ts.

ActionMethod + PathHandler
List unique usersGET /api/v1/user-insights/userslistUniqueUsers
User's callsGET /api/v1/user-insights/users/:phone/callsgetUserCalls
User reportGET /api/v1/user-insights/users/:phone/reportgetUserReport

Read-only over the Contact collection. See User Insight Dashboard.

6. Config Management — /admin/config ​

Org's own pricing/preset overrides on top of the superadmin default config — the config replica. Route file: orgConfigReplica.routes.ts (mounted at /api/org-config). Controller: orgConfigReplica.controller.ts.

ActionMethod + PathHandlerCollection(s)
Get merged replicaGET /api/org-config/replicagetOrgConfigReplicaOrgConfigReplica (read)
Set preset ratePUT /api/org-config/replica/presets/:presetId/rateupdatePresetRateOrgConfigReplica
Toggle preset visibilityPUT /api/org-config/replica/presets/:presetId/visibilityupdatePresetVisibilityOrgConfigReplica
Batch save overridesPUT /api/org-config/replica/presets/batchbatchUpdatePresetsOrgConfigReplica
Addon rates (recording/transcription/analysis)GET/PUT /api/org-config/replica/addon-ratesgetAddonRates / updateAddonRatesOrgConfigReplica
Per-customer addon ratesGET/PUT/DELETE /api/org-config/replica/addon-rates/customers/:customerUIDgetCustomerAddonRates / upsertCustomerAddonRates / deleteCustomerAddonRatesCustomerAddonPricing
Platform feeGET/PUT /api/org-config/replica/platform-feegetPlatformFee / updatePlatformFeeOrgConfigReplica
P2P feeGET/PUT /api/org-config/replica/p2p-feegetP2pFee / updateP2pFeeOrgConfigReplica
Per-customer feesGET/PUT/DELETE /api/org-config/replica/fees/customers/:customerUIDgetCustomerFees / upsertCustomerFees / deleteCustomerFeesCustomerFeePricing

This is the admin side; the superadmin sets the per-org baseline via the same router's /replica/:orgUID/* endpoints (see Superadmin Dashboard, Per-Org Rates). See Call Fee Model and Service Pricing.

7. Signup Config — /admin/signup-config ​

Self-serve signup defaults (plan, form fields). Controller: admin.controller.ts.

  • Get signup config → GET /admin/signup-config (getSignupConfig) — reads Organization
  • Update signup config → PUT /admin/signup-config (updateSignupConfig) — writes Organization

8. Lead Field Templates — /admin/lead-field-templates ​

Industry-specific lead-field + system-column + lead-journey templates, auto-seeded to the org's customers. Controllers: orgIndustryTemplate.controller.ts, orgSystemColumn.controller.ts, orgLeadJourneyTemplate.controller.ts.

ActionMethod + PathHandler
Get industry templatesGET /admin/industry-templatesgetIndustryTemplates
Update industry templatesPUT /admin/industry-templatesupdateIndustryTemplates
Get/update system columnsGET/PUT /admin/system-columnsgetSystemColumns / updateSystemColumns
Add org system columnPOST /admin/system-columns/addaddSystemColumn
Edit/remove additionPUT/DELETE /admin/system-columns/addition/:fieldKeyeditSystemColumn / removeSystemColumn
Lead-journey templatesGET/PUT /admin/lead-journey-templatesgetLeadJourneyTemplates / updateLeadJourneyTemplates
Seed a journey templatePOST /admin/lead-journey-templates/seedseedLeadJourneyTemplate

Writes org-level template data on the Organization / CRM template collections; a PUT propagates the change to each customer's own field/column set.

9. Analysis Schemas — /admin/analysis-schemas ​

Per-industry call-analysis schema definitions the org builds; they flow to customers of that industry. Controller: orgAnalysisSchema.controller.ts.

ActionMethod + PathHandlerCollection
List schemasGET /admin/analysis-schemaslistOrgAnalysisSchemasAnalysisSchema (read)
Create schemaPOST /admin/analysis-schemascreateOrgAnalysisSchemaAnalysisSchema
Seed from templatesPOST /admin/analysis-schemas/seed-from-templatesseedOrgAnalysisSchemasFromTemplatesAnalysisSchema
Set industry defaultPUT /admin/analysis-schemas/defaultssetOrgIndustryDefaultAnalysisSchema
Update schemaPUT /admin/analysis-schemas/:idupdateOrgAnalysisSchemaAnalysisSchema
Delete schemaDELETE /admin/analysis-schemas/:iddeleteOrgAnalysisSchemaAnalysisSchema

See Analysis Schema System.

10. Credits — /admin/credits ​

Distribute/revoke credits to customers and view the org's credit ledger. Controller: credit.controller.ts.

ActionMethod + PathHandlerCollection
Distribute creditsPOST /admin/customers/:customerId/distribute-creditsdistributeCreditsCreditTransaction
Revoke creditsPOST /admin/customers/:customerId/revoke-creditsrevokeCreditsCreditTransaction
Credit transactionsGET /admin/credit-transactionsgetOrgTransactions— (read)
Credit summaryGET /admin/credit-summarygetOrgCreditSummary— (read)

See Credit Management System.

11. Payment Gateway — /admin/payment-config (entitlement PAYMENTS) ​

Configure the payment gateway customers use to top up credits. Route file: payment.routes.ts (gated by FEATURE_MAP.managePayments). Controller: payment.controller.ts.

ActionMethod + PathHandlerCollection
Get payment configGET /admin/payment-configgetPaymentConfigPaymentConfig (read)
Upsert payment configPUT /admin/payment-configupsertPaymentConfigPaymentConfig
Org payment ordersGET /admin/payment-ordersgetOrgPaymentOrdersPaymentOrder (read)

External integration: Razorpay (the gateway). See Payment System.

12. Phone Numbers — /admin/phone-numbers ​

Org number inventory; assign/unassign numbers to customers. Route file: telephony.routes.ts (requireRole("admin") + requireOrg). Controller: telephony.controller.ts.

ActionMethod + PathHandlerCollection
Org number statsGET /admin/phone-numbers/statsadminGetOrgNumberStatsPhoneNumber (read)
List org numbersGET /admin/phone-numberslistOrgNumbersPhoneNumber (read)
Assign to customerPOST /admin/phone-numbers/:id/assign-customeradminAssignToCustomerPhoneNumber, PhoneNumberAssignment
Unassign from customerPOST /admin/phone-numbers/:id/unassign-customeradminUnassignFromCustomerPhoneNumber, PhoneNumberAssignment
List org SIP trunksGET /admin/sip-trunksadminListTrunksSIPTrunk (read)

See Phone Number Assignment.

13. Number Provisioning — /admin/provisioning ​

Enable providers per customer and set the org's customer-facing number rates. Route file: admin-provisioning.routes.ts (mounted at /admin/provisioning). Controller: admin-provisioning.controller.ts.

ActionMethod + PathHandlerCollection
List enabled providersGET /admin/provisioning/providerslistProvidersProvider, OrgProviderEnablement (read)
Set customer enablementPOST /admin/provisioning/customers/:customerUID/enablementsetCustomerEnablementOrgProviderEnablement
BYO permission togglePUT /admin/provisioning/providers/:providerUID/byo-permissionsetByoPermissionOrgProviderEnablement
Set customer ratesPUT /admin/provisioning/ratessetRatesProvisionedNumber rates / OrgConfigReplica
Price breakdownGET /admin/provisioning/providers/:providerUID/price-breakdowngetProviderPriceBreakdown— (read)
Refresh provider costsPOST /admin/provisioning/providers/:providerUID/refresh-costsrefreshProviderCostsProvider
InventoryGET /admin/provisioning/inventorygetInventoryProvisionedNumber (read)

See Phone Number Provisioning.

14. Connecter — /admin/connecter-config (entitlement CRM_CONNECTER_MANAGE / WHATSAPP_MANAGE) ​

Manage the org's bring-your-own OAuth apps + default provider mappings. Route file: connecterAdmin.routes.ts (mounted at /api/v2/connecter/admin). Controllers: connecterAdmin.controller.ts, gmailAdmin.controller.ts.

ActionMethod + PathHandlerCollection
List appsGET /api/v2/connecter/admin/appslistAppsCrmProviderApp (read)
Upsert org appPUT /api/v2/connecter/admin/apps/:providerupsertOrgAppCrmProviderApp
Delete org appDELETE /api/v2/connecter/admin/apps/:providerdeleteOrgAppCrmProviderApp
Get/set mappingGET/PUT /api/v2/connecter/admin/mappings/:providergetOrgMapping / setOrgMappingCrmFieldMapping
Gmail org appGET/PUT/DELETE /api/v2/connecter/admin/gmail-appgetGmailApp / upsertGmailApp / deleteGmailAppGmailOrgConfig

Guarded by requireRole("admin","superadmin") + requireFeatureAccess(FEATURE_MAP.manageConnecter). Superadmin-only global defaults live on the same router under /global-apps — see Superadmin Dashboard.

15. Settings — /admin/settings ​

Org branding + general settings. Page: pages/admin/SettingsPage.tsx. Controller: admin.controller.ts.

  • Get organization → GET /admin/organization (getOrganization) — reads Organization
  • Update branding → PUT /admin/organization/branding (updateBranding) — writes Organization

16. Account Settings — /admin/account ​

The admin's own account (bottom nav). Page: pages/admin/AccountSettingsPage.tsx. Uses the shared auth/account endpoints (/auth/*, /account/*) — the same team/role endpoints described in Team RBAC.

Collections Written by This Dashboard ​

Primary collections: Organization, User, Kyc, OrgConfigReplica, CustomerFeePricing, CustomerAddonPricing, ServicePricing, AnalysisSchema, CreditTransaction, PaymentConfig, PaymentOrder, PhoneNumber, PhoneNumberAssignment, ProvisionedNumber, OrgProviderEnablement, Provider, CrmProviderApp, CrmFieldMapping, GmailOrgConfig, Ticket. Full definitions in Data Collections.

How to Test (End-to-End) ​

  1. Prerequisites: an admin account owning an Organization with at least one customer; backend + frontend running.
  2. Customers: create a customer at /admin/customers, confirm a User doc appears pinned to your orgUID.
  3. Credits: distribute credits to that customer, confirm a CreditTransaction is written and the customer's balance updates.
  4. Config Management: change a preset rate, save, and confirm OrgConfigReplica reflects it; verify the customer sees the new rate.
  5. Number Provisioning: enable a provider for the customer and confirm OrgProviderEnablement updates.
  6. Gated items: toggle PAYMENTS/TICKETING/ADMIN_ANALYTICS off at the superadmin level and confirm the matching rows lock.

Troubleshooting ​

SymptomCauseFix
Customer not visible in listCustomer belongs to a different orgrequireOrg scopes to your org only; verify ownership
403 on /admin/payment-configOrg lacks PAYMENTS entitlementGrant it at the superadmin level
Pricing change not applied to a customerPer-customer override still setClear the customer override in Config Management (DELETE .../customers/:customerUID)
KYC review button missingCustomer never submitted KYCCustomer must submit KYC first; see kyc.controller.ts
Provisioning rate save failsProvider not enabled for the orgEnable the provider first (superadmin), then set org rates

Last updated: