{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elaichi-ai/json-schema/elaichi-ai-team-schema.json",
  "title": "Team",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elaichi-ai-openapi.json#/components/schemas/Team",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Team id (`team_…`)."
    },
    "name": {
      "type": "string",
      "description": "Unique within the organization."
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "member_count": {
      "type": "integer",
      "description": "How many people are in the team. The row carries no roster array; `GET /team/{id}/member` is the roster."
    },
    "admin_count": {
      "type": "integer",
      "description": "How many of them administer the team."
    },
    "admin_preview": {
      "type": "array",
      "description": "The first few administrators, with display names already resolved, so a client can name them without a lookup per row. At most 5 — a preview for a hover, never the set; `admin_count` is the size. `name` and `email` are both null for someone who has left the organization.",
      "items": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "avatar_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The person's picture: their stored profile picture, else a Gravatar URL (`d=404`, 96px) derived from their email (the address itself is not sent), else null. Draw initials when it is null or the image fails to load."
          },
          "is_admin": {
            "type": "boolean",
            "description": "Always true here."
          }
        }
      }
    },
    "member_preview": {
      "type": "array",
      "description": "The same, for the first few members (administrators included, flagged by `is_admin`). `member_count` is the size; `GET /team/{id}/member` is the full, paginated roster.",
      "items": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "avatar_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The person's picture: their stored profile picture, else a Gravatar URL (`d=404`, 96px) derived from their email (the address itself is not sent), else null. Draw initials when it is null or the image fails to load."
          },
          "is_admin": {
            "type": "boolean"
          }
        }
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}