{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Usage",
  "title": "Usage",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/send0-dev-openapi.json#/components/schemas/Usage",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "usage"
    },
    "plan": {
      "type": "string",
      "enum": [
        "free",
        "pro",
        "scale"
      ]
    },
    "inboxes": {
      "type": "object",
      "properties": {
        "used": {
          "type": "integer"
        },
        "limit": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "null when the install has no inbox cap (self-hosted)"
        }
      },
      "required": [
        "used",
        "limit"
      ],
      "additionalProperties": false
    },
    "sends_today": {
      "type": "object",
      "properties": {
        "used": {
          "type": "integer"
        },
        "limit": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "null when the install has no daily cap (self-hosted)"
        },
        "resets_at": {
          "type": "string",
          "format": "date-time",
          "description": "Midnight UTC, when the daily count starts over"
        }
      },
      "required": [
        "used",
        "limit",
        "resets_at"
      ],
      "additionalProperties": false
    },
    "sending": {
      "type": "object",
      "properties": {
        "paused": {
          "type": "boolean"
        },
        "reason": {
          "type": [
            "string",
            "null"
          ]
        },
        "paused_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "paused",
        "reason",
        "paused_at"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "object",
    "plan",
    "inboxes",
    "sends_today",
    "sending"
  ],
  "additionalProperties": false
}