{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/acronis/main/json-schema/acronis-tenant-post-schema.json",
  "title": "tenantPost",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acronis-tenants-api-openapi.yml#/components/schemas/tenantPost",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "name",
    "parent_id",
    "kind"
  ],
  "properties": {
    "name": {
      "description": "Human-readable name that will be displayed to the users.",
      "type": "string"
    },
    "parent_id": {
      "$ref": "#/$defs/uuid"
    },
    "kind": {
      "$ref": "#/$defs/tenantKind"
    },
    "contact": {
      "$ref": "#/$defs/contactPut"
    },
    "company_billing_contact": {
      "$ref": "#/$defs/contactPut"
    },
    "enabled": {
      "description": "Flag, indicates whether the tenant is enabled or disabled.",
      "type": "boolean"
    },
    "customer_id": {
      "description": "ID from external system; for reporting purposes.",
      "type": "string"
    },
    "internal_tag": {
      "description": "Internal tag. This field can have a null value.",
      "type": [
        "string",
        "null"
      ]
    },
    "language": {
      "description": "Preferred locale.",
      "type": "string"
    },
    "default_idp_id": {
      "$ref": "#/$defs/uuid"
    },
    "update_lock": {
      "type": "object",
      "required": [
        "enabled"
      ],
      "properties": {
        "enabled": {
          "description": "If true, updating the tenant via API is not allowed to anyone except for users of the tenant that owns the lock.",
          "type": "boolean"
        }
      }
    },
    "ancestral_access": {
      "description": "Access to newly created tenant from ancestors.",
      "type": "boolean"
    },
    "settings": {
      "type": "object",
      "properties": {
        "enhanced_security": {
          "description": "Enables PCI DSS mode.",
          "type": "boolean"
        }
      }
    }
  },
  "$defs": {
    "contactPut": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "tenant_id": {
          "$ref": "#/$defs/uuid"
        },
        "user_id": {
          "$ref": "#/$defs/uuid"
        },
        "types": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "enum": [
              "legal",
              "primary",
              "billing",
              "technical",
              "management"
            ],
            "type": "string"
          }
        },
        "email": {
          "$ref": "#/$defs/email"
        },
        "address1": {
          "type": [
            "string",
            "null"
          ]
        },
        "address2": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "type": [
            "string",
            "null"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "zipcode": {
          "type": [
            "string",
            "null"
          ]
        },
        "phone": {
          "type": [
            "string",
            "null"
          ]
        },
        "firstname": {
          "type": [
            "string",
            "null"
          ]
        },
        "lastname": {
          "type": [
            "string",
            "null"
          ]
        },
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "website": {
          "type": [
            "string",
            "null"
          ]
        },
        "industry": {
          "type": [
            "string",
            "null"
          ]
        },
        "organization_size": {
          "type": [
            "string",
            "null"
          ]
        },
        "email_confirmed": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "aan": {
          "type": [
            "string",
            "null"
          ]
        },
        "language": {
          "type": [
            "string",
            "null"
          ]
        },
        "fax": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "email": {
      "type": "string",
      "pattern": "^$|\\S+@\\S+"
    },
    "tenantKind": {
      "description": "A tenant kind.",
      "enum": [
        "root",
        "partner",
        "folder",
        "customer",
        "unit"
      ],
      "type": "string"
    },
    "uuid": {
      "type": "string",
      "pattern": "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}",
      "minLength": 36,
      "maxLength": 36
    }
  }
}