{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/activecampaign/main/json-schema/activecampaign-match-all-response-root-do-schema.json",
  "title": "MatchAllResponseRootDO",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/activecampaign-match-all-api-openapi.yml#/components/schemas/MatchAllResponseRootDO",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MatchAllDataDO"
      }
    }
  },
  "$defs": {
    "MatchAllAttributeDO": {
      "title": "MatchAllAttributeDO",
      "required": [
        "is_ready",
        "run_id",
        "run_id_start",
        "segment_id"
      ],
      "type": "object",
      "properties": {
        "run_id": {
          "type": "string",
          "description": "The runId of the match-all request. Use this value to poll for results or lookup results at a later point in time. RunId results can be viewed for 90 days"
        },
        "run_id_start": {
          "type": "string",
          "description": "ISO 8601 datetime representing when the match-all request was made",
          "format": "date-time"
        },
        "run_id_end": {
          "type": "string",
          "description": "ISO 8601 datetime representing when the match-all result-set was ready. If this date-time is present and `is_ready` is `false`, then the match-all request has ran into an error and will not finish; please try making a new match-all request or contacting support.",
          "format": "date-time"
        },
        "is_ready": {
          "type": "boolean",
          "description": "True if the result-set is ready. False otherwise"
        },
        "matches": {
          "maxItems": 10000,
          "type": "array",
          "description": "One page of the result-set of Contact Id's",
          "items": {
            "type": "integer"
          }
        },
        "segment_id": {
          "type": "string"
        },
        "segment_timestamp": {
          "type": "string",
          "description": "ISO 8601 datetime representing when segment was last created or modified. This timestamp can be used to look up the definition of the Segment at the time of the match-all request",
          "format": "date-time"
        },
        "page": {
          "$ref": "#/$defs/PageDO"
        }
      },
      "description": "Object representing the status and result of the match all request. Note that page number and total count information refer to the results in the \"matches\" attribute."
    },
    "MatchAllDataDO": {
      "title": "MatchAllDataDO",
      "type": "object",
      "properties": {
        "attributes": {
          "$ref": "#/$defs/MatchAllAttributeDO"
        },
        "id": {
          "type": "string",
          "description": "ID of the specific request"
        },
        "type": {
          "type": "string",
          "enum": [
            "matchAll"
          ]
        }
      }
    },
    "PageDO": {
      "title": "PageDO",
      "type": "object",
      "properties": {
        "current_page": {
          "type": "integer",
          "format": "int32"
        },
        "last_page": {
          "type": "integer",
          "description": "Last page of results",
          "format": "int32"
        },
        "per_page": {
          "type": "integer",
          "format": "int32"
        },
        "total": {
          "type": "integer",
          "description": "The total number of matches",
          "format": "int32"
        }
      }
    }
  }
}