{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/latitude-so/json-schema/latitude-so-update-project-body-schema.json",
  "title": "UpdateProjectBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/latitude-so-projects-api-openapi.yml#/components/schemas/UpdateProjectBody",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "description": "New human-readable name. Renaming never changes the slug."
    },
    "settings": {
      "$ref": "#/$defs/ProjectSettingsPatch"
    },
    "flaggers": {
      "type": "object",
      "properties": {
        "frustration": {
          "type": "boolean"
        },
        "nsfw": {
          "type": "boolean"
        },
        "refusal": {
          "type": "boolean"
        },
        "laziness": {
          "type": "boolean"
        },
        "jailbreaking": {
          "type": "boolean"
        },
        "forgetting": {
          "type": "boolean"
        },
        "trashing": {
          "type": "boolean"
        },
        "bluffing": {
          "type": "boolean"
        },
        "pii-leakage": {
          "type": "boolean"
        },
        "incompletion": {
          "type": "boolean"
        },
        "tool-call-errors": {
          "type": "boolean"
        },
        "output-schema-validation": {
          "type": "boolean"
        },
        "empty-response": {
          "type": "boolean"
        },
        "low-cache-hit-rate": {
          "type": "boolean"
        },
        "task-failure": {
          "type": "boolean"
        }
      },
      "description": "Enable or disable specific flaggers for the project. Keys are flagger slugs; values are the new `enabled` state. Omitted slugs are left untouched."
    }
  },
  "$defs": {
    "DestinationNotificationsSetting": {
      "type": "object",
      "properties": {
        "quarantine": {
          "type": "boolean",
          "description": "Notify org members when a data destination is quarantined after repeated sync failures. Defaults to `true` when omitted."
        }
      },
      "description": "Project-level opt-out for data-destination notifications."
    },
    "EscalationSetting": {
      "type": "object",
      "properties": {
        "sensitivity": {
          "type": "integer",
          "minimum": 1,
          "maximum": 6,
          "description": "Sensitivity of the escalation detector, 1 (most sensitive, more incidents) to 6 (least sensitive, fewer incidents). Defaults to a balanced value when omitted."
        }
      },
      "description": "Tuning parameters for the escalation detector. Affects detector behaviour regardless of whether notifications are enabled."
    },
    "IncidentNotificationsSetting": {
      "type": "object",
      "properties": {
        "signal.escalating": {
          "type": "boolean",
          "description": "Send a notification when an active signal is escalating in volume or severity. Defaults to `true` when omitted."
        },
        "monitor.match": {
          "type": "boolean",
          "description": "Send a notification when a match monitor opens an incident. Defaults to `true` when omitted."
        },
        "monitor.threshold": {
          "type": "boolean",
          "description": "Send a notification when a threshold monitor opens an incident. Defaults to `true` when omitted."
        },
        "monitor.escalating": {
          "type": "boolean",
          "description": "Send a notification when an escalating monitor opens an incident. Defaults to `true` when omitted."
        }
      },
      "description": "Per-alert-kind opt-out for incident notifications."
    },
    "NotificationsSetting": {
      "type": "object",
      "properties": {
        "incidents": {
          "$ref": "#/$defs/IncidentNotificationsSetting"
        },
        "destinations": {
          "$ref": "#/$defs/DestinationNotificationsSetting"
        }
      },
      "description": "Per-group project-level notification toggles (`incidents`, `destinations`)."
    },
    "ProjectSettingsPatch": {
      "type": "object",
      "properties": {
        "keepMonitoring": {
          "type": "boolean",
          "description": "When `true`, the evaluation linked to an signal keeps running after the signal is resolved. When `false`, resolving the signal stops the evaluation. Defaults to `true` when omitted."
        },
        "redaction": {
          "$ref": "#/$defs/RedactionSetting"
        },
        "notifications": {
          "$ref": "#/$defs/NotificationsSetting"
        },
        "escalation": {
          "$ref": "#/$defs/EscalationSetting"
        }
      },
      "description": "Patch the project's settings overrides. Only the fields you send are changed; omitted fields keep their stored values. To clear overrides entirely, edit via the web UI."
    },
    "RedactionSetting": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "off",
            "enforce"
          ],
          "description": "`enforce` scans span content as it is ingested and replaces matches with a labelled placeholder such as `[REDACTED_EMAIL]`; `off` scans nothing. Defaults to `off` when omitted. Applies only to spans ingested after the change, takes effect within a minute, and redacted content cannot be recovered."
        },
        "entities": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "email",
              "phone",
              "credit_card",
              "iban",
              "us_ssn",
              "ip_address",
              "secret"
            ]
          },
          "maxItems": 7,
          "description": "Which categories to look for. Defaults to email, phone, credit_card, iban, us_ssn, secret when omitted; `ip_address` is off by default because a dotted quad and a four-part version string are the same string. Detection is pattern based: it reliably catches structured identifiers, and does not catch names, addresses, or free-form personal detail."
        },
        "scopes": {
          "type": "object",
          "properties": {
            "metadata": {
              "type": "boolean",
              "description": "Also scan the metadata map and tags. Defaults to `false` when omitted, because metadata is usually operational and redacting it removes values you filter and group by."
            }
          },
          "description": "Which span fields to scan beyond message and tool content."
        },
        "identities": {
          "type": "string",
          "enum": [
            "keep",
            "pseudonymize"
          ],
          "description": "How to handle `userId` and `userEmail`. `keep` stores them unchanged; `pseudonymize` replaces each with a stable per-organization pseudonym so filtering and grouping by user keep working. Defaults to `keep` when omitted. Deployments with no pseudonym secret configured remove the identifier entirely instead."
        }
      },
      "description": "Server-side PII redaction applied before spans are stored. An organization-wide policy can override this one; when the organization locks its policy, project values are ignored entirely rather than merged."
    }
  }
}