{
  "openapi": "3.0.3",
  "info": {
    "title": "GetOTP Disposable Email & AI Agent API",
    "description": "High-speed temporary email API designed for humans, bots, and autonomous AI agents.",
    "version": "1.12.0"
  },
  "servers": [
    {
      "url": "https://getotp.ccwu.cc",
      "description": "Production Edge Gateway"
    }
  ],
  "paths": {
    "/api/new_address": {
      "post": {
        "summary": "Create a new disposable mailbox",
        "description": "Generates a temporary mailbox with a 16-character secure access key.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": { "type": "string", "example": "myworker" },
                  "domain": { "type": "string", "example": "getotp.ccwu.cc" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Mailbox successfully created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jwt": { "type": "string" },
                    "address": { "type": "string" },
                    "password": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/mails": {
      "get": {
        "summary": "Fetch received messages",
        "parameters": [
          { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 20 } },
          { "name": "offset", "in": "query", "schema": { "type": "integer", "default": 0 } }
        ],
        "responses": {
          "200": { "description": "List of received messages" }
        }
      }
    },
    "/redeem_api/redeem": {
      "post": {
        "summary": "Redeem a VIP pass or balance voucher programmatically",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["code"],
                "properties": {
                  "code": { "type": "string", "example": "01e812a3-e08b-4400-8d1b-57feafe52927" },
                  "user_email": { "type": "string", "example": "agent@domain.com" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Voucher successfully claimed" }
        }
      }
    }
  }
}