{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mailshake-com/json-schema/mailshake-com-sender-stats-schema.json",
  "title": "SenderStats",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mailshake-com-openapi.json#/components/schemas/SenderStats",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "object",
    "integrationID",
    "emailAddress",
    "from",
    "to",
    "timezone",
    "totals",
    "rates",
    "today",
    "health",
    "signal"
  ],
  "properties": {
    "object": {
      "const": "sender-stats"
    },
    "integrationID": {
      "type": "integer"
    },
    "emailAddress": {
      "type": "string"
    },
    "from": {
      "type": "string",
      "format": "date"
    },
    "to": {
      "type": "string",
      "format": "date"
    },
    "timezone": {
      "type": "string"
    },
    "campaignID": {
      "type": "integer"
    },
    "totals": {
      "$ref": "#/$defs/SenderStatsTotals"
    },
    "rates": {
      "$ref": "#/$defs/StatsRates"
    },
    "today": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "sent",
        "dailyCap"
      ],
      "properties": {
        "sent": {
          "type": "integer"
        },
        "dailyCap": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "health": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "needsReauth",
        "hitQuotaDate",
        "replyCheckFailureCount",
        "inCampaigns"
      ],
      "properties": {
        "needsReauth": {
          "type": "boolean"
        },
        "hitQuotaDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "replyCheckFailureCount": {
          "type": "integer"
        },
        "inCampaigns": {
          "type": "integer"
        }
      }
    },
    "signal": {
      "$ref": "#/$defs/DipSignal"
    }
  },
  "$defs": {
    "DipPeriod": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "from",
        "to",
        "sent",
        "bounced",
        "replied",
        "bounceRate",
        "replyRate"
      ],
      "properties": {
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        },
        "sent": {
          "type": "integer"
        },
        "bounced": {
          "type": "integer"
        },
        "replied": {
          "type": "integer"
        },
        "bounceRate": {
          "type": [
            "number",
            "null"
          ]
        },
        "replyRate": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "DipSignal": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "status",
        "current",
        "baseline",
        "reasons"
      ],
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "ok",
            "dipped",
            "insufficient-data"
          ]
        },
        "current": {
          "$ref": "#/$defs/DipPeriod"
        },
        "baseline": {
          "$ref": "#/$defs/DipPeriod"
        },
        "reasons": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true,
            "required": [
              "metric",
              "current",
              "baseline"
            ],
            "properties": {
              "metric": {
                "type": "string",
                "enum": [
                  "bounceRate",
                  "replyRate"
                ]
              },
              "current": {
                "type": "number"
              },
              "baseline": {
                "type": "number"
              }
            }
          }
        }
      }
    },
    "SenderStatsTotals": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "sent",
        "bounced",
        "delivered",
        "replied",
        "autoReplies"
      ],
      "properties": {
        "sent": {
          "type": "integer"
        },
        "bounced": {
          "type": "integer"
        },
        "delivered": {
          "type": "integer"
        },
        "replied": {
          "type": "integer"
        },
        "autoReplies": {
          "type": "integer"
        }
      }
    },
    "StatsRates": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "bounceRate",
        "replyRate"
      ],
      "properties": {
        "bounceRate": {
          "type": [
            "number",
            "null"
          ]
        },
        "replyRate": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    }
  }
}