{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sprkly-app/json-schema/sprkly-app-me-schema.json",
  "title": "Me",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sprkly-app-openapi.yml#/components/schemas/Me",
  "type": "object",
  "properties": {
    "userId": {
      "type": "string"
    },
    "plan": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "free",
        "trial",
        "starter",
        "pro",
        "api",
        null
      ],
      "description": "Plan tier. Creator and Brand read as starter, Pro and Agency as pro."
    },
    "key": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "prefix": {
          "type": "string",
          "description": "The first 12 characters of the key. The key itself is never returned."
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "profileIds": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "The accounts this key may use. null means every account."
        }
      }
    }
  }
}