# Admin console

Everything the admin console does is a `kosuke admin` command. Only a super admin reaches it: their own Full access API key, or their own Sensei for them. A session's agent, a Cron Run and an AI app connected to Kosuke are refused, and anyone else's key gets `403`. The console spans every workspace, so no workspace pins these routes.

An Admin Token (`kosuke_adm_…`) still reads only: the `GET` routes that list it, never a write. Creating a workspace from the console stays in the browser, bound to the super admin's live session.

| Method | Path                                                                                                                                                                                                                                                                                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GET    | `/api/admin/agent-stats?from=&to=&tz=`                                                                                                                                                                                                                                                                                 | Read the Overview's agents per person and per workspace, as a super admin: for whole days of tz (your own zone by default) from `from` to `to`, excluded, against as many days before; with neither, for All time. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                               |
| GET    | `/api/admin/chat-sessions?q=&search=&status=&frustration=&kind=&mergeAgent=&orgId=&userId=&projectId=&from=&to=&dateFrom=&dateTo=&sort=&sortBy=&sortOrder=&page=&limit=&tz=`                                                                                                                                           | List the chat sessions of every workspace, one numbered page, as a super admin or with an Admin Token: words in the title, id or branch (q), statuses as a comma list (Archived only when named), frustration, kind, workspace, user, repository and the last activity window (`from`/`to` instants, or the days `dateFrom`/`dateTo` of tz, yours by default), ordered by sort. Each row names its Merge agent run, if any, and how its latest turn stands.                                                                                                                  |
| GET    | `/api/admin/chat-sessions/{sessionId}?limit=&from=&view=`                                                                                                                                                                                                                                                              | Read any chat session, as a super admin or with an Admin Token. `view` full (the default): the session with its messages, every one or a page of `limit` from the `from` cursor `newerCursor` names, its jobs and its sandbox; summary: the same without a message, each job with its run, the run count and cost and the Merge agent run it is; messages: a page of messages alone, with `newerCursor` and `lastCursor`; live: the status fields and jobs that move while a turn runs. An Admin Token's attachments carry no unsigned file URL. 404 for an unknown session. |
| GET    | `/api/admin/chat-sessions/{sessionId}/qa-merge-agent`                                                                                                                                                                                                                                                                  | Read any chat session's QA Runs, newest first, and the Merge agent run it runs if any, as a super admin or with an Admin Token: counts, ids and each run's finish reason, never QA notes or evidence. 404 for an unknown session.                                                                                                                                                                                                                                                                                                                                            |
| POST   | `/api/admin/chat-sessions/bulk`                                                                                                                                                                                                                                                                                        | Delete, archive or set the status of many chat sessions of any workspace at once, as a super admin: `action` delete, archive, or updateStatus with `status`. Archiving resets what a session was shipping and closes its cards; a session whose lifecycle lock stays taken is left as it was and named in busySessionIds. Deleting cannot be undone. Refused to anyone who is not a super admin.                                                                                                                                                                             |
| GET    | `/api/admin/chat-sessions/export?q=&search=&status=&frustration=&kind=&mergeAgent=&orgId=&userId=&projectId=&from=&to=&dateFrom=&dateTo=&sort=&sortBy=&sortOrder=&page=&limit=&tz=`                                                                                                                                    | Download the chat sessions the list's filters keep, in its order, as CSV, as a super admin: at most 10,000 rows, metadata only, no message. `dateFrom` and `dateTo` are days of tz, yours by default. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                                            |
| GET    | `/api/admin/chat-sessions/filter-options`                                                                                                                                                                                                                                                                              | List the repositories, users and workspaces that have chat sessions, with their ids, for the chat sessions filters, as a super admin or with an Admin Token. A user whose name cannot be read is named by id.                                                                                                                                                                                                                                                                                                                                                                |
| GET    | `/api/admin/chat-sessions/histogram?q=&search=&status=&frustration=&kind=&mergeAgent=&orgId=&userId=&projectId=&from=&to=&dateFrom=&dateTo=&sort=&sortBy=&sortOrder=&page=&limit=&tz=`                                                                                                                                 | Count the chat sessions the list's filters keep per step of their window, by last activity, those whose latest turn failed apart, as a super admin. Buckets follow the clock of tz, yours by default; the list's order and page are accepted and ignored. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                        |
| GET    | `/api/admin/chat-sessions/lookup?sandboxId=&branchName=`                                                                                                                                                                                                                                                               | Find the chat sessions of any workspace by exactly one of sandboxId (the sessions that ran in that sandbox, past ones and a separate app sandbox included) or branchName, newest first, as a super admin or with an Admin Token. 400 unless exactly one non-empty one is sent.                                                                                                                                                                                                                                                                                               |
| GET    | `/api/admin/content-reports?status=&reason=&targetType=&alerted=&orgId=&authorId=&reporterId=&q=&from=&to=&sort=&page=&limit=`                                                                                                                                                                                         | List the content reports members sent, one page, newest first (`sort=created` for oldest), as a super admin: `status`, `reason` and `targetType` as comma lists (open by default, `status=all` for any), `alerted`, `orgId`, `authorId` (whose content), `reporterId`, `q` (the excerpt, the note, either person), and `from`/`to` instants, both included. Refused to anyone who is not a super admin.                                                                                                                                                                      |
| GET    | `/api/admin/content-reports/{reportId}`                                                                                                                                                                                                                                                                                | Read one content report a member sent, as a super admin: what was reported, by whom, its status, the reports on the same author sent before it and whether the reporter blocks the author. 404 for an unknown report; refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                            |
| PATCH  | `/api/admin/content-reports/{reportId}`                                                                                                                                                                                                                                                                                | Mark a content report resolved, or open it again, as a super admin; answers the report as saved. 404 for an unknown report; refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                                                                                                                      |
| GET    | `/api/admin/content-reports/count`                                                                                                                                                                                                                                                                                     | Count the open content reports, the console sidebar's badge, as a super admin. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| GET    | `/api/admin/crons?search=&q=&orgId=&createdBy=&status=&failingOnly=&lastRun=&scope=&state=&sortBy=&sortOrder=&page=&limit=`                                                                                                                                                                                            | List every cron of every workspace and every member's personal crons, one page, as a super admin or with an Admin Token: searched by name or prompt (search or q), filtered by orgId, createdBy, status, failingOnly, lastRun (a comma list of run statuses), scope and state, sorted by sortBy and sortOrder. Each cron says how many times in a row it failed and what its runs of the last 7 days cost. A filter value it does not know reads as no filter.                                                                                                               |
| GET    | `/api/admin/crons/{cronId}?page=&limit=`                                                                                                                                                                                                                                                                               | Read any cron of any workspace or member, with one page of its runs, newest first, as a super admin or with an Admin Token. 404 for an unknown cron.                                                                                                                                                                                                                                                                                                                                                                                                                         |
| GET    | `/api/admin/crons/{cronId}/runs/{runId}`                                                                                                                                                                                                                                                                               | Read one run of any cron, as a super admin or with an Admin Token: its ending, report, diagnostics, filed sessions, artifacts, token usage totals and the Sentry Logs project id. 404 for an unknown run or one of another cron.                                                                                                                                                                                                                                                                                                                                             |
| GET    | `/api/admin/crons/filter-options`                                                                                                                                                                                                                                                                                      | List the workspaces and creators that have crons, with their ids, for the crons filters, as a super admin or with an Admin Token.                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| GET    | `/api/admin/dashboard/sensei-usage?from=&to=&tz=&totals=`                                                                                                                                                                                                                                                              | Read the Overview's Sensei usage, as a super admin or with an Admin Token: ten counts over every person together for the whole recorded history and, with `from` and `to` (whole days of tz, yours by default, both included, at most 366 days), for that window too; `totals=false` with a window skips the history. Counts only, never a message, draft or card's words.                                                                                                                                                                                                   |
| GET    | `/api/admin/dashboard/stats?from=&to=&tz=`                                                                                                                                                                                                                                                                             | Read the platform-wide totals of the Overview's All time, as a super admin or with an Admin Token; with `from` and `to` (whole days of tz, yours by default, both included, at most 366 days), the Overview's figures for that window and the same span before it, with tokens and their cost. Tokens read null when their ledgers could not be read.                                                                                                                                                                                                                        |
| GET    | `/api/admin/deploys?q=&projectId=&orgId=&status=&origin=&range=&from=&to=&sort=&page=&limit=`                                                                                                                                                                                                                          | List every Deploy agent job, one page, as a super admin or with an Admin Token: searched by q (the id, the repository, the error), each list filter a comma list, the window `from` and `to` or `range`, sorted by sort (newest first by default), with the counts of each filter.                                                                                                                                                                                                                                                                                           |
| GET    | `/api/admin/deploys/{deployId}`                                                                                                                                                                                                                                                                                        | Read any Deploy with its attempts, latest first, and its newest messages, as a super admin or with an Admin Token; each attempt's error text is a super admin's alone. 404 for an unknown Deploy.                                                                                                                                                                                                                                                                                                                                                                            |
| GET    | `/api/admin/deploys/export?q=&projectId=&orgId=&status=&origin=&range=&from=&to=&sort=&page=&limit=`                                                                                                                                                                                                                   | Download the Deploys the list's filters keep, in its order, as CSV, as a super admin: at most 10,000 rows, what the list shows, ids included. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                                                                                                    |
| GET    | `/api/admin/deploys/histogram?q=&projectId=&orgId=&status=&origin=&range=&from=&to=&sort=&page=&limit=&tz=`                                                                                                                                                                                                            | Count the Deploys the list's filters keep per step of their window, failed ones apart, as a super admin. Buckets follow the clock of tz, yours by default; the list's order and page are accepted and ignored. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                                   |
| GET    | `/api/admin/devices`                                                                                                                                                                                                                                                                                                   | Count the people who used each client, and each Mac, iPhone and Watch app version, over the last 30 days on this deployment only, with the latest release of each, as a super admin or with an Admin Token.                                                                                                                                                                                                                                                                                                                                                                  |
| GET    | `/api/admin/devices/people?client=&version=`                                                                                                                                                                                                                                                                           | List the people on one client version over the last 30 days on this deployment, the most recently seen first, at most 200, as a super admin or with an Admin Token. No version, or an empty one, lists those whose client sent none.                                                                                                                                                                                                                                                                                                                                         |
| GET    | `/api/admin/downloads?allTime=&from=&to=&tz=`                                                                                                                                                                                                                                                                          | Count the people who download the production Mac and iPhone apps, bots left out, as a super admin or with an Admin Token: from `from` to `to`, excluded, against as many days before, by days of tz (yours by default), or allTime=1 for All time.                                                                                                                                                                                                                                                                                                                           |
| POST   | `/api/admin/downloads/testflight-read`                                                                                                                                                                                                                                                                                 | Read App Store Connect now, as the daily job does, save today's TestFlight snapshot and answer the outcome, as a super admin. A failed read is an answer, stored with its reason, not an error. At most 10 reads per 10 minutes; refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                 |
| GET    | `/api/admin/feature-flags`                                                                                                                                                                                                                                                                                             | List every feature flag of this deployment, on or off, with who saved it last and when, as a super admin or with an Admin Token.                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| PATCH  | `/api/admin/feature-flags/{key}`                                                                                                                                                                                                                                                                                       | Turn one feature flag on or off on this deployment, as a super admin; answers the flag as saved, with who saved it. 404 for a key that is no flag; refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                                                                                               |
| GET    | `/api/admin/infrastructure/clusters?scope=&window=`                                                                                                                                                                                                                                                                    | Read the CI cluster (scope ci) or the Sensei and agent clusters (scope clusters, the default) now, as a super admin or with an Admin Token: their cost over the window (24h by default), their last 30 days, and for ci where the CI cost goes on GitHub. No member data.                                                                                                                                                                                                                                                                                                    |
| GET    | `/api/admin/infrastructure/node?hostId=&node=`                                                                                                                                                                                                                                                                         | Read one server of one cluster now, by hostId and node name, as a super admin or with an Admin Token: its pods by kind with their share of its price, and what waits for a server on its pool. Pods are named by pod name and kind, never by member. 404 for an unknown node.                                                                                                                                                                                                                                                                                                |
| GET    | `/api/admin/infrastructure/sandbox-providers?window=`                                                                                                                                                                                                                                                                  | Compare this environment's sandbox providers over the window (30d by default), every registered one listed, as a super admin or with an Admin Token: creates, resumes and saves with their p50 and p95, session starts, failures by type, sandbox-hours, cost and cost per sandbox-hour with what the numbers leave out, and each provider's health (null when its read failed). No member data.                                                                                                                                                                             |
| GET    | `/api/admin/infrastructure/sandboxes?window=`                                                                                                                                                                                                                                                                          | Read this environment's sandboxes on every registered provider, as a super admin or with an Admin Token: each one's status, running now by type, cost an hour and a month at today's size and over the window (24h by default), the All providers total, E2B's count against the shared cap, the window's running count and cost per chart slot, and each provider's health (null when its read failed). No member data.                                                                                                                                                     |
| GET    | `/api/admin/integration-connects?from=&to=&owner=&q=&toolkit=&tz=`                                                                                                                                                                                                                                                     | Read Integration Connect attempts over the window `from` to `to` (instants with an offset; tz names the days they bound), per toolkit, as a super admin or with an Admin Token: owner filters by who connects, q matches a part of the toolkit's slug, and toolkit adds that toolkit's failures by step, code, reason, vendor status and host with its latest failed and abandoned attempts.                                                                                                                                                                                 |
| GET    | `/api/admin/integration-events?from=&to=&owner=&q=&toolkit=&tz=`                                                                                                                                                                                                                                                       | Read Events from tools health over the window `from` to `to` (instants with an offset; tz names the days they bound), per toolkit and owner kind, as a super admin or with an Admin Token: instances as they stand now, failures over the window, the connections whose every instance failed and the latest failures; q matches a part of the toolkit's slug, toolkit adds its failures by step, class and reason.                                                                                                                                                          |
| GET    | `/api/admin/integration-usage?from=&to=&caller=&section=&toolkit=&page=&pageSize=&sort=&q=&tz=`                                                                                                                                                                                                                        | Read Integration tool calls over the window `from` to `to` (instants with an offset; tz names the days they bound), as a super admin or with an Admin Token: by caller, one section at a time, a page of pageSize: toolkits (the default, with sort and q over the slug), tools (toolkit for one toolkit's) or people.                                                                                                                                                                                                                                                       |
| GET    | `/api/admin/integrations?q=&mode=&scope=&sort=`                                                                                                                                                                                                                                                                        | List every integration the filters keep, as a super admin: q over the name and the toolkit, mode and scope as comma lists, ordered by sort; each with its availability, the workspaces that turned it on and its calls over the last seven days. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                 |
| PATCH  | `/api/admin/integrations`                                                                                                                                                                                                                                                                                              | Set one integration's availability for every workspace (mode), as a super admin, at the revision it was read: 409 INTEGRATION_AVAILABILITY_CONFLICT when it changed since, 404 for a key not offered. Answers every integration's availability; refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                  |
| GET    | `/api/admin/integrations/{key}`                                                                                                                                                                                                                                                                                        | Read one integration by its availability key (`composio:github`), as a super admin: its availability, its last seven days of calls and the workspaces that turned it on. 404 for a key not offered; refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                                              |
| GET    | `/api/admin/jobs?status=&page=&pageSize=&queueName=&dateFrom=&dateTo=&tz=`                                                                                                                                                                                                                                             | List the jobs of every queue in one status (failed by default), one page, as a super admin or with an Admin Token, with every queue's counts by status: queueName for one queue's jobs, `dateFrom` and `dateTo` whole days of tz (yours by default), both included.                                                                                                                                                                                                                                                                                                          |
| GET    | `/api/admin/kosuke-free`                                                                                                                                                                                                                                                                                               | Read Kosuke Free, as a super admin or with an Admin Token: the serving source, every source with its masked credential and this week's use, the one-time prompt grant and how many people have used all of it, the usage windows of the kinds that report one, each source's prompts and failures over the last 7 days, and the models the Free model picker offers.                                                                                                                                                                                                         |
| POST   | `/api/admin/kosuke-free/login/antigravity`                                                                                                                                                                                                                                                                             | Start a Google sign-in for an Antigravity Kosuke Free source, as a super admin; the same requestId resumes the attempt it started. The login stays on your attempt until a source save redeems it. 409 GOOGLE_ACCESS_CHANGED when the Google access changed meanwhile; refused to anyone who is not a super admin.                                                                                                                                                                                                                                                           |
| POST   | `/api/admin/kosuke-free/login/antigravity/cancel`                                                                                                                                                                                                                                                                      | Cancel your Google sign-in attempt for an Antigravity Kosuke Free source at its revision, as a super admin. 409 GOOGLE_ACCESS_CHANGED when it changed meanwhile; refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                                                                                 |
| POST   | `/api/admin/kosuke-free/login/antigravity/complete`                                                                                                                                                                                                                                                                    | Finish your Google sign-in attempt for an Antigravity Kosuke Free source with the code from the browser, at its revision, as a super admin; the login stays on the attempt until a source save redeems it. 400 for a refused code, 409 GOOGLE_ACCESS_CHANGED when the access changed meanwhile; refused to anyone who is not a super admin.                                                                                                                                                                                                                                  |
| POST   | `/api/admin/kosuke-free/login/claude`                                                                                                                                                                                                                                                                                  | Start a Claude sign-in for a Kosuke Free Subscription source, as a super admin: answers the link to open and the loginToken complete takes. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                                                                                                      |
| POST   | `/api/admin/kosuke-free/login/claude/complete`                                                                                                                                                                                                                                                                         | Finish a Claude sign-in for a Kosuke Free source with the loginToken from start and the code from the Claude page, as a super admin. Answers only the account email: the login stays on the server until the source is saved with this loginToken. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                               |
| POST   | `/api/admin/kosuke-free/login/codex`                                                                                                                                                                                                                                                                                   | Start a device sign-in for a Codex Subscription Kosuke Free source, as a super admin: answers the code to enter at its verification URL, how often to poll, and the loginToken complete polls with. 503 when the sign-in cannot start; refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                           |
| POST   | `/api/admin/kosuke-free/login/codex/complete`                                                                                                                                                                                                                                                                          | Poll the Codex device sign-in of a Kosuke Free source with the loginToken from start, as a super admin. Answers authenticated with only the account email once signed in, or restart once the code expired: the login stays on the server until the source is saved with this loginToken. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                        |
| POST   | `/api/admin/kosuke-free/login/grok`                                                                                                                                                                                                                                                                                    | Start, poll or cancel the SuperGrok device sign-in a Kosuke Free source is saved with, as a super admin: `action` start with a requestId, poll or cancel with the attemptId and revision. The login stays on your attempt until a source save redeems it. 409 GROK_ACCESS_CHANGED when the access changed meanwhile; refused to anyone who is not a super admin.                                                                                                                                                                                                             |
| POST   | `/api/admin/kosuke-free/login/muse`                                                                                                                                                                                                                                                                                    | Start a device sign-in for a Muse Code Subscription Kosuke Free source, as a super admin: answers the code to enter at its verification URL, how often to poll, and the loginToken complete polls with. 503 when the sign-in cannot start; refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                       |
| POST   | `/api/admin/kosuke-free/login/muse/complete`                                                                                                                                                                                                                                                                           | Poll the Muse Code device sign-in of a Kosuke Free source with the loginToken from start, as a super admin. Answers authenticated with only the account email once signed in, or restart once the code expired: the login stays on the server until the source is saved with this loginToken. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                    |
| POST   | `/api/admin/kosuke-free/serving`                                                                                                                                                                                                                                                                                       | Serve a Kosuke Free source, or move it to standby with serving false, as a super admin. Serving is refused with 409 for an Expired source, one that needs a new sign-in or lists no model, and while the pool is off and another source serves; an Exhausted one is allowed and comes back cleared.                                                                                                                                                                                                                                                                          |
| PATCH  | `/api/admin/kosuke-free/settings`                                                                                                                                                                                                                                                                                      | Change Kosuke Free settings, as a super admin; only the fields sent change: the one-time prompt grant per person, the Free model (400 for one the pool cannot serve), and poolEnabled true, which only turns the pool on. Answers the three as saved.                                                                                                                                                                                                                                                                                                                        |
| POST   | `/api/admin/kosuke-free/sources`                                                                                                                                                                                                                                                                                       | Add a Kosuke Free source as Standby, as a super admin: a provider key gets one short test call first (400 when refused); a Subscription arrives as the loginToken of a finished sign-in, swapped here for the login. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                             |
| PATCH  | `/api/admin/kosuke-free/sources/{sourceId}`                                                                                                                                                                                                                                                                            | Edit a Kosuke Free source, as a super admin: a blank key keeps the stored one, a new key gets the same test call as on create, and a changed credential clears Exhausted. Its kind cannot change (400): a different kind is a different source. 404 for an unknown source.                                                                                                                                                                                                                                                                                                   |
| DELETE | `/api/admin/kosuke-free/sources/{sourceId}`                                                                                                                                                                                                                                                                            | Remove a Kosuke Free source, as a super admin. Refused with 409 for the Serving source and for one that open Free pins still hold.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| GET    | `/api/admin/landing/analytics?days=&bots=`                                                                                                                                                                                                                                                                             | Read the landing's site analytics over the last `days` UTC days, today included, as a super admin; bots left out unless bots=include. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                                                                                                            |
| POST   | `/api/admin/landing/assets`                                                                                                                                                                                                                                                                                            | Upload one image for a newsletter campaign body, as a super admin: one PNG, JPEG, GIF or WebP up to 1,000,000 bytes, checked by its bytes, and optionally the campaignId it is for. Answers the site-relative `/api/assets/<id>` URL to write into the markdown. 413 IMAGE_TOO_LARGE past the cap.                                                                                                                                                                                                                                                                           |
| GET    | `/api/admin/landing/campaigns?page=&limit=&q=&status=&sort=`                                                                                                                                                                                                                                                           | List the newsletter campaigns, one page, newest first (sort=created for oldest), as a super admin: q over the subject, status as a comma list; each with its send progress, and the total.                                                                                                                                                                                                                                                                                                                                                                                   |
| POST   | `/api/admin/landing/campaigns`                                                                                                                                                                                                                                                                                         | Create a draft newsletter campaign with a subject, preheader and segment, as a super admin. Sends nothing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| GET    | `/api/admin/landing/campaigns/{id}`                                                                                                                                                                                                                                                                                    | Read a newsletter campaign with its body and its send progress, as a super admin. 404 for an unknown campaign.                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| PATCH  | `/api/admin/landing/campaigns/{id}`                                                                                                                                                                                                                                                                                    | Save a draft newsletter campaign, as a super admin; 409 once it is sending or sent.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| DELETE | `/api/admin/landing/campaigns/{id}`                                                                                                                                                                                                                                                                                    | Delete a draft newsletter campaign, as a super admin; 409 once it is sending or sent.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| GET    | `/api/admin/landing/campaigns/{id}/audience`                                                                                                                                                                                                                                                                           | Count the subscribed recipients the saved segment of a newsletter campaign matches now, as a super admin: what a send would mail. 404 for an unknown campaign.                                                                                                                                                                                                                                                                                                                                                                                                               |
| POST   | `/api/admin/landing/campaigns/{id}/preview`                                                                                                                                                                                                                                                                            | Render the exact email HTML of a newsletter campaign for a body and preheader not yet saved, as a super admin. Saves and sends nothing.                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| POST   | `/api/admin/landing/campaigns/{id}/send`                                                                                                                                                                                                                                                                               | Send a newsletter campaign to its saved segment, as a super admin: snapshots the segment's subscribed recipients and marks it sending; core mails them in the background, and it cannot be called back. 503 CUTOVER_REQUIRED until core owns landing email, 400 NO_RECIPIENTS for an empty segment (nothing changes), 400 EMPTY_CAMPAIGN, 409 once sent.                                                                                                                                                                                                                     |
| POST   | `/api/admin/landing/campaigns/{id}/test`                                                                                                                                                                                                                                                                               | Mail a saved newsletter campaign once to one address, subject prefixed [TEST], as a super admin. Never changes the campaign's status or its sends.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| GET    | `/api/admin/landing/decks/investor`                                                                                                                                                                                                                                                                                    | List the investor decks of the catalog, each with its viewers, sessions, last activity and landing links, as a super admin.                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| GET    | `/api/admin/landing/decks/investor/{slug}`                                                                                                                                                                                                                                                                             | Read one investor deck's engagement by its slug (a legacy alias slug too), as a super admin: totals, time per slide, viewers and each viewer's time per slide. 404 for a slug that is no investor deck.                                                                                                                                                                                                                                                                                                                                                                      |
| GET    | `/api/admin/landing/decks/sales`                                                                                                                                                                                                                                                                                       | List the sales decks of the catalog with their landing links, as a super admin.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| GET    | `/api/admin/landing/email-health`                                                                                                                                                                                                                                                                                      | Check whether core can send marketing email now, as a super admin, naming any missing or refused setting; never a setting's value.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| GET    | `/api/admin/landing/labels`                                                                                                                                                                                                                                                                                            | List the labels subscribed newsletter subscribers carry, each with its count, most used first, as a super admin.                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| GET    | `/api/admin/landing/signups-by-source?days=`                                                                                                                                                                                                                                                                           | Count Kosuke sign-ups by first-touch source over the last `days` UTC days, today included, beside the landing's unique visitors per source, with No source and Invited apart, as a super admin.                                                                                                                                                                                                                                                                                                                                                                              |
| GET    | `/api/admin/landing/subscribers?page=&limit=&q=&status=&label=&sort=`                                                                                                                                                                                                                                                  | List newsletter subscribers, one page of limit (25, 50 or 100; 50 by default), newest first (sort=created for oldest), as a super admin or with an Admin Token: q over the email or the name, status as a comma list and one label; with the total and every label in use.                                                                                                                                                                                                                                                                                                   |
| POST   | `/api/admin/landing/subscribers`                                                                                                                                                                                                                                                                                       | Add a newsletter subscriber by hand, as a super admin: email, name and label. A new address lands as pending and no email is sent; an existing one keeps its status, so a suppressed address stays off the list. Answers created and the subscriber.                                                                                                                                                                                                                                                                                                                         |
| GET    | `/api/admin/landing/subscribers/{subscriberId}`                                                                                                                                                                                                                                                                        | Read one newsletter subscriber with its labels, as a super admin. 404 for an unknown subscriber.                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| PATCH  | `/api/admin/landing/subscribers/{subscriberId}`                                                                                                                                                                                                                                                                        | Edit a newsletter subscriber, as a super admin: name, status (subscribed, unsubscribed, bounced or complained) and labels (the whole set). Setting subscribed puts a suppressed address back on the list, recording the consent as admin. Answers the subscriber as saved.                                                                                                                                                                                                                                                                                                   |
| DELETE | `/api/admin/landing/subscribers/{subscriberId}`                                                                                                                                                                                                                                                                        | Delete a newsletter subscriber with its labels, its campaign sends and its suppression, as a super admin; an unknown id answers success too. Cannot be undone.                                                                                                                                                                                                                                                                                                                                                                                                               |
| GET    | `/api/admin/landing/subscribers/export?page=&limit=&q=&status=&label=&sort=`                                                                                                                                                                                                                                           | Download every newsletter subscriber the list's filters keep, in its order, as CSV, as a super admin: at most 50,000 rows, labels space separated.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| GET    | `/api/admin/leaderboard?from=&to=&tz=`                                                                                                                                                                                                                                                                                 | Read the platform Leaderboard as a super admin: every person with points over whole days of `tz` (your own zone by default), `from` to `to` both included (the last 30 days by default, at most the cap), ranked by the workspace Leaderboard rules across every workspace. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                                      |
| GET    | `/api/admin/marketing/cohorts?from=&to=`                                                                                                                                                                                                                                                                               | Read anonymized daily signup cohorts by first-touch UTM attribution over inclusive UTC days from and to (the last 30 UTC days by default, at most 366), as a super admin or with an Admin Token. Counts only, never a person's details. 400 for a window it refuses.                                                                                                                                                                                                                                                                                                         |
| GET    | `/api/admin/merge-agents/export?tab=&q=&projectId=&orgId=&status=&model=&from=&to=&sort=&page=&limit=&goAhead=&state=`                                                                                                                                                                                                 | Download the Merge agents page as CSV, as a super admin: `tab` runs (the default) or projects, with that tab's filters and order, at most 10,000 rows, ids included. Refused to anyone who is not a super admin.                                                                                                                                                                                                                                                                                                                                                             |
| GET    | `/api/admin/merge-agents/projects?q=&goAhead=&state=&from=&to=&sort=&page=&limit=`                                                                                                                                                                                                                                     | List every project whose merge train is on, across all workspaces, as a super admin: its go-ahead rule and wait for QA, model, its open run or Idle, its last merge, and what it merged and cost between `from` and `to`. Filtered by go-ahead and state, searched by project or workspace (`q`), sorted and paged, with each filter's counts.                                                                                                                                                                                                                               |
| GET    | `/api/admin/merge-agents/runs?q=&projectId=&orgId=&status=&model=&from=&to=&sort=&page=&limit=`                                                                                                                                                                                                                        | List every Merge agent run across all workspaces, past Batches included, as a super admin: filtered (each filter a comma list), searched (`q`: the run's name or number, the project, the workspace, a pull request number), between `from` and `to` on the start, sorted (newest first by default) and paged, with each filter's counts.                                                                                                                                                                                                                                    |
| GET    | `/api/admin/merge-agents/runs/{id}`                                                                                                                                                                                                                                                                                    | Read one Merge agent run as a super admin: the list's figures, its project's go-ahead rule and wait for QA, and each pull request it merged or queued with its result and merge time. Not found for an unknown id.                                                                                                                                                                                                                                                                                                                                                           |
| GET    | `/api/admin/merge-agents/runs/histogram?q=&projectId=&orgId=&status=&model=&from=&to=&sort=&page=&limit=&tz=`                                                                                                                                                                                                          | Count the finished Merge agent runs the Runs filters keep per day of `tz` (your own zone by default), as a super admin, in three series: merged, nothing to merge and failed. An open run is in no bar; the list's order and page are accepted and ignored.                                                                                                                                                                                                                                                                                                                  |
| GET    | `/api/admin/merge-agents/summary?q=&projectId=&orgId=&status=&model=&from=&to=&sort=&page=&limit=`                                                                                                                                                                                                                     | Read the Merge agents summary row for the window and the Runs filters, the status filter aside, as a super admin: the merge trains on now and the runs stuck now, the runs by status, the pull requests merged and in how many runs, the median time from a run's start to its last merge, and the agent cost.                                                                                                                                                                                                                                                               |
| GET    | `/api/admin/missing-actions?from=&to=&q=&toolkit=&sort=&page=&pageSize=&tz=`                                                                                                                                                                                                                                           | List the direct integration requests between `from` and `to` across every workspace, as a super admin, grouped by toolkit and endpoint. `q` searches, `toolkit` keeps one toolkit by its exact slug, `sort`, `page` and `pageSize` order and page them.                                                                                                                                                                                                                                                                                                                      |
| GET    | `/api/admin/organizations?search=&q=&authMethod=&plan=&sortBy=&sortOrder=&page=&limit=`                                                                                                                                                                                                                                | List every workspace on the platform as a super admin, with its members, repositories, Kosuke chats and merged pull requests, sandbox hours this month and billing plan: searched over name and slug (`search` or `q`), filtered by `authMethod` and `plan` (comma lists), ordered by `sortBy` and `sortOrder`, one `page` of `limit` rows (at most 100).                                                                                                                                                                                                                    |
| GET    | `/api/admin/organizations/{workspaceId}`                                                                                                                                                                                                                                                                               | Read one workspace as a super admin: its name, creator, plan and fee, spend and monthly sandbox hours limits, sandbox provider and the providers you may pick, concurrent sandbox limit and override, credits, Stripe customer link and subscription, and its five most recent chat sessions with the count. Not found for an unknown workspace.                                                                                                                                                                                                                             |
| PATCH  | `/api/admin/organizations/{workspaceId}`                                                                                                                                                                                                                                                                               | Change a workspace's settings as a super admin: plan, plan fee and interval, monthly spend limit, Enterprise monthly sandbox hours limit, concurrent sandbox limit (null returns to the plan's) and sandbox provider, which moves the projects without their own. A Personal space takes only the sandbox limit and provider; a paid plan must agree with Stripe. At least one field.                                                                                                                                                                                        |
| GET    | `/api/admin/organizations/{workspaceId}/hours`                                                                                                                                                                                                                                                                         | Read a workspace's sandbox hours this UTC month as a super admin: booked plus running now, by sandbox type, and the Enterprise monthly hours limit with where the workspace stands against it. Not found for an unknown workspace.                                                                                                                                                                                                                                                                                                                                           |
| GET    | `/api/admin/organizations/{workspaceId}/hours/months`                                                                                                                                                                                                                                                                  | Read a workspace's sandbox hours over the last six UTC months as a super admin, oldest first and the current one so far, each by sandbox type, with the Enterprise monthly hours limit. Not found for an unknown workspace.                                                                                                                                                                                                                                                                                                                                                  |
| GET    | `/api/admin/organizations/{workspaceId}/integrations`                                                                                                                                                                                                                                                                  | List the integrations Kosuke enables workspace by workspace, as a super admin, and whether this workspace has each one, with the revision to change it by. Not found for an unknown workspace.                                                                                                                                                                                                                                                                                                                                                                               |
| PATCH  | `/api/admin/organizations/{workspaceId}/integrations`                                                                                                                                                                                                                                                                  | Grant or withdraw one integration for a workspace, as a super admin: `key`, `enabled`, and the `revision` you last read, which a newer write refuses with a conflict. Answers the workspace's integrations as the list does.                                                                                                                                                                                                                                                                                                                                                 |
| GET    | `/api/admin/organizations/{workspaceId}/sandbox-hours`                                                                                                                                                                                                                                                                 | Read a workspace's retired hour account as a super admin: its phase, state, hours granted and used, and revision. Read-only; refused for a Personal space, not found for an unknown workspace.                                                                                                                                                                                                                                                                                                                                                                               |
| GET    | `/api/admin/organizations/{workspaceId}/sandbox-hours/grants?page=&limit=`                                                                                                                                                                                                                                             | List the history of a workspace's retired hour account as a super admin, newest first and paged: each grant's kind, amount, balance before and after, reason, who made it and when. Read-only: the monthly sandbox hours limit replaced adding hours. Refused for a Personal space.                                                                                                                                                                                                                                                                                          |
| GET    | `/api/admin/organizations/{workspaceId}/usage?from=&to=&tz=`                                                                                                                                                                                                                                                           | Read a workspace's usage day by day as a super admin, between the instants `from` and `to` (the default window ending now, at most the cap), in days of `tz` (your own zone by default).                                                                                                                                                                                                                                                                                                                                                                                     |
| GET    | `/api/admin/organizations/export?search=&q=&authMethod=&plan=&sortBy=&sortOrder=`                                                                                                                                                                                                                                      | Download the Organizations list as CSV, as a super admin: the workspaces the list's filters keep, in its order, at most 10,000 rows. Sandbox hours are this UTC month's, booked plus running, in hours with one decimal; the limit is the Enterprise monthly hours limit, empty without one.                                                                                                                                                                                                                                                                                 |
| GET    | `/api/admin/organizations/options`                                                                                                                                                                                                                                                                                     | List every workspace's id and name as a super admin, as the Organization filter of the admin lists offers them.                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| GET    | `/api/admin/product-stats?from=&to=&tz=`                                                                                                                                                                                                                                                                               | Read the product numbers as a super admin, everyone counted, for the whole days `from` (included) to `to` (excluded) of `tz` (your own zone by default), at most the cap; cached five minutes per window and zone.                                                                                                                                                                                                                                                                                                                                                           |
| GET    | `/api/admin/projects?search=&q=&orgId=&health=&tier=&template=&staleTemplate=&dateFrom=&dateTo=&sortBy=&sortOrder=&page=&limit=`                                                                                                                                                                                       | List every repository across all workspaces as a super admin: searched over name, description and id (`search` or `q`), filtered by `orgId`, `health` and `tier` (comma lists), `template` (current or stale) and the creation days `dateFrom` and `dateTo`, ordered by `sortBy` and `sortOrder`, one `page` of `limit` rows (at most 100).                                                                                                                                                                                                                                  |
| GET    | `/api/admin/projects/{projectId}`                                                                                                                                                                                                                                                                                      | Read one repository as a super admin: its list row (workspace, tier, template and deploy health), who created it, its five newest deploys and chat sessions with their counts, and its sandbox provider: its own, its workspace's and the effective one. Not found for an unknown id.                                                                                                                                                                                                                                                                                        |
| PATCH  | `/api/admin/projects/{projectId}`                                                                                                                                                                                                                                                                                      | Change a repository's sandbox tier, its sandbox provider (null for its workspace's), or both, as a super admin. A change of where its sandboxes run moves it and answers what moved; refused (422, nothing saved) for a provider at a size it does not run, or one this deployment cannot reach.                                                                                                                                                                                                                                                                             |
| GET    | `/api/admin/projects/{projectId}/sandbox-usage`                                                                                                                                                                                                                                                                        | Read a repository's total sandbox run time and cost as a super admin, split into its main preview and its dev sessions.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| GET    | `/api/admin/projects/{projectId}/sandboxes`                                                                                                                                                                                                                                                                            | List the live sandboxes tagged with a repository on every configured provider, as a super admin: each with the provider that listed it, its role (main, pool member, session or stale: untracked), its template and base template stamp. A provider that cannot list is left out, not the others.                                                                                                                                                                                                                                                                            |
| DELETE | `/api/admin/projects/{projectId}/sandboxes/{sandboxId}`                                                                                                                                                                                                                                                                | Kill one stale sandbox of a repository as a super admin: only one a provider lists under the repository that nothing tracks. Its main sandbox, a chat session's, a session's app sandbox (a fork under 15 minutes old included) and warm pool members are refused; not found when no provider lists it.                                                                                                                                                                                                                                                                      |
| GET    | `/api/admin/projects/{projectId}/template`                                                                                                                                                                                                                                                                             | Read a repository's project template as a super admin: its serving build, the build in progress, and whether new sandboxes boot from it right now. Not found for an unknown repository.                                                                                                                                                                                                                                                                                                                                                                                      |
| POST   | `/api/admin/projects/bulk`                                                                                                                                                                                                                                                                                             | Delete repositories in bulk as a super admin: `action` delete and the `projectIds`, at least one. Answers how many were deleted.                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| GET    | `/api/admin/projects/export?search=&q=&orgId=&health=&tier=&template=&staleTemplate=&dateFrom=&dateTo=&sortBy=&sortOrder=`                                                                                                                                                                                             | Download the Repositories list as CSV, as a super admin: the repositories the list's filters keep, in its order, at most 10,000 rows, with workspace, deploy health, template, sandbox tier and deploys in 30 days.                                                                                                                                                                                                                                                                                                                                                          |
| GET    | `/api/admin/promo-codes?page=&limit=&q=&state=&sort=`                                                                                                                                                                                                                                                                  | List the promo codes as a super admin, newest first, each with its redemption count. With `page`, one page of `limit` codes in `sort` order (`created`, `expires` or `redemptions`, `-` for descending), kept by `q` (the name or the code) and `state` (a comma list of active, inactive, expired), with the total; without it, every code.                                                                                                                                                                                                                                 |
| POST   | `/api/admin/promo-codes`                                                                                                                                                                                                                                                                                               | Create a promo code as a super admin: its name, code word (letters, numbers, dashes, underscores) and expiry, a future instant with its offset, all fixed once written; switching it off is the one change it takes later. Refused with a conflict when the code word is taken.                                                                                                                                                                                                                                                                                              |
| GET    | `/api/admin/promo-codes/{id}`                                                                                                                                                                                                                                                                                          | Read one promo code as a super admin: the code and the members who redeemed it, newest first. Not found for an unknown id.                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| PATCH  | `/api/admin/promo-codes/{id}`                                                                                                                                                                                                                                                                                          | Switch a promo code on or off as a super admin (`active`), the one edit a code takes: off stops new redemptions and leaves every grant already claimed alone. Not found for an unknown id.                                                                                                                                                                                                                                                                                                                                                                                   |
| GET    | `/api/admin/runs?userId=&orgId=&projectId=&chatSessionId=&senseiThreadId=&jobId=&turnId=&parentRunId=&kind=&mergeAgent=&status=&model=&provider=&family=&paidBy=&purpose=&purposeGroup=&costSource=&hasSystemPrompt=&systemPrompt=&errorCode=&q=&sort=&from=&to=&minCostUsd=&maxCostUsd=&cursor=&limit=&page=`         | List every LLM and agent run as a super admin, newest first, filtered by member, workspace, repository, session, thread, kind, status, model, purpose, cost and window. Metadata and each row's error text, never content. With `page`, a numbered page of `limit` runs in `sort` order with the total and per-kind counts; without it, cursor pages.                                                                                                                                                                                                                        |
| DELETE | `/api/admin/runs?userId=`                                                                                                                                                                                                                                                                                              | Erase every run of one member (`userId`), their stored objects included, on that member's request, as a super admin. Answers what was erased; it cannot be undone.                                                                                                                                                                                                                                                                                                                                                                                                           |
| GET    | `/api/admin/runs/{runId}`                                                                                                                                                                                                                                                                                              | Read one LLM or agent run as a super admin: its metadata, usage and cost, versions, lifecycle events with their data, error text and child runs. Not found for an unknown run.                                                                                                                                                                                                                                                                                                                                                                                               |
| GET    | `/api/admin/runs/{runId}/content?what=&format=&offset=&limit=`                                                                                                                                                                                                                                                         | Read one piece of a run's content as a super admin, each read written to the audit log first: `what` system, request, transcript, inline or server_request, a page of the transcript by `offset` and `limit`, or `format` download for the whole transcript. Not found when the run kept no such content.                                                                                                                                                                                                                                                                    |
| GET    | `/api/admin/runs/{runId}/prompt-compare`                                                                                                                                                                                                                                                                               | List the runs whose system prompt the Prompt tab can compare with this run's, metadata only, as a super admin. Not found for an unknown run.                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| GET    | `/api/admin/runs/{runId}/tool-calls`                                                                                                                                                                                                                                                                                   | List a run's tool calls from the tool-call ledger as a super admin, first by time, at most 500.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| GET    | `/api/admin/runs/export?userId=&orgId=&projectId=&chatSessionId=&senseiThreadId=&jobId=&turnId=&parentRunId=&kind=&mergeAgent=&status=&model=&provider=&family=&paidBy=&purpose=&purposeGroup=&costSource=&hasSystemPrompt=&systemPrompt=&errorCode=&q=&sort=&from=&to=&minCostUsd=&maxCostUsd=&cursor=&limit=`        | Download the Runs list as CSV, as a super admin: the runs the list's filters keep, in its order, at most 10,000 rows, metadata and the error text as on the page.                                                                                                                                                                                                                                                                                                                                                                                                            |
| GET    | `/api/admin/runs/filter-options`                                                                                                                                                                                                                                                                                       | List the users, workspaces, repositories and models the runs name, as a super admin, as the Runs list's filters offer them.                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| GET    | `/api/admin/runs/histogram?userId=&orgId=&projectId=&chatSessionId=&senseiThreadId=&jobId=&turnId=&parentRunId=&kind=&mergeAgent=&status=&model=&provider=&family=&paidBy=&purpose=&purposeGroup=&costSource=&hasSystemPrompt=&systemPrompt=&errorCode=&q=&sort=&from=&to=&minCostUsd=&maxCostUsd=&cursor=&limit=&tz=` | Count the runs the Runs list's filters keep per step of their window, failed runs apart, as a super admin, on the clock of `tz` (your own zone by default). The list's order and page size are accepted and ignored.                                                                                                                                                                                                                                                                                                                                                         |
| GET    | `/api/admin/runs/totals?from=&to=`                                                                                                                                                                                                                                                                                     | Count every run created between `from` and `to` (days or ISO times, each end open when left out), everyone together, as a super admin: all runs, agent turns by kind and purpose, model calls by provider family, purpose and model, each with succeeded, failed and cancelled counts and the known cost, and when the earliest run was recorded.                                                                                                                                                                                                                            |
| GET    | `/api/admin/sensei/decisions?window=`                                                                                                                                                                                                                                                                                  | Count every member's yes, no, left-out and open Sensei cards per card kind over `window` (7d, 30d or all; 30d by default), as a super admin, and who lets Sensei approve for them. Counts only, never card text.                                                                                                                                                                                                                                                                                                                                                             |
| GET    | `/api/admin/sensei/hosts`                                                                                                                                                                                                                                                                                              | List every Sensei host as a super admin, with how many people it holds.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| GET    | `/api/admin/sensei/threads?id=&title=&state=&kind=&creator=&owner=&sort=&page=&pageSize=`                                                                                                                                                                                                                              | List every owner's Sensei threads as a super admin, metadata only, filtered, sorted and paged; `owner` narrows them to one member, and `id` finds one thread by its whole id, saying when a filter hides it. A `title` search reads thread text: recorded before it runs, and refused to an Admin Token.                                                                                                                                                                                                                                                                     |
| GET    | `/api/admin/sensei/training-data?window=`                                                                                                                                                                                                                                                                              | Read the Sensei decision training set as a super admin: totals for 7 days, 30 days and all time; examples per member and per card kind over `window` (7d, 30d or all; 30d by default), each split into yes, no, reply, closed and open; and every column's fill rate over the last 7 days against the 30 before. Counts only, never card text or member words.                                                                                                                                                                                                               |
| GET    | `/api/admin/sensei/usage?q=&sort=&page=&limit=&from=&to=&tz=`                                                                                                                                                                                                                                                          | Read who uses Sensei as a super admin: over the whole days `from` to `to` of `tz` (your own zone by default, both included; the last 30 days by default), every person's tokens, working time and cost, the active count and the chart, with the People list searched by name or email (`q`), sorted and paged.                                                                                                                                                                                                                                                              |
| GET    | `/api/admin/skills?from=&to=&search=&skillName=&invocationId=&section=&page=&kind=&limit=&sort=&order=&personalNames=`                                                                                                                                                                                                 | Read Factory and Personal Skill usage between the instants `from` and `to` as a super admin, `kind` all, factory or personal. With `limit` (and a `kind`), one page of skills in `sort` order; with `skillName`, one Factory Skill's profile by `section`; with `invocationId`, one invocation. Personal Skill names are left out for an Admin Token unless its sender vouches for a super admin.                                                                                                                                                                            |
| GET    | `/api/admin/system-crons?tz=`                                                                                                                                                                                                                                                                                          | List every system cron as a super admin, with its members, last run and failures this week, and its next run for a member in `tz` (an IANA zone, your own by default).                                                                                                                                                                                                                                                                                                                                                                                                       |
| GET    | `/api/admin/system-crons/{name}?tz=&page=&limit=&failedOnly=`                                                                                                                                                                                                                                                          | Read one system cron as a super admin: its definition, its next run for a member in `tz` (an IANA zone, your own by default), and a page of its runs, one row per member per run, `failedOnly` keeping the failed ones. Not found for an unknown name.                                                                                                                                                                                                                                                                                                                       |
| POST   | `/api/admin/system-crons/{name}`                                                                                                                                                                                                                                                                                       | Start one run of a runner system cron for one member, named by email or id (`member`), whatever its schedule says, as a super admin. Not found for an unknown cron or member.                                                                                                                                                                                                                                                                                                                                                                                                |
| GET    | `/api/admin/system-crons/runs/{runId}`                                                                                                                                                                                                                                                                                 | Read one system cron run as a super admin: its member, its Turn's lifecycle and the file it wrote. Not found for an unknown run.                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| GET    | `/api/admin/token-usage?from=&to=&tz=&month=`                                                                                                                                                                                                                                                                          | Read Token Usage as a super admin, priced in USD, over the whole days `from` to `to` of `tz` (your own zone by default, both included; the last 30 days by default), each cell one such day; `month` current or previous names a calendar month of the same zone instead.                                                                                                                                                                                                                                                                                                    |
| GET    | `/api/admin/token-usage/sensei`                                                                                                                                                                                                                                                                                        | Read everyone's Sensei Turns, compactions and Personal Crons as a super admin over the last 7 days, the last 30 days and all recorded, with the shares workspaces and Sensei Free paid. Counts and time only, never text.                                                                                                                                                                                                                                                                                                                                                    |
| GET    | `/api/admin/tokens`                                                                                                                                                                                                                                                                                                    | List the Admin Tokens as a super admin: each one's name, prefix, who made it, when it was made, expires and was last used, and whether it is revoked. Never a token itself.                                                                                                                                                                                                                                                                                                                                                                                                  |
| DELETE | `/api/admin/tokens/{id}`                                                                                                                                                                                                                                                                                               | Revoke one Admin Token as a super admin: it stops reading at once, and its name can be used again. Answers `revoked`.                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| GET    | `/api/admin/tool-calls?from=&to=&tz=&source=&agentKind=&status=&toolkit=&tool=&userId=&orgId=&projectId=&errorClass=&q=&section=&sort=&page=&pageSize=&window=`                                                                                                                                                        | List every tool call of both ledgers as a super admin, one page at a time in `sort` order (newest first by default), between `from` and `to` or over `window` all; with `section` tools, a page of the calls grouped by tool (most failed first by default); with `section` options, the window's values for the filters. `q` finds a tool or toolkit by name, or a call by its id.                                                                                                                                                                                          |
| GET    | `/api/admin/tool-calls/{callKey}`                                                                                                                                                                                                                                                                                      | Read one tool call of either ledger as a super admin by its key, `agent:<uuid>` or `integration:<uuid>`, with every field the list shows: an agent call's bounded input and result, its run and its Turn. Not found for an unknown key.                                                                                                                                                                                                                                                                                                                                      |
| GET    | `/api/admin/tool-calls/export?from=&to=&tz=&source=&agentKind=&status=&toolkit=&tool=&userId=&orgId=&projectId=&errorClass=&q=`                                                                                                                                                                                        | Download the tool calls the list's filters keep as CSV, as a super admin, newest first, at most 50,000 rows and never an input or result; response headers say how many rows it holds and leaves out.                                                                                                                                                                                                                                                                                                                                                                        |
| GET    | `/api/admin/tool-calls/histogram?from=&to=&tz=&source=&agentKind=&status=&toolkit=&tool=&userId=&orgId=&projectId=&errorClass=&q=`                                                                                                                                                                                     | Count the tool calls the list's filters keep per step of their window, failed calls apart, as a super admin, on the clock of `tz` (your own zone by default). The list's order and page are accepted and ignored.                                                                                                                                                                                                                                                                                                                                                            |
| GET    | `/api/admin/tool-failures?from=&to=&tz=&agent=&source=&agentKind=&toolkit=&tool=&section=&page=&pageSize=`                                                                                                                                                                                                             | Read the tool-call ledger's failure report as a super admin between `from` and `to`: totals and the failing tools, filtered by agent, source, agent kind, toolkit and tool; with `section` samples, a page of failed calls instead.                                                                                                                                                                                                                                                                                                                                          |
| GET    | `/api/admin/users?search=&q=&signInMethod=&source=&onboarding=&orgId=&sortBy=&sortOrder=&page=&limit=`                                                                                                                                                                                                                 | List every person across every workspace as a super admin, with their activity: searched over name and email (`search` or `q`), filtered by `signInMethod` and `source` (comma lists), `onboarding`, and `orgId` for one workspace's members, ordered by `sortBy` and `sortOrder`, one `page` of `limit` rows (at most 100).                                                                                                                                                                                                                                                 |
| GET    | `/api/admin/users/{userId}`                                                                                                                                                                                                                                                                                            | Read one person as a super admin: their workspaces, most recent chat sessions, Crons, Sensei container and Turns, the reports and blocks that name them, their devices, and everything they gave Kosuke: integrations, the inboxes Sensei reads, location sharing, model sign-ins and API Keys. Not found for an unknown person.                                                                                                                                                                                                                                             |
| GET    | `/api/admin/users/{userId}/devices`                                                                                                                                                                                                                                                                                    | List every client a person uses on this deployment as a super admin: Macs, iPhones, Watches, glasses, CLI keys and live browser sessions, with app version, channel and whether it is outdated. Never an IP address. Not found for an unknown person.                                                                                                                                                                                                                                                                                                                        |
| GET    | `/api/admin/users/{userId}/free-allowance`                                                                                                                                                                                                                                                                             | Read a person's Kosuke Free allowance as a super admin: the global prompt cap, their own grant if any, the prompts used, whether they hold a subscription of their own, and whether their email is disposable. Not found for an unknown person.                                                                                                                                                                                                                                                                                                                              |
| PATCH  | `/api/admin/users/{userId}/free-allowance`                                                                                                                                                                                                                                                                             | Set a person's own Kosuke Free prompt grant as a super admin (`promptGrant`, 1 to 10,000), or clear it back to the global cap with null. Answers the allowance as the read does.                                                                                                                                                                                                                                                                                                                                                                                             |
| GET    | `/api/admin/users/{userId}/memory`                                                                                                                                                                                                                                                                                     | Read a member's Memory as a super admin, as stored: general.md, and writing.md with how it was built; an Admin Token reads writing.md without its text. Never seeds or writes a file.                                                                                                                                                                                                                                                                                                                                                                                        |
| GET    | `/api/admin/users/{userId}/sensei?tz=&page=`                                                                                                                                                                                                                                                                           | Read a person's Sensei as a super admin: their Turns, newest first, 50 a `page`, where their Sensei runs, their workspaces, token windows, and their active days in `tz` (your own zone by default); thread titles are left out for an Admin Token. Not found for an unknown person.                                                                                                                                                                                                                                                                                         |
| GET    | `/api/admin/users/{userId}/sensei/chat?day=&tz=`                                                                                                                                                                                                                                                                       | Read one `day` (today by default, in `tz`, your own zone by default) of a member's Sensei single chat as a super admin: events by hour, the reads and what they wrote, cards, agents, compactions and clean-inbox runs. An audited read, recorded first.                                                                                                                                                                                                                                                                                                                     |
| GET    | `/api/admin/users/{userId}/sensei/chat/hour?day=&tz=&hour=`                                                                                                                                                                                                                                                            | Read what a member saw in their Sensei single chat during one `hour` (0 to 23) of `day` (today by default) in `tz` (your own zone by default), as their transcript draws it, as a super admin. An audited read, recorded before any row is read.                                                                                                                                                                                                                                                                                                                             |
| GET    | `/api/admin/users/{userId}/sensei/chat/mode`                                                                                                                                                                                                                                                                           | Read how often a member's Sensei single chat reads and the chat's thread id, as a super admin. No text of the chat, so no audited read. Not found for an unknown person.                                                                                                                                                                                                                                                                                                                                                                                                     |
| GET    | `/api/admin/users/{userId}/sensei/chat/prompts?day=&tz=&hour=`                                                                                                                                                                                                                                                         | List what Sensei's model was sent in a member's single chat during one `hour` (0 to 23) of `day` in `tz`, as a super admin: each Turn's system prompt, request, replies and tool calls, from what its run keeps. An audited read, recorded before any run is read.                                                                                                                                                                                                                                                                                                           |
| GET    | `/api/admin/users/{userId}/sensei/decisions?page=&pageSize=`                                                                                                                                                                                                                                                           | List one member's Sensei card decisions as a super admin, newest first, `pageSize` (1 to 100, 25 by default) a page, each card's headline included; an Admin Token never reads card text. Not found for an unknown person.                                                                                                                                                                                                                                                                                                                                                   |
| GET    | `/api/admin/users/{userId}/sensei/events?before=`                                                                                                                                                                                                                                                                      | List a member's every stored Sensei event, routed or not, as a super admin, newest page first; `before` pages back. An audited read. Not found for an unknown person.                                                                                                                                                                                                                                                                                                                                                                                                        |
| GET    | `/api/admin/users/{userId}/sensei/infrastructure`                                                                                                                                                                                                                                                                      | Read where a person's Sensei runs as a super admin: its state, home size, last backup and estimated monthly cost, `sensei` null for a person with none. Look only.                                                                                                                                                                                                                                                                                                                                                                                                           |
| GET    | `/api/admin/users/{userId}/sensei/threads?creator=&kind=&state=&from=&to=&page=&pageSize=&title=&tz=`                                                                                                                                                                                                                  | List one person's Sensei threads as a super admin, metadata and titles, filtered, sorted and paged; `from` and `to` are days of `tz` (your own zone by default). A `title` search reads thread text: recorded before it runs, and refused to an Admin Token.                                                                                                                                                                                                                                                                                                                 |
| GET    | `/api/admin/users/{userId}/sensei/threads/{threadId}?before=&turnId=&notificationDiagnostics=`                                                                                                                                                                                                                         | Read one of a member's Sensei threads as its transcript, as a super admin, newest page first: `before` pages back, `turnId` opens at one Turn, `notificationDiagnostics` true adds its notification registrations and traces. An audited read. Not found when the thread is not theirs.                                                                                                                                                                                                                                                                                      |
| GET    | `/api/admin/users/{userId}/sensei/threads/{threadId}/events?before=`                                                                                                                                                                                                                                                   | List one of a member's Sensei threads' events as a super admin, newest page first; `before` pages back. An audited read. Not found when the thread is not theirs.                                                                                                                                                                                                                                                                                                                                                                                                            |
| GET    | `/api/admin/users/{userId}/sensei/threads/{threadId}/turns`                                                                                                                                                                                                                                                            | List a member's Sensei thread's Turns as a super admin, newest first, each with what started it, its status, attempt, timing, tokens and run. Metadata only; not found when the thread is not theirs.                                                                                                                                                                                                                                                                                                                                                                        |
| GET    | `/api/admin/users/{userId}/taste`                                                                                                                                                                                                                                                                                      | Read a member's hidden taste.md as a super admin, null before its first build: its text, revision, build time, stats and size; an Admin Token reads all but the text.                                                                                                                                                                                                                                                                                                                                                                                                        |
| GET    | `/api/admin/users/export?search=&q=&signInMethod=&source=&onboarding=&orgId=&sortBy=&sortOrder=`                                                                                                                                                                                                                       | Download the Users list as CSV, as a super admin: the people the list's filters keep, in its order, at most 10,000 rows, with sign-in method, source, onboarding, workspaces, chats and when they were last active and joined.                                                                                                                                                                                                                                                                                                                                               |
| GET    | `/api/admin/users/filter-options`                                                                                                                                                                                                                                                                                      | List the signup sources people arrived with, as a super admin, as the Users list's filter offers them.                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

## Examples

```bash
kosuke admin users list
kosuke admin workspaces get <workspaceId>
kosuke admin feature-flags list
```
