Customer Dashboard — Account
The Account group manages the customer's telephony, billing, and team: My Numbers, Credits, BYOK Keys, BYON Trunks, Oktivo Number, and Team. Credits is always accessible, so it anchors the group.
Screenshots









Architecture Overview
How It Works (Step-by-Step)
- My Numbers (
/my-numbers). List the customer's phone numbers (GET /customer/phone-numbers,numbersview), view outbound config, activate/deactivate inbound per number, and — as an account owner — allocate/deallocate numbers to team members (numbersedit). Backed by PhoneNumber + PhoneNumberAssignment. See Assignment and Inbound Activation. - Credits (
/credits). Always-on billing view: balance + transactions (GET /credits/balance,/credits/transactions,billingview). Buying credits, billing details (GST/PAN), pricing, order verification, and invoices are inpayment.routes.ts(billingresource +purchaseCreditsfeature). Backed by CreditTransaction + PaymentOrder + BillingDetails + PaymentConfig. See Credit Management System and Payment System. - BYOK Keys (
/byok-keys). Bring-Your-Own-Key: store provider API keys (masked), per-agent scoping. Gated bybyok+byokresource. Backed by ByokKey (+ ByokAuditLog). See BYOK. - BYON Trunks (
/byon-trunks). Bring-Your-Own-Number: manage customer SIP trunks (CRUD). Gated bybyon+byonresource + org context. Backed by SIPTrunk. - Oktivo Number (
/oktivo-numbers). Purchase/provision an Oktivo-managed number and release owned ones. Every route is gated bynumber_purchasing(org plan + customer assignment). Backed by ProvisionedNumber / PhoneNumber. See Phone Number Provisioning. - Team (
/team). Team RBAC: list/invite/edit/remove members, resend invites, reset passwords, and impersonate a member. Most routes require account owner (requireAccountOwner); impersonation-stop is callable from the impersonated session (auth-only). Gated byteam_management. Backed by User + Role. See Team RBAC.
File Reference
| File | Role | Key Functions |
|---|---|---|
routes/telephony.routes.ts | Customer numbers + inbound + member allocation | customerListNumbers, allocateNumberToMember |
routes/credit.routes.ts | Balance + transactions | getCustomerBalance, getCustomerTransactions |
routes/payment.routes.ts | Credit purchase, billing, invoices | createPaymentOrder, verifyPaymentOrder, downloadInvoice |
routes/byok.routes.ts | BYOK key CRUD | listByokKeys, createByokKey |
routes/byon.routes.ts | BYON trunk CRUD | listByonTrunks, createByonTrunk |
routes/customer-provisioning.routes.ts | Oktivo number purchase/release | getOwnedNumbers, releaseNumber |
routes/team.routes.ts | Team members + impersonation | inviteMember, impersonateMember |
Data Model
| Collection | Why it exists | Key fields |
|---|---|---|
PhoneNumber / PhoneNumberAssignment / ProvisionedNumber | Numbers + member allocation + provisioned numbers | e164, assignedToUID |
CreditTransaction | Credit debit/credit ledger | amount, type, balanceAfter |
PaymentOrder / BillingDetails / PaymentConfig | Purchases, GST/PAN, gateway config | status, gstin, keys |
ByokKey / ByokAuditLog | Customer provider keys + audit | masked value, scope |
SIPTrunk | BYON trunk | SIP credentials |
User / Role | Team members + RBAC roles | email, permissions |
API Endpoints
My Numbers
GET /customer/phone-numbers(numbersview),POST /customer/phone-numbers/:id/activate-inbound,POST /customer/phone-numbers/:phoneUID/allocate-to-member(numbersedit).
Credits & payments
GET /credits/balance,GET /credits/transactions(billingview).GET /payments/pricing,POST /payments/create-order(billingcreate),GET /payments/verify/:orderUID,GET /payments/orders/:orderUID/invoice.
BYOK / BYON
GET/POST/PUT/DELETE /api/byok/keys[/:keyId](byok).GET/POST/PUT/DELETE /customer/byon-trunks[/:trunkId](byon).
Oktivo Number
- Provisioning routes under
number_purchasing— purchase, list owned, release.
Team
GET /account/teammembers list,POSTinvite,PUTupdate,DELETEremove,POST /impersonate/:id,POST /impersonate/stop.- Auth: most require
verifyJwt+requireAccountOwner+requireFeatureAccess(team_management).
External Integrations
- Razorpay (payments) — credit purchase orders + webhook verification + invoices. See Payment System.
- SIP providers / LiveKit — numbers and BYON trunks route calls through the telephony stack. See SIP Trunk Overview.
- Upstream LLM/voice providers — BYOK keys are used by the Agent Server at call time.
How to Test (End-to-End)
- Open Credits; confirm balance + transactions load (always accessible).
- With
purchaseCredits, create an order, complete the Razorpay flow, and confirm the balance increases and an invoice is downloadable. - Grant
team_management; invite a member, confirm they appear, then impersonate and stop impersonation. - With
voice_campaign, open My Numbers; allocate a number to a member and confirmmy-allocatedlists it for them. - With
byok, add a key (stored masked) and scope it to an agent; withbyon, add a trunk.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| My Numbers empty | No numbers assigned, or voice_campaign/numbers off | Assign numbers; grant the feature |
| Can't buy credits | purchaseCredits off or gateway misconfigured | Grant the feature; set payment config |
| Team actions 403 | Caller isn't the account owner | Team writes require requireAccountOwner |
| BYOK/BYON hidden | byok/byon off | Grant the feature |
| Oktivo Number locked | number_purchasing off | Grant number purchasing (org → customer) |