{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/miro/json-schema/miro-legal-hold-response-schema.json",
  "title": "LegalHoldResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/miro-legal-holds-api-openapi.yml#/components/schemas/LegalHoldResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9]+$",
      "description": "Unique identifier of the legal hold."
    },
    "organizationId": {
      "type": "string",
      "pattern": "^[0-9]+$",
      "description": "Unique identifier of the organization."
    },
    "caseId": {
      "type": "string",
      "pattern": "^[0-9]+$",
      "description": "Unique identifier of the case."
    },
    "name": {
      "type": "string",
      "description": "The name of the legal hold."
    },
    "description": {
      "type": "string",
      "description": "The description of the legal hold."
    },
    "state": {
      "$ref": "#/$defs/LegalHoldState"
    },
    "scope": {
      "$ref": "#/$defs/LegalHoldResponseScope"
    },
    "createdBy": {
      "$ref": "#/$defs/User"
    },
    "lastModifiedBy": {
      "$ref": "#/$defs/User"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "lastModifiedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "createdAt",
    "createdBy",
    "id",
    "caseId",
    "lastModifiedAt",
    "name",
    "organizationId",
    "scope",
    "scopeValue",
    "state"
  ],
  "$defs": {
    "LegalHoldResponseScope": {
      "description": "The legal hold scope determines the criteria used to put content items under hold. The variants of this field might get extended in the future, although the most common use case is to put users under hold. Currently only the `users` scope is supported. However, the parsing of this field must ignore unexpected variants.",
      "oneOf": [
        {
          "$ref": "#/$defs/LegalHoldResponseScopeUsers"
        }
      ]
    },
    "LegalHoldResponseScopeUsers": {
      "title": "Users scope",
      "type": "object",
      "description": "List of users under legal hold.",
      "properties": {
        "users": {
          "type": "array",
          "minItems": 1,
          "maxItems": 200,
          "items": {
            "$ref": "#/$defs/User"
          }
        }
      }
    },
    "LegalHoldState": {
      "type": "string",
      "description": "The state of the legal hold. Legal holds could take up to 24 hours to be processed and the state could be one of the following:\n- `PROCESSING`: the legal hold is being created and content items are being processed.\n- `ACTIVE`: the legal hold has been created and all content items have been processed.\n- `DELETING`: the legal hold is being deleted and content items are being processed.\n",
      "enum": [
        "PROCESSING",
        "ACTIVE",
        "DELETING"
      ]
    },
    "User": {
      "description": "User information.",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of the user."
        },
        "email": {
          "type": "string",
          "description": "User email."
        },
        "firstName": {
          "type": "string",
          "description": "First name of the user."
        },
        "lastName": {
          "type": "string",
          "description": "Last name of the user."
        }
      },
      "required": [
        "id",
        "email",
        "firstName",
        "lastName"
      ]
    }
  }
}