{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendly-now/json-schema/sendly-now-billing-status-schema.json",
  "title": "BillingStatus",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendly-now-billing-api-openapi.yml#/components/schemas/BillingStatus",
  "properties": {
    "freeMonthlyEmails": {
      "type": "integer"
    },
    "limits": {
      "properties": {
        "campaigns": {
          "properties": {
            "isBlocked": {
              "type": "boolean"
            },
            "isWarning": {
              "type": "boolean"
            },
            "limit": {
              "description": "The cap for this category, or null when uncapped.",
              "type": [
                "number",
                "null"
              ]
            },
            "percentage": {
              "type": "number"
            },
            "usage": {
              "type": "number"
            }
          },
          "required": [
            "limit",
            "usage",
            "percentage",
            "isWarning",
            "isBlocked"
          ],
          "type": "object"
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "inbound": {
          "properties": {
            "isBlocked": {
              "type": "boolean"
            },
            "isWarning": {
              "type": "boolean"
            },
            "limit": {
              "description": "The cap for this category, or null when uncapped.",
              "type": [
                "number",
                "null"
              ]
            },
            "percentage": {
              "type": "number"
            },
            "usage": {
              "type": "number"
            }
          },
          "required": [
            "limit",
            "usage",
            "percentage",
            "isWarning",
            "isBlocked"
          ],
          "type": "object"
        },
        "transactional": {
          "properties": {
            "isBlocked": {
              "type": "boolean"
            },
            "isWarning": {
              "type": "boolean"
            },
            "limit": {
              "description": "The cap for this category, or null when uncapped.",
              "type": [
                "number",
                "null"
              ]
            },
            "percentage": {
              "type": "number"
            },
            "usage": {
              "type": "number"
            }
          },
          "required": [
            "limit",
            "usage",
            "percentage",
            "isWarning",
            "isBlocked"
          ],
          "type": "object"
        },
        "workflows": {
          "properties": {
            "isBlocked": {
              "type": "boolean"
            },
            "isWarning": {
              "type": "boolean"
            },
            "limit": {
              "description": "The cap for this category, or null when uncapped.",
              "type": [
                "number",
                "null"
              ]
            },
            "percentage": {
              "type": "number"
            },
            "usage": {
              "type": "number"
            }
          },
          "required": [
            "limit",
            "usage",
            "percentage",
            "isWarning",
            "isBlocked"
          ],
          "type": "object"
        }
      },
      "required": [
        "workflows",
        "campaigns",
        "transactional",
        "inbound",
        "currency"
      ],
      "type": "object"
    },
    "plan": {
      "enum": [
        "free",
        "payg"
      ],
      "type": "string"
    },
    "pro": {
      "description": "Null for an API key, which carries no person.",
      "properties": {
        "active": {
          "type": "boolean"
        },
        "expiresAt": {
          "description": "Only while active.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "store": {
          "description": "The store that sold it, e.g. `APP_STORE`. Only while active.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "active",
        "expiresAt",
        "store"
      ],
      "type": [
        "object",
        "null"
      ]
    },
    "subscription": {
      "properties": {
        "cancelAtPeriodEnd": {
          "type": "boolean"
        },
        "currentPeriodEnd": {
          "description": "Unix seconds.",
          "type": [
            "number",
            "null"
          ]
        },
        "id": {
          "type": "string"
        },
        "status": {
          "description": "Stripe's subscription status, e.g. `active` or `past_due`.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "status",
        "cancelAtPeriodEnd"
      ],
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "plan",
    "subscription",
    "freeMonthlyEmails",
    "limits",
    "pro"
  ],
  "type": "object"
}