{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/semilattice-ai/json-schema/semilattice-ai-create-segment-body-schema.json",
  "title": "CreateSegmentBody",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/semilattice-ai-openapi.json#/components/schemas/CreateSegmentBody",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1,
      "title": "Name",
      "description": "A short name, e.g. 'Londoners 45-64'"
    },
    "description": {
      "type": "string",
      "maxLength": 2000,
      "title": "Description",
      "default": ""
    },
    "filters": {
      "additionalProperties": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "type": "object",
      "title": "Filters",
      "description": "Each attribute mapped to the values to keep, using exact values from /v1/user-models/{id}/attributes, e.g. {\"age\": [\"45-54\", \"55-64\"], \"location\": [\"london\"]}. A simulated user is in the segment when their value is one of the listed values for every attribute given."
    }
  },
  "type": "object",
  "required": [
    "name",
    "filters"
  ]
}