{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/1password/json-schema/1password-app-patch-schema.json",
  "title": "AppPatch",
  "description": "Selected application fields to update. Omitted fields are left unchanged; fields set to null are cleared.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/1password-applications-api-openapi.yml#/components/schemas/AppPatch",
  "type": "object",
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The application's unique ID",
      "readOnly": true
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The application name (read-only; derived from the underlying global application)",
      "readOnly": true
    },
    "instanceName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The instance name, used to distinguish multiple instances of the same application"
    },
    "status": {
      "enum": [
        "New",
        "InReview",
        "Managed",
        "Accepted",
        "Ignored",
        "PlanToClose",
        "Closed"
      ],
      "type": [
        "string",
        "null"
      ],
      "description": "The application's status, e.g. New, InReview, Managed, Accepted, Ignored, PlanToClose, Closed"
    },
    "roles": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Role"
      },
      "description": "Replace the application's owner roles. Members are matched by ID, email or name."
    },
    "riskLevel": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional OAuth access risk level: Low, Medium or High",
      "readOnly": true
    },
    "vendor": {
      "allOf": [
        {
          "$ref": "#/$defs/CompactVendor"
        }
      ],
      "description": "The application's vendor",
      "readOnly": true
    },
    "licenses": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/License"
      },
      "description": "The application's license plans",
      "readOnly": true
    },
    "customFields": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {},
      "description": "Custom field values to set, keyed by the field's lookup key"
    },
    "createdBy": {
      "allOf": [
        {
          "$ref": "#/$defs/UserInfo"
        }
      ],
      "description": "The user that created the application record",
      "readOnly": true
    },
    "createdDtm": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp for when the application record was created",
      "format": "date-time",
      "readOnly": true
    },
    "lastModifiedBy": {
      "allOf": [
        {
          "$ref": "#/$defs/UserInfo"
        }
      ],
      "description": "The user that last modified the application record",
      "readOnly": true
    },
    "lastModifiedDtm": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp for when the application record was last modified",
      "format": "date-time",
      "readOnly": true
    }
  },
  "additionalProperties": false,
  "$defs": {
    "CompactVendor": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The vendor's id"
        },
        "name": {
          "type": "string",
          "description": "The vendor's name"
        }
      },
      "additionalProperties": false,
      "description": "An app vendor"
    },
    "License": {
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the license",
          "readOnly": true
        },
        "licensePlanId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The licence plan id",
          "readOnly": true
        },
        "startDate": {
          "type": "string",
          "description": "The date the license started",
          "format": "date-time",
          "readOnly": true
        },
        "renewalDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "The renewal date of the license",
          "format": "date-time",
          "readOnly": true
        },
        "terminatedDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "The date the license was terminated",
          "format": "date-time",
          "readOnly": true
        },
        "lastModifiedDtm": {
          "type": [
            "string",
            "null"
          ],
          "description": "The timestamp that this data was last updated at",
          "format": "date-time",
          "readOnly": true
        }
      },
      "additionalProperties": false,
      "description": "App license details"
    },
    "Role": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The role name"
        },
        "members": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RoleMember"
          },
          "description": "Users who possess this role"
        }
      },
      "additionalProperties": false,
      "description": "A role"
    },
    "RoleMember": {
      "type": "object",
      "properties": {
        "userId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The user's id"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The user's name"
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "description": "The user's e-mail address"
        }
      },
      "additionalProperties": false,
      "description": "A member of a role"
    },
    "UserInfo": {
      "type": "object",
      "properties": {
        "userId": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    }
  }
}