Skip to main content

Admin Summary API

Retrieve a consolidated admin dashboard summary including service health, trial statistics, and agent status breakdowns.

Get admin summary

GET /api/admin/summary
Requires session authentication with an admin email. Returns service health checks, active trial counts, expiring trial users, agent status totals, and recent agent errors.

Authentication

The authenticated user’s email must be in the ADMIN_EMAILS environment variable (comma-separated list). Non-admin users receive a 403 response.

Response

{
  "serviceHealth": [
    { "name": "Agentbot API", "status": "ok", "detail": "ok" },
    { "name": "Tempo Soul", "status": "ok", "detail": "ok" },
    { "name": "x402 Gateway", "status": "degraded", "detail": "HTTP 502" }
  ],
  "trial": {
    "active": 12,
    "expiringSoon": [
      {
        "id": "user_abc123",
        "email": "user@example.com",
        "endsAt": "2026-04-04T00:00:00.000Z",
        "daysLeft": 2
      }
    ]
  },
  "agents": {
    "totals": {
      "running": 8,
      "stopped": 3,
      "error": 1
    },
    "recentErrors": [
      {
        "id": "agent_xyz",
        "name": "my-agent",
        "userId": "user_abc123",
        "updatedAt": "2026-04-02T12:00:00.000Z",
        "status": "error"
      }
    ]
  },
  "timestamp": "2026-04-02T12:00:00.000Z"
}

Response fields

FieldTypeDescription
serviceHealtharrayHealth status of monitored platform services. See dashboard health for the service health format.
serviceHealth[].namestringService display name
serviceHealth[].statusstringService status: ok, degraded, or down
serviceHealth[].detailstringAdditional detail such as an HTTP status code or error message
trial.activenumberNumber of users on the free plan with an active trial
trial.expiringSoonarrayUsers whose trial expires within the next 3 days, ordered by expiration date. Returns up to 12 entries.
trial.expiringSoon[].idstringUser ID
trial.expiringSoon[].emailstringUser email
trial.expiringSoon[].endsAtstringISO 8601 trial expiration timestamp
trial.expiringSoon[].daysLeftnumberDays remaining on the trial
agents.totalsobjectAgent counts grouped by status. Keys are status values (for example running, stopped, error) and values are counts.
agents.recentErrorsarrayUp to 5 most recently updated agents in the error state
agents.recentErrors[].idstringAgent ID
agents.recentErrors[].namestringAgent name
agents.recentErrors[].userIdstringOwner’s user ID
agents.recentErrors[].updatedAtstringISO 8601 timestamp of the last status update
agents.recentErrors[].statusstringAlways error
timestampstringISO 8601 timestamp of when the summary was generated

Errors

CodeDescription
403Unauthorized — user is not authenticated or is not an admin