{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usemektup-com/json-schema/usemektup-com-usage-schema.json",
  "title": "Usage",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usemektup-com-openapi.yaml#/components/schemas/Usage",
  "type": "object",
  "properties": {
    "tier": {
      "type": "string",
      "enum": [
        "free",
        "starter",
        "pro",
        "enterprise"
      ]
    },
    "limits": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string"
        },
        "domains": {
          "type": [
            "integer",
            "null"
          ],
          "description": "null represents unlimited (enterprise)"
        },
        "emailsPerMonth": {
          "type": [
            "integer",
            "null"
          ]
        },
        "storageBytes": {
          "type": [
            "integer",
            "null"
          ],
          "description": "one pool for the whole account; null = unlimited"
        },
        "maxTeamMembers": {
          "type": [
            "integer",
            "null"
          ],
          "description": "included team logins (extra seats are a $2/mo add-on); null = unlimited"
        }
      }
    },
    "domainCount": {
      "type": "integer"
    },
    "emailsThisMonth": {
      "type": "integer"
    },
    "storageBytes": {
      "type": "integer",
      "description": "the account's stored mail on disk - what limits.storageBytes is enforced against"
    },
    "storageByDomain": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "domain_id": {
            "type": "string",
            "format": "uuid"
          },
          "domain": {
            "type": "string"
          },
          "bytes": {
            "type": "string",
            "description": "Numeric string (bigint)"
          }
        }
      }
    }
  }
}