{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rumoro-dev/json-schema/rumoro-dev-group-schema.json",
  "title": "Group",
  "description": "The keyword's group.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rumoro-dev-groups-api-openapi.yml#/components/schemas/Group",
  "allOf": [
    {
      "$ref": "#/$defs/GroupRef"
    },
    {
      "type": "object",
      "properties": {
        "context": {
          "type": [
            "string",
            "null"
          ],
          "description": "A company description just for this group, which the classifier reads. Null means the workspace profile is used."
        },
        "stats": {
          "type": "object",
          "properties": {
            "keywords": {
              "type": "integer",
              "minimum": 0,
              "description": "Number of keywords in the group, muted or not."
            },
            "active": {
              "type": "integer",
              "minimum": 0,
              "description": "Number of unmuted keywords in the group."
            }
          },
          "required": [
            "keywords",
            "active"
          ],
          "description": "Counted from the group's keywords."
        },
        "createdAt": {
          "type": "string",
          "description": "UTC time in ISO 8601."
        },
        "updatedAt": {
          "type": "string",
          "description": "UTC time in ISO 8601."
        }
      },
      "required": [
        "context",
        "stats",
        "createdAt",
        "updatedAt"
      ]
    }
  ],
  "$defs": {
    "GroupRef": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The group's id (grp_...)."
        },
        "name": {
          "type": "string",
          "description": "Name of the group."
        },
        "externalId": {
          "type": [
            "string",
            "null"
          ],
          "description": "An id from your own system, or null."
        },
        "isDefault": {
          "type": "boolean",
          "description": "True for the workspace's default group. New keywords go there when you don't name a group."
        }
      },
      "required": [
        "id",
        "name",
        "externalId",
        "isDefault"
      ],
      "description": "The keyword's group."
    }
  }
}