{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/Sharathvc23/forgetproof/main/schemas/forget-me/v1/submit-request.schema.json",
  "title": "ForgetMe v1: POST {endpoint}/submit request",
  "description": "The exact terms the person confirmed, plus the client's idempotency key, plus `approvals`: for each recipient exception chosen `delete` whose preview carried a recipient's exact terms (`approval`), the operation id and revision the person saw. `exceptions` must decide every exception the preview listed and nothing else (the server answers 400 terms_incomplete otherwise, also when a required approval is missing or names other terms). Strict: nothing else is accepted.",
  "type": "object",
  "properties": {
    "scope": {
      "$ref": "common.schema.json#/$defs/scope",
      "default": "item"
    },
    "reference": {
      "$ref": "common.schema.json#/$defs/reference"
    },
    "exceptions": {
      "$ref": "common.schema.json#/$defs/exceptions-chosen"
    },
    "idempotency_key": {
      "$ref": "common.schema.json#/$defs/idempotency-key"
    },
    "approvals": {
      "$ref": "common.schema.json#/$defs/approvals-given"
    }
  },
  "required": [
    "exceptions",
    "idempotency_key"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "scope": {
          "const": "item"
        }
      },
      "required": [
        "reference"
      ]
    },
    {
      "properties": {
        "scope": {
          "const": "account"
        }
      },
      "required": [
        "scope"
      ],
      "not": {
        "required": [
          "reference"
        ]
      }
    }
  ]
}
