{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/uptimemonitoring-com/json-schema/uptimemonitoring-com-account-schema.json",
  "title": "Account",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/uptimemonitoring-com-openapi.yaml#/components/schemas/Account",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64"
    },
    "handle": {
      "type": "string",
      "description": "Six-character lowercase Crockford base32 ref-prefix (issue #412), e.g. \"k7q2mx\" — stable, unique, never reused. Safe to show to the account's own members: unlike id, it is not sequential and does not reveal account count or age."
    },
    "github_id": {
      "type": "integer",
      "format": "int64",
      "description": "GitHub numeric ID of the account's owner. Since issue #311,\nsourced from `users.github_id` via the account's owner\nmembership (`account_members`), not a column on `accounts`\nitself — display-only, never an authorization input. `0` for\nan owner whose identity is email-only (issue #315) rather than\nGitHub — never `null`.\n"
    },
    "github_username": {
      "type": "string",
      "description": "GitHub username of the account's owner, sourced the same way\nas github_id. `\"\"` (empty string) for an email-only owner —\nnever `null`.\n"
    },
    "email": {
      "type": [
        "string",
        "null"
      ],
      "description": "Any verified email identity held by the account's owner —\neither the address behind an email-identity sign-in (issue\n#315, sign-in part A) or one GitHub reported as verified and\nprimary, adopted onto the owner's `users` row on a sign-in\nthat found none on file yet (issue #390) — sourced from\n`users.email` via the account's owner membership, the same\nway github_id/github_username are. `null` when the owner holds\nno verified email of either kind. Display-only, never an\nauthorization input; never present on any public,\nunauthenticated surface (`GET /feed/{token}`, `GET\n/feed/{token}/rss`). Omitted entirely (issue #323, team\naccounts B1) unless the authenticated caller's OWN role is\n`owner` (issue #325: an account can have more than one owner,\nso this is no longer \"caller is THE owner\") — a viewer or\nmember on the same account never sees it, regardless of\nwhether the account's (earliest) owner has adopted an email of\neither kind.\n"
    },
    "notification_email": {
      "type": [
        "string",
        "null"
      ]
    },
    "role": {
      "type": "string",
      "enum": [
        "viewer",
        "member",
        "owner"
      ],
      "description": "The AUTHENTICATED CALLER's own authority on this account (issue\n#323, team accounts B1) — not a property of the account itself.\nAlways present. The SPA uses this to hide owner/member-only\ncontrols.\n"
    },
    "is_admin": {
      "type": "boolean",
      "description": "True when the authenticated account is in the admins table —\ni.e. the same answer auth.RequireAdmin returns for any\nadmin-gated route. Always present on GET /api/v1/account and\non the PATCH /api/v1/account success response.\n"
    },
    "last_cap_hit_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Timestamp of the latest successfully recorded POST\n/api/v1/monitors (or MCP create_monitor) rejection for hitting\nthe per-account hard cap (100 monitors) — not a guaranteed\nlatest-refusal timestamp. Updates are coalesced to at most once\nper account per minute, and a failure to record a hit is\nswallowed (the REST 409 or MCP tool-error result the client\nsees is unaffected either way), so a refusal can occur\nwithout advancing this field, and null\ndoes not prove the account has never been refused. Advisory\nonly — the app uses it to time an upgrade offer; never cleared\nonce set.\n"
    },
    "silent_monitors": {
      "type": "integer",
      "description": "Count of ENABLED monitors on this account with no ACTIVE\nattached recipient (issue #212). \"Active\" excludes a disabled\nrecipient and a still-unconfirmed (`pending`) email recipient\n(issue #321) — a monitor whose only attached recipient is\npending or disabled is counted as silent, the same as one with\nno attached recipient at all. Disabling a monitor removes it\nfrom this count — a disabled, unreachable monitor is not\nflagged as silent since it is not being checked. Present on\nboth `GET` and `PATCH /api/v1/account`.\n"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}