{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getmattered/json-schema/getmattered-follow-up-list-response-schema.json",
  "title": "FollowUpListResponse",
  "description": "Successful API response",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getmattered-follow-ups-api-openapi.yml#/components/schemas/FollowUpListResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FollowUpListItem"
          }
        }
      },
      "required": [
        "items"
      ],
      "additionalProperties": false
    },
    "meta": {
      "$ref": "#/$defs/ResponseMetadata"
    },
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    }
  },
  "required": [
    "data",
    "success"
  ],
  "additionalProperties": false,
  "$defs": {
    "FollowUpListItem": {
      "type": "object",
      "properties": {
        "applicationResultId": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "description": "Application result id"
        },
        "applicationStage": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "applied",
            "callback",
            "phone_screen",
            "interview",
            "offered",
            "rejected",
            "no_response",
            null
          ],
          "description": "Current stage of the application"
        },
        "company": {
          "type": [
            "string",
            "null"
          ],
          "description": "Company name"
        },
        "followUpCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of follow-ups already sent on this application"
        },
        "jobTitle": {
          "type": [
            "string",
            "null"
          ],
          "description": "Job title"
        },
        "jobUrl": {
          "type": "string",
          "description": "Original job URL"
        },
        "lastFollowUpAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "ISO timestamp of last recorded follow-up, or null"
        },
        "nextFollowUpDueAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "ISO timestamp of when next follow-up is due, or null"
        },
        "urgency": {
          "type": "string",
          "enum": [
            "urgent",
            "overdue",
            "waiting",
            "cold",
            "none"
          ],
          "description": "Computed urgency tier"
        }
      },
      "required": [
        "applicationResultId",
        "applicationStage",
        "company",
        "followUpCount",
        "jobTitle",
        "jobUrl",
        "lastFollowUpAt",
        "nextFollowUpDueAt",
        "urgency"
      ],
      "additionalProperties": false
    },
    "ResponseMetadata": {
      "type": "object",
      "properties": {
        "duration": {
          "type": "number",
          "minimum": 0,
          "description": "Request duration in milliseconds"
        },
        "performance": {
          "type": "object",
          "properties": {
            "dbQueries": {
              "type": "integer",
              "minimum": 0
            },
            "totalDbTime": {
              "type": "number",
              "minimum": 0
            }
          },
          "description": "Performance metrics (preview/local only)"
        },
        "requestId": {
          "type": "string",
          "description": "Unique request identifier"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp"
        },
        "version": {
          "type": "string",
          "description": "API version"
        }
      }
    }
  }
}