{
  "openapi": "3.1.0",
  "info": {
    "title": "AgentMint Verify API",
    "version": "0.2.0",
    "description": "Layered challenge and discovery evidence plus seven-day protocol drift monitoring. No payment is sent."
  },
  "servers": [
    {
      "url": "https://agentmint-verify.lasting-design-mail.workers.dev"
    }
  ],
  "paths": {
    "/v1/verify": {
      "post": {
        "summary": "Verify an HTTPS payment challenge without sending payment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "endpoint"
                ],
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Trust Card generated or returned from cache"
          },
          "400": {
            "description": "Unsafe or invalid endpoint"
          },
          "429": {
            "description": "Public beta scan budget exhausted"
          }
        }
      }
    },
    "/v1/cards/{id}": {
      "get": {
        "summary": "Read a persisted Trust Card",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Trust Card"
          },
          "404": {
            "description": "Trust Card not found"
          }
        }
      }
    },
    "/v1/monitoring": {
      "post": {
        "summary": "Start a free seven-day monitoring trial",
        "description": "Creates a baseline card and returns a private bearer link. Billing and email alerts are disabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "endpoint",
                  "willingnessToPay",
                  "interviewOptIn"
                ],
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048
                  },
                  "contactEmail": {
                    "type": "string",
                    "format": "email"
                  },
                  "githubUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "willingnessToPay": {
                    "type": "string",
                    "enum": [
                      "yes",
                      "maybe",
                      "no"
                    ]
                  },
                  "useCase": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "interviewOptIn": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Monitoring trial and private view URL"
          },
          "400": {
            "description": "Invalid input or unsafe endpoint"
          }
        }
      }
    },
    "/v1/monitoring/{id}": {
      "get": {
        "summary": "Read a private monitoring record",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Monitoring trial and run history"
          },
          "404": {
            "description": "Trial not found or bearer token invalid"
          }
        }
      }
    }
  }
}