---
title: "ADMIN-OPS-001 — paginated account list with search (admin-gated)"
method: GET
path: "/api/v1/admin/accounts"
tags: ["admin"]
---

# ADMIN-OPS-001 — paginated account list with search (admin-gated)

`GET /api/v1/admin/accounts`

## Request

- Base URL: `https://api.badgeia.com`
- URL: `https://api.badgeia.com/api/v1/admin/accounts`
- Auth: none declared

List platform accounts, newest first, with per-account activity counts.

Per row: id, email, plan, is_paid (stripe_subscription_id present),
is_active, email_verified, agent_count, run_count, created_at, last_active
(best-effort — max of the account's last run and last successful login).

N+1 avoidance: the agent counts, run counts, last-run and last-login
timestamps are each computed in ONE grouped query over the page's user-id
set, not per-row.

Auth: anonymous → 401, non-admin → 403, admin → 200. Flag-off → 404
(rule #4). Pagination caps at 100 (rule #9).

Privacy: password hashes / stripe ids / tokens are NEVER serialized — see
`_account_row`.

## Query parameters

- `page` integer
- `page_size` integer
- `search` string, nullable: Case-insensitive email substring filter.

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/badgeia/apis/badge.md) · [All operations](https://skmtc.dev/badgeia/apis/badge/llms.txt) · [OpenAPI document](https://skmtc.dev/badgeia/apis/badge/revisions/7e7f7fee8b77?raw)
