{
  "openapi": "3.1.0",
  "info": {
    "title": "Unsubscribe Tool API",
    "version": "1.0.0",
    "description": "Email unsubscribe tool that scans your inbox for subscriptions and lets you unsubscribe from all of them in one click. Zero data retention, never sells your data.",
    "contact": {
      "name": "Unsubscribe",
      "url": "https://unsubscribetool.com"
    }
  },
  "servers": [
    {
      "url": "https://unsubscribetool.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "summary": "Homepage — Email unsubscribe tool",
        "description": "Interactive web application for scanning and unsubscribing from email subscriptions.",
        "responses": {
          "200": {
            "description": "HTML page with unsubscribe tool",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/ws": {
      "get": {
        "summary": "WebSocket — Real-time inbox scanning",
        "description": "WebSocket endpoint for real-time IMAP scanning. Accepts email credentials, scans inbox for subscriptions, and returns results. Credentials are processed in memory only and never persisted.",
        "responses": {
          "101": {
            "description": "WebSocket upgrade successful"
          }
        }
      }
    },
    "/blog/": {
      "get": {
        "summary": "Blog index",
        "description": "List of all blog articles about email unsubscribe tips and guides.",
        "responses": {
          "200": {
            "description": "HTML blog index page",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/blog/how-to-unsubscribe-all-emails/": {
      "get": {
        "summary": "How to Unsubscribe From All Emails at Once",
        "description": "Complete 2026 guide on unsubscribing from all emails at once.",
        "responses": {
          "200": {
            "description": "HTML article",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/blog/batch-unsubscribe-emails/": {
      "get": {
        "summary": "How to Batch Unsubscribe From Emails",
        "description": "5 methods compared for batch email unsubscribe.",
        "responses": {
          "200": {
            "description": "HTML article",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/blog/how-to-stop-spam-emails/": {
      "get": {
        "summary": "How to Stop Spam Emails Forever",
        "description": "10 proven methods to stop spam emails.",
        "responses": {
          "200": {
            "description": "HTML article",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/blog/unroll-me-alternative/": {
      "get": {
        "summary": "Best Unroll.me Alternatives in 2026",
        "description": "5 safer alternatives to Unroll.me compared by privacy, features, and price.",
        "responses": {
          "200": {
            "description": "HTML article",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/blog/unsubscribe-gmail/": {
      "get": {
        "summary": "How to Unsubscribe From Gmail in Bulk",
        "description": "5 methods to unsubscribe from Gmail in bulk.",
        "responses": {
          "200": {
            "description": "HTML article",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "description": "Microsoft OAuth2 for IMAP access (Outlook provider only)",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
            "tokenUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/token",
            "scopes": {
              "https://outlook.office.com/IMAP.AccessAsUser.All": "Access IMAP as user"
            }
          },
          "deviceCode": {
            "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/devicecode",
            "tokenUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/token",
            "scopes": {
              "https://outlook.office.com/IMAP.AccessAsUser.All": "Access IMAP as user"
            }
          }
        }
      }
    }
  }
}
