{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scribe-mail-com/json-schema/scribe-mail-com-api-v1-subscription-response-schema.json",
  "title": "api_v1_subscription_response",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scribe-mail-com-openapi.json#/components/schemas/api_v1_subscription_response",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "subscription"
          ]
        },
        "attributes": {
          "type": "object",
          "properties": {
            "plan": {
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": [
                "string",
                "null"
              ]
            },
            "billing_interval": {
              "type": [
                "string",
                "null"
              ]
            },
            "seats": {
              "type": "object",
              "properties": {
                "max": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "used": {
                  "type": "integer"
                }
              },
              "required": [
                "max",
                "used"
              ]
            },
            "pricing": {
              "type": "object",
              "properties": {
                "amount_cents": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "currency": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "amount_cents",
                "currency"
              ]
            },
            "add_ons": {
              "type": [
                "object",
                "null"
              ]
            },
            "current_period_end": {
              "type": [
                "string",
                "null"
              ]
            },
            "cancel_at_period_end": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "payment_status": {
              "type": "object",
              "properties": {
                "last_payment_failed": {
                  "type": "boolean"
                },
                "failure_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "last_payment_failed",
                "failure_message"
              ]
            },
            "created_at": {
              "type": "string"
            }
          },
          "required": [
            "plan",
            "status",
            "seats",
            "pricing",
            "payment_status",
            "created_at"
          ]
        }
      },
      "required": [
        "id",
        "type",
        "attributes"
      ]
    },
    "meta": {
      "$ref": "#/$defs/api_v1_meta"
    }
  },
  "required": [
    "data",
    "meta"
  ],
  "$defs": {
    "api_v1_meta": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "request_id"
      ],
      "additionalProperties": true
    }
  }
}