{
  "swagger": "2.0",
  "info": {
    "title": "Zetaleap URL Validator",
    "description": "Validate URL syntax, check live HTTP status codes with 3-second timeout protection, and detect final redirect destinations without crashing Power Automate flows.",
    "version": "1.0.0",
    "contact": {
      "name": "Zetaleap Support Team",
      "url": "https://zetaleap.com/#contact",
      "email": "support_team@zetaleap.com"
    }
  },
  "x-ms-connector-metadata": [
    {
      "propertyName": "Website",
      "propertyValue": "https://zetaleap.com"
    },
    {
      "propertyName": "Privacy policy",
      "propertyValue": "https://zetaleap.com/privacy"
    },
    {
      "propertyName": "Categories",
      "propertyValue": "IT Operations;Marketing"
    }
  ],
  "host": "test.zetaleap.com",
  "basePath": "/",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "api_key": {
      "type": "apiKey",
      "in": "header",
      "name": "Authorization",
      "description": "Enter your Zetaleap Personal Access Token prefixed with Bearer (example: Bearer zl_your_api_token). Generate tokens free at https://zetaleap.com/profile."
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "paths": {
    "/api/tools/validate-url": {
      "post": {
        "tags": [
          "URL Validator"
        ],
        "operationId": "ValidateUrl",
        "summary": "Validate URL reachability and redirects",
        "description": "Checks URL syntax, live HTTP reachability (with 3-second timeout protection), HTTP status code, and final redirect URL.",
        "x-ms-visibility": "important",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "required": true,
            "x-ms-summary": "URL Validation Request",
            "schema": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "x-ms-summary": "Target URL",
                  "description": "Full HTTP or HTTPS URL to inspect (e.g. https://microsoft.com)."
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Validation result returned cleanly",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "isValidSyntax": {
                  "type": "boolean",
                  "x-ms-summary": "Valid URL Syntax"
                },
                "isReachable": {
                  "type": "boolean",
                  "x-ms-summary": "Is Reachable Online"
                },
                "statusCode": {
                  "type": "integer",
                  "format": "int32",
                  "x-ms-summary": "HTTP Status Code"
                },
                "isRedirected": {
                  "type": "boolean",
                  "x-ms-summary": "Was Redirected"
                },
                "finalUrl": {
                  "type": "string",
                  "x-ms-summary": "Final Destination URL"
                },
                "domain": {
                  "type": "string",
                  "x-ms-summary": "Hostname Domain"
                }
              }
            }
          }
        }
      }
    }
  }
}