{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/namirial/json-schema/namirial-team-replace-request-schema.json",
  "title": "TeamReplaceRequest",
  "description": "The request model for replacing the teams.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/namirial-team-api-openapi.yml#/components/schemas/TeamReplaceRequest",
  "required": [
    "Teams"
  ],
  "type": "object",
  "properties": {
    "Teams": {
      "description": "The teams which will replace all the existing teams.",
      "maxItems": 1000,
      "type": "array",
      "items": {
        "$ref": "#/$defs/TeamReplaceTeam"
      }
    }
  },
  "$defs": {
    "TeamReplaceTeam": {
      "description": "A team within the organization.",
      "required": [
        "Name"
      ],
      "type": "object",
      "properties": {
        "Name": {
          "description": "The name of the team.",
          "maxLength": 500,
          "minLength": 0,
          "type": "string"
        },
        "ShareEnvelopes": {
          "description": "If true, envelopes are shared with team members.",
          "type": "boolean"
        },
        "ShareTemplates": {
          "description": "If true, templates are shared with team members.",
          "type": "boolean"
        },
        "Head": {
          "$ref": "#/$defs/TeamReplaceTeamMember",
          "description": "The leader of the team."
        }
      }
    },
    "TeamReplaceTeamMember": {
      "description": "A member of the team.",
      "type": "object",
      "properties": {
        "Email": {
          "description": "The email address of the team member.\nThis references a user email address.",
          "maxLength": 250,
          "minLength": 0,
          "pattern": "^[a-zA-Z\\u00A0-\\uD7FF\\uE000-\\uFFFF0-9.!#$%&'*+\\-\\/=?^_`{|}~]+@(?=[a-z0-9A-Z\\u00A0-\\uD7FF\\uE000-\\uFFFF])(?:[a-z0-9A-Z\\u00A0-\\uD7FF\\uE000-\\uFFFF]|(?<![.-])\\.|(?<!\\.)-)*[a-z0-9A-Z\\u00A0-\\uD7FF\\uE000-\\uFFFF]$",
          "type": "string"
        },
        "Members": {
          "description": "The members of the subteam.",
          "maxItems": 1000,
          "type": "array",
          "items": {
            "$ref": "#/$defs/TeamReplaceTeamMember"
          }
        }
      }
    }
  }
}