{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dotsy-ai/json-schema/dotsy-ai-account-me-schema.json",
  "title": "AccountMe",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dotsy-ai-account-api-openapi.yml#/components/schemas/AccountMe",
  "type": "object",
  "properties": {
    "user": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "email"
      ],
      "description": "The signed-in person. Null for a `pga_` key, which has no user."
    },
    "account": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "name",
        "slug"
      ],
      "description": "The workspace this request acted in."
    },
    "isPlatformAdmin": {
      "type": "boolean"
    },
    "isConsoleAdmin": {
      "type": "boolean",
      "description": "True when the signed-in person may use the dotsy admin console. Always false for a `pga_` key or an OAuth token."
    },
    "servingOriginTemplate": {
      "type": [
        "string",
        "null"
      ],
      "description": "Where published sites are served, with `{slug}` as the placeholder."
    },
    "memberships": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "orgId": {
            "type": "string",
            "description": "Workspace id. Send it (or the slug) as `X-Dotsy-Workspace` to act in that workspace."
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          },
          "ownerEmail": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workspace owner's email. Tells apart workspaces you joined as a guest."
          },
          "plan": {
            "type": "string",
            "enum": [
              "free",
              "core"
            ],
            "description": "Workspace plan. A workspace with no plan row is free."
          },
          "earlyAccess": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "internal",
              "early"
            ],
            "description": "Early access level for this workspace, or null when not opted in."
          },
          "isActive": {
            "type": "boolean",
            "description": "True for the workspace this request acted in (`account`)."
          }
        },
        "required": [
          "orgId",
          "name",
          "slug",
          "role",
          "ownerEmail",
          "plan",
          "earlyAccess",
          "isActive"
        ]
      },
      "description": "Every workspace the person belongs to. Always empty for a `pga_` key."
    },
    "telemetry": {
      "type": "object",
      "properties": {
        "feedbackSink": {
          "type": "string",
          "enum": [
            "ok",
            "degraded",
            "unconfigured"
          ],
          "description": "Whether feedback sent with publishes is being stored: `ok`, `degraded` (queued and retried), or `unconfigured`."
        }
      },
      "required": [
        "feedbackSink"
      ],
      "description": "Health of the services behind this account."
    },
    "features": {
      "type": "object",
      "properties": {
        "notifications": {
          "type": "boolean",
          "description": "Whether this caller can use the notification inbox: it is turned on and the caller is a signed-in person (always false for a `pga_` key)."
        },
        "billing": {
          "type": "boolean",
          "description": "Whether workspace plans and pooled limits are switched on for dotsy (see `GET /api/v1/workspace/plan`)."
        },
        "supportWidget": {
          "type": "boolean",
          "description": "Whether the signed-in support chat is on for this workspace. Follows the support-widget rollout."
        },
        "supportChat": {
          "type": "boolean",
          "description": "Whether the support assistant is on for this workspace. Follows the support-chat rollout."
        },
        "productKit": {
          "type": "boolean",
          "description": "Whether the dashboard's Support section (ideas board and support inbox) is on for this workspace. Follows the product-kit rollout."
        },
        "searchConsole": {
          "type": "boolean",
          "description": "Whether Google Search Console connect is on for the active workspace. Follows the search-console early-access rollout."
        }
      },
      "required": [
        "notifications",
        "billing",
        "supportWidget",
        "supportChat",
        "productKit",
        "searchConsole"
      ],
      "description": "Features this caller can use right now."
    },
    "earlyAccessFeatures": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Staged feature flag names enabled for the active workspace (early access)."
    }
  },
  "required": [
    "user",
    "account",
    "isPlatformAdmin",
    "isConsoleAdmin",
    "servingOriginTemplate",
    "memberships",
    "telemetry",
    "features",
    "earlyAccessFeatures"
  ]
}