{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/sendgrid/main/json-schema/sendgrid-contactdb-segments-conditions-schema.json",
  "title": "ContactDB: Segments: Conditions",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendgrid-recipients-api-openapi.yml#/components/schemas/ContactdbSegmentsConditions",
  "type": "object",
  "properties": {
    "field": {
      "type": "string"
    },
    "value": {
      "type": "string"
    },
    "operator": {
      "type": "string",
      "$ref": "#/$defs/Operator"
    },
    "and_or": {
      "type": "string",
      "$ref": "#/$defs/AndOr"
    }
  },
  "required": [
    "field",
    "value",
    "operator"
  ],
  "$defs": {
    "AndOr": {
      "type": "string",
      "enum": [
        "and",
        "or",
        ""
      ]
    },
    "Operator": {
      "type": "string",
      "enum": [
        "eq",
        "ne",
        "lt",
        "gt",
        "contains"
      ]
    }
  }
}