{
  "openapi": "3.1.0",
  "info": {
    "title": "AfriyonTech Platform API",
    "version": "2026.11",
    "description": "Tenant-scoped REST API for subscriptions, invoices, subscribers and support tickets."
  },
  "servers": [
    {
      "url": "https://api.afriyontech.com/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/subscriptions": {
      "get": {
        "summary": "List subscriptions",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of subscriptions"
          }
        }
      }
    },
    "/invoices": {
      "get": {
        "summary": "List invoices",
        "responses": {
          "200": {
            "description": "A page of invoices"
          }
        }
      }
    },
    "/invoices/{id}": {
      "get": {
        "summary": "Retrieve an invoice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The invoice"
          },
          "404": {
            "description": "Not found in this tenant"
          }
        }
      }
    },
    "/tickets": {
      "post": {
        "summary": "Open a support ticket",
        "responses": {
          "201": {
            "description": "Ticket created"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}