Admin Console
The Mnemom admin API gives platform operators full control over users, agents, billing, plans, licenses, and reporting. All capabilities described in this guide are available programmatically through the admin endpoints and are surfaced in the admin console UI at mnemom.ai/admin.
The admin API is designed for platform operators, not end users. End-user APIs are documented in the API Reference Overview.
Authentication
All admin endpoints live under the /v1/admin/ path and require ServiceRole authentication. Pass the ServiceRole key as a Bearer token:
curl https://api.mnemom.ai/v1/admin/stats \
-H "Authorization: Bearer <service-role-key>"
ServiceRole keys have unrestricted access to all admin operations. They should never be exposed in client-side code or shared with end users.
ServiceRole keys bypass row-level security. Treat them with the same care as database credentials. Rotate immediately if compromised.
Dashboard Overview
Three endpoints provide at-a-glance metrics for the admin dashboard.
| Method | Endpoint | Description |
|---|
GET | /admin/stats | Platform-wide statistics — total users, agents, active subscriptions, and more. |
GET | /admin/usage | Usage metrics and trends over time — API calls, checkpoint volume, storage. |
GET | /admin/revenue | Revenue metrics — MRR, churn, expansion, and historical revenue data. |
See the API Reference for full response schemas: GET /admin/stats, GET /admin/usage, GET /admin/revenue.
User Management
Manage the lifecycle of every user on the platform — from listing and inspection to suspension and impersonation for debugging.
| Method | Endpoint | Description |
|---|
GET | /admin/users | List all users with pagination. Supports filtering by status, plan, and creation date. |
DELETE | /admin/users/{user_id} | Permanently delete a user and all associated data. |
POST | /admin/users/{user_id}/suspend | Suspend a user, immediately revoking API access. |
POST | /admin/users/{user_id}/unsuspend | Restore a suspended user’s access. |
POST | /admin/users/{user_id}/impersonate | Generate a short-lived token to act as the user for debugging. |
Destructive operations: DELETE /admin/users/{user_id} permanently removes the user and all their data (agents, traces, billing records). This action cannot be undone. Prefer suspension over deletion when the intent is to disable access temporarily.
Impersonation tokens are short-lived and scoped to read operations by default. All impersonation sessions are logged in the admin audit trail.
See the API Reference for request and response details: GET /admin/users, DELETE /admin/users/, POST suspend, POST unsuspend, POST impersonate.
Agent Management
View all agents registered across the platform, regardless of which user owns them.
| Method | Endpoint | Description |
|---|
GET | /admin/agents | List all agents with pagination. Includes owner, status, and last-active metadata. |
See GET /admin/agents for the full response schema.
Customer Management
Customer endpoints provide a billing-centric view of users, including subscription state, lifetime value, and internal notes for your support and success teams.
| Method | Endpoint | Description |
|---|
GET | /admin/customers | List customers with billing info — plan, MRR, subscription status, and lifetime value. |
GET | /admin/customers/{user_id} | Detailed customer view including full billing history and usage breakdown. |
POST | /admin/customers/{user_id}/notes | Add internal notes to a customer record. Notes are visible only to admins. |
See the API Reference: GET /admin/customers, GET /admin/customers/, POST notes.
Billing Administration
Control every aspect of a user’s billing state — plan changes, custom limits, credits, trials, invoices, and coupons.
| Method | Endpoint | Description |
|---|
GET | /admin/users/{user_id}/billing | View a user’s current billing state — plan, limits, credits, and subscription details. |
PUT | /admin/users/{user_id}/billing/plan | Change a user’s plan. Takes effect immediately; proration is handled automatically. |
PUT | /admin/users/{user_id}/billing/limits | Set custom usage limits that override the plan defaults. |
POST | /admin/users/{user_id}/billing/credit | Grant account credit (e.g., for goodwill gestures or service disruptions). |
POST | /admin/users/{user_id}/billing/trial | Extend an existing trial or grant a new trial period. |
POST | /admin/users/{user_id}/billing/credit-note | Issue a formal credit note against a previous invoice. |
POST | /admin/users/{user_id}/billing/invoice | Generate an invoice on demand, outside the normal billing cycle. |
POST | /admin/users/{user_id}/billing/coupon | Apply a coupon to a user’s account for ongoing or one-time discounts. |
Plan changes via PUT /admin/users/{user_id}/billing/plan trigger proration automatically. The user is charged or credited proportionally for the remainder of the billing period.
See the API Reference: GET billing, PUT plan, PUT limits, POST credit, POST trial, POST credit-note, POST invoice, POST coupon.
Plan Management
Create, update, clone, and archive the plans available on your platform.
| Method | Endpoint | Description |
|---|
GET | /admin/plans | List all plans, including archived plans. |
POST | /admin/plans | Create a new plan with pricing, limits, and feature flags. |
PUT | /admin/plans/{plan_id} | Update an existing plan’s configuration. Changes apply to new subscribers immediately. |
POST | /admin/plans/{plan_id}/clone | Clone a plan to use as a starting point for a new variant. |
POST | /admin/plans/{plan_id}/archive | Archive a plan. Existing subscribers keep their plan, but no new subscriptions are allowed. |
Archiving a plan does not affect existing subscribers. They remain on the archived plan until they change plans or their subscription ends.
See the API Reference: GET /admin/plans, POST /admin/plans, PUT /admin/plans/, POST clone, POST archive.
Coupon Management
Create and manage discount coupons that can be applied to user accounts.
| Method | Endpoint | Description |
|---|
GET | /admin/coupons | List all coupons with redemption counts and status. |
POST | /admin/coupons | Create a new coupon with a discount type (percentage or fixed), duration, and optional redemption limits. |
DELETE | /admin/coupons/{coupon_id} | Delete a coupon. Existing redemptions are not affected. |
Deleting a coupon does not remove the discount from users who have already redeemed it. To stop an active coupon from being redeemed further, delete it before distributing the code.
See the API Reference: GET /admin/coupons, POST /admin/coupons, DELETE /admin/coupons/.
License Management
Manage license keys for enterprise self-hosted deployments. Licenses control which features are available, how many agents can be registered, and when the deployment expires.
| Method | Endpoint | Description |
|---|
POST | /admin/licenses | Issue a new license key with feature entitlements, agent limits, and an expiration date. |
GET | /admin/licenses | List all licenses with status, assignee, and expiration info. |
GET | /admin/licenses/{license_id} | Detailed license view — entitlements, usage, activation history. |
PATCH | /admin/licenses/{license_id} | Update a license’s entitlements, limits, or expiration. |
DELETE | /admin/licenses/{license_id} | Revoke a license immediately. The self-hosted deployment will lose access on its next heartbeat. |
POST | /admin/licenses/{license_id}/reissue | Reissue an expired or compromised license. Generates a new key and invalidates the old one. |
Revoking a license (DELETE /admin/licenses/{license_id}) takes effect on the next license heartbeat from the self-hosted deployment. Depending on the deployment’s check interval, there may be a short delay before access is actually revoked.
Reissuing a license (POST /admin/licenses/{license_id}/reissue) generates a new license key. The old key is invalidated immediately. Provide the new key to the customer for reconfiguration of their self-hosted deployment.
See the API Reference: POST /admin/licenses, GET /admin/licenses, GET /admin/licenses/, PATCH /admin/licenses/, DELETE /admin/licenses/, POST reissue.
Exports
Generate CSV exports for reporting, accounting, and compliance. All export endpoints return a CSV file download.
| Method | Endpoint | Description |
|---|
GET | /admin/exports/revenue | Revenue export — line items by period, plan, and customer. |
GET | /admin/exports/customers | Customer export — all customers with plan, MRR, status, and signup date. |
GET | /admin/exports/usage | Usage export — API calls, checkpoints, and storage by user and period. |
GET | /admin/exports/tax | Tax export — tax collected by jurisdiction, suitable for tax filing. |
Exports support date range filtering via start_date and end_date query parameters. If omitted, the export covers the current calendar month.
See the API Reference: revenue export, customers export, usage export, tax export.
Analytics
Track conversion funnels and platform costs for operational insight.
| Method | Endpoint | Description |
|---|
GET | /admin/analytics/funnel | Conversion funnel metrics — signup to activation to paid conversion rates, with period-over-period trends. |
GET | /admin/costs | Platform cost tracking — infrastructure, LLM inference, and third-party service costs broken down by category. |
See the API Reference: GET /admin/analytics/funnel, GET /admin/costs.