{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/acronis/main/json-schema/acronis-user-post-schema.json",
  "title": "userPost",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acronis-users-api-openapi.yml#/components/schemas/userPost",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "tenant_id"
  ],
  "properties": {
    "tenant_id": {
      "description": "ID of tenant this user belongs to.",
      "type": "string"
    },
    "login": {
      "description": "User's login.",
      "type": "string"
    },
    "external_id": {
      "description": "User's ID in external identity provider (e.g. SID in AD).",
      "type": "string"
    },
    "idp_id": {
      "$ref": "#/$defs/uuid"
    },
    "contact": {
      "type": "object",
      "required": [
        "email"
      ],
      "properties": {
        "email": {
          "$ref": "#/$defs/email"
        },
        "address1": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "address2": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "city": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "zipcode": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "phone": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "firstname": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "lastname": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "title": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "website": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "industry": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "organization_size": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "aan": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "fax": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "language": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "enabled": {
      "description": "Flag, indicates whether the user is enabled or disabled.",
      "type": "boolean"
    },
    "language": {
      "description": "Preferred locale.",
      "type": "string"
    },
    "business_types": {
      "$ref": "#/$defs/business_types"
    },
    "notifications": {
      "$ref": "#/$defs/userNotifications"
    },
    "use_existing_identity": {
      "description": "Use existing identity (user with same login already exists).",
      "type": "boolean"
    },
    "origin_id": {
      "description": "User's origin ID, for example, ID of a Cyber Application responsible for creating this user.",
      "type": "string"
    },
    "origin_external_id": {
      "description": "User's external origin ID.",
      "type": "string"
    },
    "disable_after": {
      "$ref": "#/$defs/item1"
    }
  },
  "$defs": {
    "business_types": {
      "description": "Business types.",
      "type": "array",
      "items": {
        "enum": [
          "buyer"
        ],
        "type": "string"
      }
    },
    "email": {
      "type": "string",
      "pattern": "^$|\\S+@\\S+"
    },
    "item1": {
      "description": "RFC3339 Formatted date.",
      "type": "string",
      "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?([\\+\\-]\\d{2}\\:\\d{2})?",
      "minLength": 19,
      "maxLength": 32
    },
    "userNotifications": {
      "description": "User notifications.",
      "type": "array",
      "items": {
        "enum": [
          "maintenance",
          "quota",
          "reports",
          "backup_error",
          "backup_warning",
          "backup_info",
          "backup_daily_report",
          "backup_critical",
          "device_control_warning",
          "certificate_management_error",
          "certificate_management_warning",
          "certificate_management_info"
        ],
        "type": "string"
      }
    },
    "uuid": {
      "type": "string",
      "pattern": "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}",
      "minLength": 36,
      "maxLength": 36
    }
  }
}