# Update Segment

Update a segment with the given segment ID.<br><br>*Rate limits*:<br>Burst: `1/s`<br>Steady: `15/m`<br>Daily: `100/d`

**Scopes:**
`segments:write`

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "Segments API",
    "version": "2024-10-15",
    "description": "The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.",
    "contact": {
      "name": "Klaviyo Developer Experience Team",
      "email": "developers@klaviyo.com",
      "url": "https://developers.klaviyo.com"
    },
    "termsOfService": "https://www.klaviyo.com/legal/api-terms",
    "license": {
      "name": "License",
      "url": "https://www.klaviyo.com/legal"
    }
  },
  "servers": [
    {
      "url": "https://a.klaviyo.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/segments/{id}": {
      "patch": {
        "operationId": "update_segment",
        "summary": "Update Segment",
        "description": "Update a segment with the given segment ID.<br><br>*Rate limits*:<br>Burst: `1/s`<br>Steady: `15/m`<br>Daily: `100/d`\n\n**Scopes:**\n`segments:write`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revision",
            "in": "header",
            "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])",
            "required": true,
            "schema": {
              "type": "string",
              "default": "2024-10-15"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/vnd.api+json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentPartialUpdateQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/vnd.api+json": {
                "schema": {
                  "$ref": "#/components/schemas/PatchSegmentPartialUpdateResponse"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/ClientError"
          },
          "5XX": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "tags": [
          "Segments"
        ],
        "x-klaviyo-pre-release": "None",
        "x-klaviyo-ratelimit": {
          "burst": "1/s",
          "steady": "15/m",
          "daily": "100/d"
        },
        "x-klaviyo-scopes": [
          "segments:write"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ProfileEnum": {
        "type": "string",
        "enum": [
          "profile"
        ]
      },
      "FlowEnum": {
        "type": "string",
        "enum": [
          "flow"
        ]
      },
      "ListEnum": {
        "type": "string",
        "enum": [
          "list"
        ]
      },
      "TagEnum": {
        "type": "string",
        "enum": [
          "tag"
        ]
      },
      "SegmentEnum": {
        "type": "string",
        "enum": [
          "segment"
        ]
      },
      "ProfileGroupMembershipEnum": {
        "type": "string",
        "enum": [
          "profile-group-membership"
        ]
      },
      "DateEnum": {
        "type": "string",
        "enum": [
          "date"
        ]
      },
      "StaticDateFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/DateEnum"
          },
          "operator": {
            "description": "Operators for static date filters.\n\nE.g. \"before 2023-01-01\"",
            "type": "string",
            "enum": [
              "after",
              "before"
            ]
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-11-08T00:00:00+00:00"
          }
        },
        "required": [
          "type",
          "operator",
          "date"
        ]
      },
      "StaticDateRangeFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/DateEnum"
          },
          "operator": {
            "description": "Operators for static date range filters.\n\nE.g. \"between 2023-01-01 and 2023-02-01\"",
            "type": "string",
            "enum": [
              "between-static"
            ]
          },
          "start": {
            "type": "string",
            "format": "date-time",
            "example": "2022-11-08T00:00:00+00:00"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "example": "2022-11-08T00:00:00+00:00"
          }
        },
        "required": [
          "type",
          "operator",
          "start",
          "end"
        ]
      },
      "RelativeDateOperatorBaseFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/DateEnum"
          },
          "operator": {
            "description": "Operators for relative date filters.\n\ne.g. \"in the last 10 days\"",
            "type": "string",
            "enum": [
              "at-least",
              "in-the-last",
              "in-the-next"
            ]
          },
          "unit": {
            "description": "Units for relative date filters.",
            "type": "string",
            "enum": [
              "day",
              "hour",
              "week"
            ]
          },
          "quantity": {
            "type": "integer"
          }
        },
        "required": [
          "type",
          "operator",
          "unit",
          "quantity"
        ]
      },
      "RelativeDateRangeFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/DateEnum"
          },
          "operator": {
            "description": "Operators for relative date range filters.\n\ne.g. \"between 10 and 20 days ago\"",
            "type": "string",
            "enum": [
              "between"
            ]
          },
          "start": {
            "type": "integer"
          },
          "end": {
            "type": "integer"
          },
          "unit": {
            "description": "Units for relative date filters.",
            "type": "string",
            "enum": [
              "day",
              "hour",
              "week"
            ]
          }
        },
        "required": [
          "type",
          "operator",
          "start",
          "end",
          "unit"
        ]
      },
      "ProfileHasGroupMembershipCondition": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ProfileGroupMembershipEnum"
          },
          "is_member": {
            "enum": [
              true
            ]
          },
          "group_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "timeframe_filter": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StaticDateFilter"
              },
              {
                "$ref": "#/components/schemas/StaticDateRangeFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateOperatorBaseFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateRangeFilter"
              }
            ]
          }
        },
        "required": [
          "type",
          "is_member",
          "group_ids"
        ]
      },
      "ProfileNoGroupMembershipCondition": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ProfileGroupMembershipEnum"
          },
          "is_member": {
            "enum": [
              false
            ]
          },
          "group_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "type",
          "is_member",
          "group_ids"
        ]
      },
      "ProfileMetricEnum": {
        "type": "string",
        "enum": [
          "profile-metric"
        ]
      },
      "NumericEnum": {
        "type": "string",
        "enum": [
          "numeric"
        ]
      },
      "NumericOperatorFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/NumericEnum"
          },
          "operator": {
            "description": "Operators for numeric filters.",
            "type": "string",
            "enum": [
              "equals",
              "greater-than",
              "greater-than-or-equal",
              "less-than",
              "less-than-or-equal",
              "not-equals"
            ]
          },
          "value": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              }
            ]
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "RelativeAnniversaryDateFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/DateEnum"
          },
          "operator": {
            "description": "Operators for relative date filters.\n\ne.g. \"anniversary in the last 10 days\"",
            "type": "string",
            "enum": [
              "anniversary-last",
              "anniversary-next"
            ]
          },
          "unit": {
            "description": "Units for relative date filters.",
            "type": "string",
            "enum": [
              "day",
              "hour",
              "week"
            ]
          },
          "quantity": {
            "type": "integer"
          }
        },
        "required": [
          "type",
          "operator",
          "unit",
          "quantity"
        ]
      },
      "AlltimeDateFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/DateEnum"
          },
          "operator": {
            "description": "Operators for alltime date filters.",
            "type": "string",
            "enum": [
              "alltime"
            ]
          }
        },
        "required": [
          "type",
          "operator"
        ]
      },
      "StringEnum": {
        "type": "string",
        "enum": [
          "string"
        ]
      },
      "StringOperatorFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/StringEnum"
          },
          "operator": {
            "description": "Operators for string filters.",
            "type": "string",
            "enum": [
              "contains",
              "ends-with",
              "equals",
              "not-contains",
              "not-ends-with",
              "not-equals",
              "not-starts-with",
              "starts-with"
            ]
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "StringArrayOperatorFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/StringEnum"
          },
          "operator": {
            "description": "Operators for string-in-array filters.",
            "type": "string",
            "enum": [
              "in",
              "not-in"
            ]
          },
          "value": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "ExistenceEnum": {
        "type": "string",
        "enum": [
          "existence"
        ]
      },
      "ExistenceOperatorFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ExistenceEnum"
          },
          "operator": {
            "description": "Operators for existence filters.",
            "type": "string",
            "enum": [
              "is-set",
              "not-set"
            ]
          }
        },
        "required": [
          "type",
          "operator"
        ]
      },
      "ListSetFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ListEnum"
          },
          "operator": {
            "description": "Operators for list contains set filters.",
            "type": "string",
            "enum": [
              "contains-all",
              "contains-any",
              "not-contains-all",
              "not-contains-any"
            ]
          },
          "value": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "ListLengthFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ListEnum"
          },
          "operator": {
            "description": "Operators for list length filters.",
            "type": "string",
            "enum": [
              "length-equals",
              "length-greater-than",
              "length-greater-than-or-equal",
              "length-less-than",
              "length-less-than-or-equal"
            ]
          },
          "value": {
            "type": "integer"
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "ListSubstringFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ListEnum"
          },
          "operator": {
            "description": "Operators for list substring filters.",
            "type": "string",
            "enum": [
              "contains-substring",
              "not-contains-substring"
            ]
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "BooleanEnum": {
        "type": "string",
        "enum": [
          "boolean"
        ]
      },
      "BooleanFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/BooleanEnum"
          },
          "operator": {
            "description": "Operators for boolean filters.",
            "type": "string",
            "enum": [
              "equals"
            ]
          },
          "value": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "ProfileMetricPropertyFilter": {
        "type": "object",
        "properties": {
          "property": {
            "type": "string"
          },
          "filter": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StringOperatorFilter"
              },
              {
                "$ref": "#/components/schemas/StringArrayOperatorFilter"
              },
              {
                "$ref": "#/components/schemas/ExistenceOperatorFilter"
              },
              {
                "$ref": "#/components/schemas/ListSetFilter"
              },
              {
                "$ref": "#/components/schemas/ListLengthFilter"
              },
              {
                "$ref": "#/components/schemas/ListSubstringFilter"
              },
              {
                "$ref": "#/components/schemas/BooleanFilter"
              },
              {
                "$ref": "#/components/schemas/NumericOperatorFilter"
              }
            ]
          }
        },
        "required": [
          "property"
        ]
      },
      "ProfileMetricCondition": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ProfileMetricEnum"
          },
          "metric_id": {
            "type": "string"
          },
          "measurement": {
            "description": "Measurements for profile metrics.",
            "type": "string",
            "enum": [
              "count",
              "sum"
            ]
          },
          "measurement_filter": {
            "$ref": "#/components/schemas/NumericOperatorFilter"
          },
          "timeframe_filter": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StaticDateFilter"
              },
              {
                "$ref": "#/components/schemas/StaticDateRangeFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateOperatorBaseFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeAnniversaryDateFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateRangeFilter"
              },
              {
                "$ref": "#/components/schemas/AlltimeDateFilter"
              }
            ]
          },
          "metric_filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfileMetricPropertyFilter"
            }
          }
        },
        "required": [
          "type",
          "metric_id",
          "measurement",
          "measurement_filter",
          "timeframe_filter"
        ]
      },
      "ProfileMarketingConsentEnum": {
        "type": "string",
        "enum": [
          "profile-marketing-consent"
        ]
      },
      "EmailEnum": {
        "type": "string",
        "enum": [
          "email"
        ]
      },
      "AnyEnum": {
        "type": "string",
        "enum": [
          "any"
        ]
      },
      "HasEmailMarketing": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/AnyEnum"
          }
        },
        "required": [
          "subscription"
        ]
      },
      "SubscribedEnum": {
        "type": "string",
        "enum": [
          "subscribed"
        ]
      },
      "Is_double_opt_inEnum": {
        "type": "string",
        "enum": [
          "is_double_opt_in"
        ]
      },
      "DoubleOptinFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/Is_double_opt_inEnum"
          },
          "filter": {
            "$ref": "#/components/schemas/BooleanFilter"
          }
        },
        "required": [
          "field",
          "filter"
        ]
      },
      "Status_dateEnum": {
        "type": "string",
        "enum": [
          "status_date"
        ]
      },
      "CalendarDateFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/DateEnum"
          },
          "operator": {
            "description": "Operators for calendar date filters.",
            "type": "string",
            "enum": [
              "calendar-month"
            ]
          },
          "value": {
            "type": "integer"
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "AnniversaryDateFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/DateEnum"
          },
          "operator": {
            "description": "Operators for anniversary date filters.",
            "type": "string",
            "enum": [
              "anniversary",
              "anniversary-month"
            ]
          }
        },
        "required": [
          "type",
          "operator"
        ]
      },
      "StatusDateFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/Status_dateEnum"
          },
          "filter": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StaticDateFilter"
              },
              {
                "$ref": "#/components/schemas/StaticDateRangeFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateOperatorBaseFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeAnniversaryDateFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateRangeFilter"
              },
              {
                "$ref": "#/components/schemas/CalendarDateFilter"
              },
              {
                "$ref": "#/components/schemas/AnniversaryDateFilter"
              }
            ]
          }
        },
        "required": [
          "field",
          "filter"
        ]
      },
      "Custom_sourceEnum": {
        "type": "string",
        "enum": [
          "custom_source"
        ]
      },
      "EqualsEnum": {
        "type": "string",
        "enum": [
          "equals"
        ]
      },
      "EqualsStringFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/StringEnum"
          },
          "operator": {
            "$ref": "#/components/schemas/EqualsEnum"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "CustomSourceFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/Custom_sourceEnum"
          },
          "filter": {
            "$ref": "#/components/schemas/EqualsStringFilter"
          }
        },
        "required": [
          "field",
          "filter"
        ]
      },
      "MethodEnum": {
        "type": "string",
        "enum": [
          "method"
        ]
      },
      "FormEnum": {
        "type": "string",
        "enum": [
          "form"
        ]
      },
      "InEnum": {
        "type": "string",
        "enum": [
          "in"
        ]
      },
      "InStringArrayFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/StringEnum"
          },
          "operator": {
            "$ref": "#/components/schemas/InEnum"
          },
          "value": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "FormMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/FormEnum"
          },
          "filter": {
            "description": "Optional filter on a specific list of form ids",
            "$ref": "#/components/schemas/InStringArrayFilter"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Preference_pageEnum": {
        "type": "string",
        "enum": [
          "preference_page"
        ]
      },
      "PreferencePageFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Preference_pageEnum"
          },
          "filter": {
            "description": "Optional filter on a specific subscribe page url",
            "$ref": "#/components/schemas/EqualsStringFilter"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "ApiEnum": {
        "type": "string",
        "enum": [
          "api"
        ]
      },
      "APIMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/ApiEnum"
          },
          "filter": {
            "description": "Optional filter on a specific list of API keys (using last 4 digits of the key)",
            "$ref": "#/components/schemas/InStringArrayFilter"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Inbound_messageEnum": {
        "type": "string",
        "enum": [
          "inbound_message"
        ]
      },
      "InboundMessageMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Inbound_messageEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Back_in_stockEnum": {
        "type": "string",
        "enum": [
          "back_in_stock"
        ]
      },
      "BackInStockMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Back_in_stockEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "SftpEnum": {
        "type": "string",
        "enum": [
          "sftp"
        ]
      },
      "SftpMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/SftpEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Manual_importEnum": {
        "type": "string",
        "enum": [
          "manual_import"
        ]
      },
      "ManualImportMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Manual_importEnum"
          },
          "filter": {
            "description": "Optional filter on a specific list of user email addresses who initiated the manual action",
            "$ref": "#/components/schemas/InStringArrayFilter"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Manual_addEnum": {
        "type": "string",
        "enum": [
          "manual_add"
        ]
      },
      "ManualAddMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Manual_addEnum"
          },
          "filter": {
            "description": "Optional filter on a specific list of user email addresses who initiated the manual action",
            "$ref": "#/components/schemas/InStringArrayFilter"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "IntegrationEnum": {
        "type": "string",
        "enum": [
          "integration"
        ]
      },
      "ShopifyEnum": {
        "type": "string",
        "enum": [
          "shopify"
        ]
      },
      "ShopifyIntegrationFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/StringEnum"
          },
          "operator": {
            "$ref": "#/components/schemas/InEnum"
          },
          "value": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShopifyEnum"
            }
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "ShopifyIntegrationMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/IntegrationEnum"
          },
          "filter": {
            "$ref": "#/components/schemas/ShopifyIntegrationFilter"
          }
        },
        "required": [
          "field",
          "method",
          "filter"
        ]
      },
      "HasEmailMarketingSubscribed": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/SubscribedEnum"
          },
          "filters": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/DoubleOptinFilter"
                },
                {
                  "$ref": "#/components/schemas/StatusDateFilter"
                },
                {
                  "$ref": "#/components/schemas/CustomSourceFilter"
                },
                {
                  "$ref": "#/components/schemas/FormMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/PreferencePageFilter"
                },
                {
                  "$ref": "#/components/schemas/APIMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/InboundMessageMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/BackInStockMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/SftpMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/ManualImportMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/ManualAddMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/ShopifyIntegrationMethodFilter"
                }
              ]
            }
          }
        },
        "required": [
          "subscription"
        ]
      },
      "Never_subscribedEnum": {
        "type": "string",
        "enum": [
          "never_subscribed"
        ]
      },
      "HasEmailMarketingNeverSubscribed": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/Never_subscribedEnum"
          }
        },
        "required": [
          "subscription"
        ]
      },
      "HasEmailMarketingConsent": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/EmailEnum"
          },
          "can_receive_marketing": {
            "enum": [
              true
            ]
          },
          "consent_status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/HasEmailMarketing"
              },
              {
                "$ref": "#/components/schemas/HasEmailMarketingSubscribed"
              },
              {
                "$ref": "#/components/schemas/HasEmailMarketingNeverSubscribed"
              }
            ]
          }
        },
        "required": [
          "channel",
          "can_receive_marketing",
          "consent_status"
        ]
      },
      "Bounce_dateEnum": {
        "type": "string",
        "enum": [
          "bounce_date"
        ]
      },
      "IsSetEnum": {
        "type": "string",
        "enum": [
          "is-set"
        ]
      },
      "IsSetExistenceFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ExistenceEnum"
          },
          "operator": {
            "$ref": "#/components/schemas/IsSetEnum"
          }
        },
        "required": [
          "type",
          "operator"
        ]
      },
      "BounceDateFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/Bounce_dateEnum"
          },
          "filter": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StaticDateFilter"
              },
              {
                "$ref": "#/components/schemas/StaticDateRangeFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateOperatorBaseFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeAnniversaryDateFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateRangeFilter"
              },
              {
                "$ref": "#/components/schemas/CalendarDateFilter"
              },
              {
                "$ref": "#/components/schemas/AnniversaryDateFilter"
              },
              {
                "$ref": "#/components/schemas/IsSetExistenceFilter"
              }
            ]
          }
        },
        "required": [
          "field",
          "filter"
        ]
      },
      "Manual_suppression_dateEnum": {
        "type": "string",
        "enum": [
          "manual_suppression_date"
        ]
      },
      "ManualSuppressionDateFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/Manual_suppression_dateEnum"
          },
          "filter": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StaticDateFilter"
              },
              {
                "$ref": "#/components/schemas/StaticDateRangeFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateOperatorBaseFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeAnniversaryDateFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateRangeFilter"
              },
              {
                "$ref": "#/components/schemas/CalendarDateFilter"
              },
              {
                "$ref": "#/components/schemas/AnniversaryDateFilter"
              },
              {
                "$ref": "#/components/schemas/IsSetExistenceFilter"
              }
            ]
          }
        },
        "required": [
          "field",
          "filter"
        ]
      },
      "Invalid_email_dateEnum": {
        "type": "string",
        "enum": [
          "invalid_email_date"
        ]
      },
      "InvalidEmailDateFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/Invalid_email_dateEnum"
          },
          "filter": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StaticDateFilter"
              },
              {
                "$ref": "#/components/schemas/StaticDateRangeFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateOperatorBaseFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeAnniversaryDateFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateRangeFilter"
              },
              {
                "$ref": "#/components/schemas/CalendarDateFilter"
              },
              {
                "$ref": "#/components/schemas/AnniversaryDateFilter"
              },
              {
                "$ref": "#/components/schemas/IsSetExistenceFilter"
              }
            ]
          }
        },
        "required": [
          "field",
          "filter"
        ]
      },
      "NoEmailMarketing": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/AnyEnum"
          },
          "filters": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BounceDateFilter"
                },
                {
                  "$ref": "#/components/schemas/ManualSuppressionDateFilter"
                },
                {
                  "$ref": "#/components/schemas/InvalidEmailDateFilter"
                }
              ]
            }
          }
        },
        "required": [
          "subscription"
        ]
      },
      "UnsubscribedEnum": {
        "type": "string",
        "enum": [
          "unsubscribed"
        ]
      },
      "PreferencePageMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Preference_pageEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Manual_removeEnum": {
        "type": "string",
        "enum": [
          "manual_remove"
        ]
      },
      "ManualRemoveMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Manual_removeEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Spam_complaintEnum": {
        "type": "string",
        "enum": [
          "spam_complaint"
        ]
      },
      "SpamComplaintMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Spam_complaintEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Mailbox_providerEnum": {
        "type": "string",
        "enum": [
          "mailbox_provider"
        ]
      },
      "MailboxProviderMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Mailbox_providerEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Constant_contactEnum": {
        "type": "string",
        "enum": [
          "constant_contact"
        ]
      },
      "ConstantContactIntegrationFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/StringEnum"
          },
          "operator": {
            "$ref": "#/components/schemas/InEnum"
          },
          "value": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Constant_contactEnum"
            }
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "ConstantContactIntegrationMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/IntegrationEnum"
          },
          "filter": {
            "$ref": "#/components/schemas/ConstantContactIntegrationFilter"
          }
        },
        "required": [
          "field",
          "method",
          "filter"
        ]
      },
      "NoEmailMarketingUnsubscribed": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/UnsubscribedEnum"
          },
          "filters": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StatusDateFilter"
                    },
                    {
                      "$ref": "#/components/schemas/APIMethodFilter"
                    },
                    {
                      "$ref": "#/components/schemas/InboundMessageMethodFilter"
                    },
                    {
                      "$ref": "#/components/schemas/PreferencePageMethodFilter"
                    },
                    {
                      "$ref": "#/components/schemas/ManualRemoveMethodFilter"
                    },
                    {
                      "$ref": "#/components/schemas/SpamComplaintMethodFilter"
                    },
                    {
                      "$ref": "#/components/schemas/MailboxProviderMethodFilter"
                    },
                    {
                      "$ref": "#/components/schemas/ConstantContactIntegrationMethodFilter"
                    }
                  ]
                }
              },
              {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BounceDateFilter"
                    },
                    {
                      "$ref": "#/components/schemas/ManualSuppressionDateFilter"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidEmailDateFilter"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "subscription"
        ]
      },
      "NoEmailMarketingNeverSubscribed": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/Never_subscribedEnum"
          },
          "filters": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BounceDateFilter"
                },
                {
                  "$ref": "#/components/schemas/ManualSuppressionDateFilter"
                },
                {
                  "$ref": "#/components/schemas/InvalidEmailDateFilter"
                }
              ]
            }
          }
        },
        "required": [
          "subscription",
          "filters"
        ]
      },
      "NoEmailMarketingSubscribed": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/SubscribedEnum"
          },
          "filters": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BounceDateFilter"
                },
                {
                  "$ref": "#/components/schemas/ManualSuppressionDateFilter"
                },
                {
                  "$ref": "#/components/schemas/InvalidEmailDateFilter"
                }
              ]
            }
          }
        },
        "required": [
          "subscription",
          "filters"
        ]
      },
      "NoEmailMarketingConsent": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/EmailEnum"
          },
          "can_receive_marketing": {
            "enum": [
              false
            ]
          },
          "consent_status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NoEmailMarketing"
              },
              {
                "$ref": "#/components/schemas/NoEmailMarketingUnsubscribed"
              },
              {
                "$ref": "#/components/schemas/NoEmailMarketingNeverSubscribed"
              },
              {
                "$ref": "#/components/schemas/NoEmailMarketingSubscribed"
              }
            ]
          }
        },
        "required": [
          "channel",
          "can_receive_marketing",
          "consent_status"
        ]
      },
      "SmsEnum": {
        "type": "string",
        "enum": [
          "sms"
        ]
      },
      "CheckoutEnum": {
        "type": "string",
        "enum": [
          "checkout"
        ]
      },
      "CheckoutMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/CheckoutEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "HasSMSMarketingSubscribed": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/SubscribedEnum"
          },
          "filters": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatusDateFilter"
                },
                {
                  "$ref": "#/components/schemas/FormMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/ManualImportMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/ManualAddMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/CheckoutMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/InboundMessageMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/PreferencePageMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/SftpMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/ShopifyIntegrationMethodFilter"
                }
              ]
            }
          }
        },
        "required": [
          "subscription"
        ]
      },
      "HasSMSMarketingConsent": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/SmsEnum"
          },
          "can_receive_marketing": {
            "enum": [
              true
            ]
          },
          "consent_status": {
            "$ref": "#/components/schemas/HasSMSMarketingSubscribed"
          }
        },
        "required": [
          "channel",
          "can_receive_marketing",
          "consent_status"
        ]
      },
      "NoSMSMarketing": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/AnyEnum"
          }
        },
        "required": [
          "subscription"
        ]
      },
      "Bulk_removeEnum": {
        "type": "string",
        "enum": [
          "bulk_remove"
        ]
      },
      "BulkRemoveMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Bulk_removeEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Carrier_deactivationEnum": {
        "type": "string",
        "enum": [
          "carrier_deactivation"
        ]
      },
      "CarrierDeactivationMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Carrier_deactivationEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Provided_landlineEnum": {
        "type": "string",
        "enum": [
          "provided_landline"
        ]
      },
      "ProvidedLandlineMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Provided_landlineEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Message_blockedEnum": {
        "type": "string",
        "enum": [
          "message_blocked"
        ]
      },
      "MessageBlockedMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Message_blockedEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Provided_no_ageEnum": {
        "type": "string",
        "enum": [
          "provided_no_age"
        ]
      },
      "ProvidedNoAgeMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Provided_no_ageEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "Failed_age_gateEnum": {
        "type": "string",
        "enum": [
          "failed_age_gate"
        ]
      },
      "FailedAgeGateMethodFilter": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/MethodEnum"
          },
          "method": {
            "$ref": "#/components/schemas/Failed_age_gateEnum"
          }
        },
        "required": [
          "field",
          "method"
        ]
      },
      "NoSMSMarketingUnsubscribed": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/UnsubscribedEnum"
          },
          "filters": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatusDateFilter"
                },
                {
                  "$ref": "#/components/schemas/FormMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/ManualImportMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/ManualAddMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/ManualRemoveMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/BulkRemoveMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/CheckoutMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/InboundMessageMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/PreferencePageMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/SftpMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/CarrierDeactivationMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/ProvidedLandlineMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/MessageBlockedMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/ProvidedNoAgeMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/FailedAgeGateMethodFilter"
                },
                {
                  "$ref": "#/components/schemas/ShopifyIntegrationMethodFilter"
                }
              ]
            }
          }
        },
        "required": [
          "subscription"
        ]
      },
      "NoSMSMarketingNeverSubscribed": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/Never_subscribedEnum"
          }
        },
        "required": [
          "subscription"
        ]
      },
      "NoSMSMarketingConsent": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/SmsEnum"
          },
          "can_receive_marketing": {
            "enum": [
              false
            ]
          },
          "consent_status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NoSMSMarketing"
              },
              {
                "$ref": "#/components/schemas/NoSMSMarketingUnsubscribed"
              },
              {
                "$ref": "#/components/schemas/NoSMSMarketingNeverSubscribed"
              }
            ]
          }
        },
        "required": [
          "channel",
          "can_receive_marketing",
          "consent_status"
        ]
      },
      "PushEnum": {
        "type": "string",
        "enum": [
          "push"
        ]
      },
      "HasPushMarketing": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/AnyEnum"
          },
          "filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusDateFilter"
            }
          }
        },
        "required": [
          "subscription"
        ]
      },
      "HasPushMarketingConsent": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/PushEnum"
          },
          "can_receive_marketing": {
            "enum": [
              true
            ]
          },
          "consent_status": {
            "$ref": "#/components/schemas/HasPushMarketing"
          }
        },
        "required": [
          "channel",
          "can_receive_marketing",
          "consent_status"
        ]
      },
      "NoPushMarketing": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/AnyEnum"
          }
        },
        "required": [
          "subscription"
        ]
      },
      "NoPushMarketingConsent": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/PushEnum"
          },
          "can_receive_marketing": {
            "enum": [
              false
            ]
          },
          "consent_status": {
            "$ref": "#/components/schemas/NoPushMarketing"
          }
        },
        "required": [
          "channel",
          "can_receive_marketing",
          "consent_status"
        ]
      },
      "ProfileMarketingConsentCondition": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ProfileMarketingConsentEnum"
          },
          "consent": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/HasEmailMarketingConsent"
              },
              {
                "$ref": "#/components/schemas/NoEmailMarketingConsent"
              },
              {
                "$ref": "#/components/schemas/HasSMSMarketingConsent"
              },
              {
                "$ref": "#/components/schemas/NoSMSMarketingConsent"
              },
              {
                "$ref": "#/components/schemas/HasPushMarketingConsent"
              },
              {
                "$ref": "#/components/schemas/NoPushMarketingConsent"
              }
            ]
          }
        },
        "required": [
          "type",
          "consent"
        ]
      },
      "ProfilePostalCodeDistanceEnum": {
        "type": "string",
        "enum": [
          "profile-postal-code-distance"
        ]
      },
      "GreaterThanEnum": {
        "type": "string",
        "enum": [
          "greater-than"
        ]
      },
      "LessThanEnum": {
        "type": "string",
        "enum": [
          "less-than"
        ]
      },
      "UnionPositiveNumericFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/NumericEnum"
          },
          "operator": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GreaterThanEnum"
              },
              {
                "$ref": "#/components/schemas/LessThanEnum"
              }
            ]
          },
          "value": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              }
            ]
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "ProfilePostalCodeDistanceCondition": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ProfilePostalCodeDistanceEnum"
          },
          "country_code": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "unit": {
            "description": "Units for profile postal code distance conditions.",
            "type": "string",
            "enum": [
              "kilometers",
              "miles"
            ]
          },
          "filter": {
            "$ref": "#/components/schemas/UnionPositiveNumericFilter"
          }
        },
        "required": [
          "type",
          "country_code",
          "postal_code",
          "unit",
          "filter"
        ]
      },
      "ProfilePropertyEnum": {
        "type": "string",
        "enum": [
          "profile-property"
        ]
      },
      "StringPhoneOperatorArrayFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/StringEnum"
          },
          "operator": {
            "description": "Operators for phone string array filters.\n\nExample condition using this filter:\n    {",
            "type": "string",
            "enum": [
              "phone-country-code-in",
              "phone-country-code-not-in"
            ]
          },
          "value": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "ListContainsOperatorFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ListEnum"
          },
          "operator": {
            "description": "Operators for list contains filters.",
            "type": "string",
            "enum": [
              "contains",
              "not-contains"
            ]
          },
          "value": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "ProfilePropertyCondition": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ProfilePropertyEnum"
          },
          "property": {
            "type": "string"
          },
          "filter": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StringOperatorFilter"
              },
              {
                "$ref": "#/components/schemas/StringArrayOperatorFilter"
              },
              {
                "$ref": "#/components/schemas/StringPhoneOperatorArrayFilter"
              },
              {
                "$ref": "#/components/schemas/NumericOperatorFilter"
              },
              {
                "$ref": "#/components/schemas/BooleanFilter"
              },
              {
                "$ref": "#/components/schemas/StaticDateFilter"
              },
              {
                "$ref": "#/components/schemas/StaticDateRangeFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateOperatorBaseFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeAnniversaryDateFilter"
              },
              {
                "$ref": "#/components/schemas/RelativeDateRangeFilter"
              },
              {
                "$ref": "#/components/schemas/CalendarDateFilter"
              },
              {
                "$ref": "#/components/schemas/AnniversaryDateFilter"
              },
              {
                "$ref": "#/components/schemas/ListContainsOperatorFilter"
              },
              {
                "$ref": "#/components/schemas/ListLengthFilter"
              },
              {
                "$ref": "#/components/schemas/ExistenceOperatorFilter"
              }
            ]
          }
        },
        "required": [
          "type",
          "property",
          "filter"
        ]
      },
      "ProfileRegionEnum": {
        "type": "string",
        "enum": [
          "profile-region"
        ]
      },
      "ProfileRegionCondition": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ProfileRegionEnum"
          },
          "in_region": {
            "type": "boolean"
          },
          "region": {
            "description": "Regions for profile region conditions.",
            "type": "string",
            "enum": [
              "european_union",
              "united_states"
            ]
          }
        },
        "required": [
          "type",
          "in_region",
          "region"
        ]
      },
      "ProfilePredictiveAnalyticsEnum": {
        "type": "string",
        "enum": [
          "profile-predictive-analytics"
        ]
      },
      "ProfilePredictiveAnalyticsNumericCondition": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ProfilePredictiveAnalyticsEnum"
          },
          "dimension": {
            "description": "Dimensions for numeric profile predictive analytics conditions.",
            "type": "string",
            "enum": [
              "average_days_between_orders",
              "average_order_value",
              "churn_probability",
              "historic_clv",
              "historic_number_of_orders",
              "predicted_clv",
              "predicted_number_of_orders",
              "total_clv"
            ]
          },
          "filter": {
            "$ref": "#/components/schemas/NumericOperatorFilter"
          }
        },
        "required": [
          "type",
          "dimension",
          "filter"
        ]
      },
      "NotEqualsEnum": {
        "type": "string",
        "enum": [
          "not-equals"
        ]
      },
      "ProfilePredictiveAnalyticsStringFilter": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/StringEnum"
          },
          "operator": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EqualsEnum"
              },
              {
                "$ref": "#/components/schemas/NotEqualsEnum"
              }
            ]
          },
          "value": {
            "description": "Values for profile predictive analytics gender conditions.",
            "type": "string",
            "enum": [
              "likely_female",
              "likely_male",
              "uncertain"
            ]
          }
        },
        "required": [
          "type",
          "operator",
          "value"
        ]
      },
      "ProfilePredictiveAnalyticsStringCondition": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ProfilePredictiveAnalyticsEnum"
          },
          "dimension": {
            "description": "Dimension for string profile predictive analytics conditions.",
            "type": "string",
            "enum": [
              "predicted_gender"
            ]
          },
          "filter": {
            "$ref": "#/components/schemas/ProfilePredictiveAnalyticsStringFilter"
          }
        },
        "required": [
          "type",
          "dimension",
          "filter"
        ]
      },
      "ConditionGroup": {
        "type": "object",
        "properties": {
          "conditions": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ProfileHasGroupMembershipCondition"
                },
                {
                  "$ref": "#/components/schemas/ProfileNoGroupMembershipCondition"
                },
                {
                  "$ref": "#/components/schemas/ProfileMetricCondition"
                },
                {
                  "$ref": "#/components/schemas/ProfileMarketingConsentCondition"
                },
                {
                  "$ref": "#/components/schemas/ProfilePostalCodeDistanceCondition"
                },
                {
                  "$ref": "#/components/schemas/ProfilePropertyCondition"
                },
                {
                  "$ref": "#/components/schemas/ProfileRegionCondition"
                },
                {
                  "$ref": "#/components/schemas/ProfilePredictiveAnalyticsNumericCondition"
                },
                {
                  "$ref": "#/components/schemas/ProfilePredictiveAnalyticsStringCondition"
                }
              ]
            }
          }
        },
        "required": [
          "conditions"
        ]
      },
      "SegmentDefinition": {
        "type": "object",
        "properties": {
          "condition_groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConditionGroup"
            }
          }
        },
        "required": [
          "condition_groups"
        ]
      },
      "SegmentPartialUpdateQueryResourceObject": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/SegmentEnum"
          },
          "id": {
            "type": "string"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "definition": {
                "$ref": "#/components/schemas/SegmentDefinition"
              },
              "name": {
                "type": "string"
              },
              "is_starred": {
                "type": "boolean"
              }
            }
          }
        },
        "required": [
          "type",
          "id",
          "attributes"
        ]
      },
      "SegmentPartialUpdateQuery": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SegmentPartialUpdateQueryResourceObject"
          }
        },
        "required": [
          "data"
        ]
      },
      "PatchSegmentPartialUpdateResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "type": {
                "$ref": "#/components/schemas/SegmentEnum"
              },
              "id": {
                "type": "string"
              },
              "attributes": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "A helpful name to label the segment",
                    "type": "string",
                    "example": "Repeat Purchasers"
                  },
                  "definition": {
                    "$ref": "#/components/schemas/SegmentDefinition"
                  },
                  "created": {
                    "description": "Date and time when the segment was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)",
                    "type": "string",
                    "format": "date-time",
                    "example": "2022-11-08T00:00:00+00:00"
                  },
                  "updated": {
                    "description": "Date and time when the segment was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)",
                    "type": "string",
                    "format": "date-time",
                    "example": "2022-11-08T00:00:00+00:00"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "is_processing": {
                    "type": "boolean"
                  },
                  "is_starred": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "is_active",
                  "is_processing",
                  "is_starred"
                ]
              },
              "relationships": {
                "type": "object",
                "properties": {
                  "profiles": {
                    "type": "object",
                    "properties": {
                      "data": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "type",
                            "id"
                          ],
                          "properties": {
                            "type": {
                              "$ref": "#/components/schemas/ProfileEnum"
                            },
                            "id": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "links": {
                        "$ref": "#/components/schemas/RelationshipLinks"
                      }
                    }
                  },
                  "tags": {
                    "type": "object",
                    "properties": {
                      "data": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "type",
                            "id"
                          ],
                          "properties": {
                            "type": {
                              "$ref": "#/components/schemas/TagEnum"
                            },
                            "id": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "links": {
                        "$ref": "#/components/schemas/RelationshipLinks"
                      }
                    }
                  },
                  "flow-triggers": {
                    "type": "object",
                    "properties": {
                      "data": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "type",
                            "id"
                          ],
                          "properties": {
                            "type": {
                              "$ref": "#/components/schemas/FlowEnum"
                            },
                            "id": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "links": {
                        "$ref": "#/components/schemas/RelationshipLinks"
                      }
                    }
                  }
                }
              },
              "links": {
                "$ref": "#/components/schemas/ObjectLinks"
              }
            },
            "required": [
              "type",
              "id",
              "attributes",
              "links"
            ]
          }
        },
        "required": [
          "data"
        ]
      },
      "RelationshipLinks": {
        "type": "object",
        "properties": {
          "self": {
            "type": "string",
            "format": "uri"
          },
          "related": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "self",
          "related"
        ]
      },
      "ObjectLinks": {
        "type": "object",
        "properties": {
          "self": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "self"
        ]
      }
    },
    "responses": {
      "ClientError": {
        "description": "Client Error",
        "content": {
          "application/vnd.api+json": {
            "schema": {
              "type": "object",
              "properties": {
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "code",
                      "title",
                      "detail"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "code": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "pointer": {
                            "type": "string"
                          },
                          "parameter": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "required": [
                "errors"
              ]
            }
          }
        }
      },
      "ServerError": {
        "description": "Server Error",
        "content": {
          "application/vnd.api+json": {
            "schema": {
              "type": "object",
              "properties": {
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "code",
                      "title",
                      "detail"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "code": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "pointer": {
                            "type": "string"
                          },
                          "parameter": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "required": [
                "errors"
              ]
            }
          }
        }
      }
    },
    "securitySchemes": {
      "Klaviyo-API-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Private key authentication for /api/ endpoints is performed by setting the `Authorization` header to `Klaviyo-API-Key your-private-api-key`<br>For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#authentication",
        "x-default": "Klaviyo-API-Key your-private-api-key"
      }
    }
  },
  "tags": [
    {
      "name": "Segments"
    }
  ],
  "security": [
    {
      "Klaviyo-API-Key": []
    }
  ],
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": true,
    "samples-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 103,
      "1": 14,
      "2": 199,
      "3": 71,
      "4": 109,
      "5": 224,
      "6": 147,
      "7": 0,
      "8": 82,
      "9": 88,
      "10": 175,
      "11": 39
    }
  }
}
```