{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/groundmail-dev/json-schema/groundmail-dev-test-inbox-response-schema.json",
  "title": "TestInboxResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/groundmail-dev-test-inbox-api-openapi.yml#/components/schemas/TestInboxResponse",
  "type": "object",
  "required": [
    "test_inbox"
  ],
  "properties": {
    "test_inbox": {
      "$ref": "#/$defs/TestInbox"
    }
  },
  "$defs": {
    "TestInbox": {
      "type": "object",
      "required": [
        "object",
        "domain",
        "address",
        "addon",
        "usage",
        "retention_days"
      ],
      "properties": {
        "object": {
          "type": "string",
          "enum": [
            "test_inbox"
          ]
        },
        "domain": {
          "type": "string",
          "description": "Your team's test domain. Any address at it is caught."
        },
        "address": {
          "type": "string",
          "description": "An example fresh address. Any local part works; use a new one per test."
        },
        "addon": {
          "type": "object",
          "required": [
            "active",
            "status"
          ],
          "properties": {
            "active": {
              "type": "boolean",
              "description": "Whether the email testing add-on is on."
            },
            "status": {
              "type": [
                "string",
                "null"
              ],
              "description": "Billing status of the add-on, if it was ever bought."
            }
          }
        },
        "usage": {
          "$ref": "#/$defs/TestInboxUsage"
        },
        "retention_days": {
          "type": "integer",
          "description": "Days caught emails are kept."
        }
      }
    },
    "TestInboxUsage": {
      "type": "object",
      "required": [
        "month",
        "received",
        "rejected",
        "included",
        "overage",
        "resets_at"
      ],
      "properties": {
        "month": {
          "type": "string",
          "description": "Calendar month in UTC, `YYYY-MM`."
        },
        "received": {
          "type": "integer",
          "description": "Test emails accepted this month."
        },
        "rejected": {
          "type": "integer",
          "description": "Test emails refused this month because the limit was reached."
        },
        "included": {
          "type": "integer",
          "description": "Test emails included this month (100 free, 5,000 with the add-on)."
        },
        "overage": {
          "type": "boolean",
          "description": "True with the email testing add-on: mail past `included` is accepted and billed per 1,000. False: mail past `included` is refused until `resets_at`.\n"
        },
        "resets_at": {
          "type": "string",
          "format": "date-time",
          "description": "When the monthly allowance resets (the first of next month, UTC)."
        }
      }
    }
  }
}