{
  "openapi": "3.0.3",
  "info": {
    "title": "Urva Gandhi Portfolio Developer API & MCP Server",
    "description": "Public REST APIs, Model Context Protocol (MCP) server, and developer endpoints providing verified coding statistics, developer profile metadata, and interactive contact handling for Urva Gandhi.",
    "version": "1.0.0",
    "contact": {
      "name": "Urva Gandhi",
      "email": "23bce078@nirmauni.ac.in",
      "url": "https://urvagandhi.tech"
    },
    "x-versioning-policy": "URL path versioning (/v1/) and X-API-Version header parameter. Backward compatibility guaranteed for version 1. Full contract: ${currentDomain}/docs/versioning.",
    "x-deprecation-policy": "Deprecations announced 6 months before end-of-life via the Sunset HTTP header (RFC 8594); deprecated surfaces also return the Deprecation header. Full timeline: ${currentDomain}/docs/versioning.",
    "x-rate-limit-policy": "Responses carry the standard IETF RateLimit-* headers (RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset). When rate limited, HTTP 429 is returned with a Retry-After header so agents can self-throttle in real time."
  },
  "servers": [
    {
      "url": "https://urvagandhi.tech",
      "description": "Active Domain Server"
    },
    {
      "url": "https://urvagandhi.tech/v1",
      "description": "Active Domain Versioned Base URL (/v1)"
    },
    {
      "url": "https://urvagandhi.tech",
      "description": "Primary Custom Domain"
    },
    {
      "url": "https://urvagandhi-portfolio.vercel.app",
      "description": "Lifetime Vercel Domain"
    }
  ],
  "paths": {
    "/api/leetcode": {
      "get": {
        "operationId": "getLeetCodeStats",
        "summary": "Get LeetCode Statistics",
        "description": "Fetches verified LeetCode profile statistics, global ranking, total problems solved, contest rating, and difficulty breakdown for Urva Gandhi.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "LeetCode handle (defaults to Urva_Gandhi)",
            "schema": {
              "type": "string",
              "default": "Urva_Gandhi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeetCodeProfile"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/codeforces": {
      "get": {
        "operationId": "getCodeforcesStats",
        "summary": "Get Codeforces Statistics",
        "description": "Fetches Codeforces contest rating, max rating, rank, and submission metrics.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "Codeforces handle (defaults to Urva_Gandhi)",
            "schema": {
              "type": "string",
              "default": "Urva_Gandhi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeforcesProfile"
                }
              }
            }
          }
        }
      }
    },
    "/api/codechef": {
      "get": {
        "operationId": "getCodeChefStats",
        "summary": "Get CodeChef Statistics",
        "description": "Fetches CodeChef rating, global rank, contest stars, and problems solved.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "CodeChef handle (defaults to urva_gandhi)",
            "schema": {
              "type": "string",
              "default": "urva_gandhi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeChefProfile"
                }
              }
            }
          }
        }
      }
    },
    "/api/gfg": {
      "get": {
        "operationId": "getGfgStats",
        "summary": "Get GeeksforGeeks Statistics",
        "description": "Fetches GeeksforGeeks overall coding score, streak data, and institute ranking.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "GeeksforGeeks handle (defaults to urvagandhi)",
            "schema": {
              "type": "string",
              "default": "urvagandhi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GfgProfile"
                }
              }
            }
          }
        }
      }
    },
    "/api/hackerrank": {
      "get": {
        "operationId": "getHackerRankStats",
        "summary": "Get HackerRank Statistics",
        "description": "Fetches HackerRank badges, scores, and problem solving achievements.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "HackerRank handle (defaults to urvagandhi24)",
            "schema": {
              "type": "string",
              "default": "urvagandhi24"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HackerRankProfile"
                }
              }
            }
          }
        }
      }
    },
    "/api/contact": {
      "post": {
        "operationId": "submitContactInquiry",
        "summary": "Submit Contact Form Inquiry",
        "description": "Delivers an inquiry email directly to Urva Gandhi via Brevo HTTPS REST API.",
        "security": [
          {
            "oauth2": [
              "profile:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message delivered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      }
    },
    "/api/mcp": {
      "get": {
        "operationId": "getMcpManifest",
        "summary": "MCP Server Handshake",
        "description": "Returns Model Context Protocol server capabilities, transport options, and available tools.",
        "security": [],
        "responses": {
          "200": {
            "description": "MCP Manifest response"
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      },
      "post": {
        "operationId": "callMcpTool",
        "summary": "Execute MCP Tool or Handshake (JSON-RPC 2.0)",
        "description": "Executes MCP tools and resource handlers.",
        "security": [],
        "responses": {
          "200": {
            "description": "JSON-RPC response payload"
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      }
    },
    "/api/keys": {
      "get": {
        "operationId": "selfServeApiKey",
        "summary": "Self-Serve Free API Key",
        "description": "Generates a free-tier API key without signup or human contact, so agents can authenticate immediately (no 'contact sales' forms).",
        "security": [],
        "responses": {
          "200": {
            "description": "API key issued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      }
    },
    "/api/sandbox": {
      "get": {
        "operationId": "sandboxSampleData",
        "summary": "Sandbox Test Environment",
        "description": "Returns clearly-labelled sample payloads so agents can test integrations with zero quota impact.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "description": "Sample payload to return",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "leetcode",
                "codeforces",
                "codechef",
                "gfg",
                "hackerrank",
                "profile",
                "projects",
                "contact"
              ],
              "default": "profile"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sample payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "sandboxExecute",
        "summary": "Sandbox Execute / Echo",
        "description": "Echoes or executes sample tool calls inside the sandbox environment.",
        "security": [],
        "responses": {
          "200": {
            "description": "Sandbox result"
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      }
    },
    "/v1/leetcode": {
      "get": {
        "operationId": "getLeetCodeStats",
        "summary": "Get LeetCode Statistics",
        "description": "Fetches verified LeetCode profile statistics, global ranking, total problems solved, contest rating, and difficulty breakdown for Urva Gandhi.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "LeetCode handle (defaults to Urva_Gandhi)",
            "schema": {
              "type": "string",
              "default": "Urva_Gandhi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeetCodeProfile"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/leetcode": {
      "get": {
        "operationId": "getLeetCodeStats",
        "summary": "Get LeetCode Statistics",
        "description": "Fetches verified LeetCode profile statistics, global ranking, total problems solved, contest rating, and difficulty breakdown for Urva Gandhi.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "LeetCode handle (defaults to Urva_Gandhi)",
            "schema": {
              "type": "string",
              "default": "Urva_Gandhi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeetCodeProfile"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/codeforces": {
      "get": {
        "operationId": "getCodeforcesStats",
        "summary": "Get Codeforces Statistics",
        "description": "Fetches Codeforces contest rating, max rating, rank, and submission metrics.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "Codeforces handle (defaults to Urva_Gandhi)",
            "schema": {
              "type": "string",
              "default": "Urva_Gandhi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeforcesProfile"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/codeforces": {
      "get": {
        "operationId": "getCodeforcesStats",
        "summary": "Get Codeforces Statistics",
        "description": "Fetches Codeforces contest rating, max rating, rank, and submission metrics.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "Codeforces handle (defaults to Urva_Gandhi)",
            "schema": {
              "type": "string",
              "default": "Urva_Gandhi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeforcesProfile"
                }
              }
            }
          }
        }
      }
    },
    "/v1/codechef": {
      "get": {
        "operationId": "getCodeChefStats",
        "summary": "Get CodeChef Statistics",
        "description": "Fetches CodeChef rating, global rank, contest stars, and problems solved.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "CodeChef handle (defaults to urva_gandhi)",
            "schema": {
              "type": "string",
              "default": "urva_gandhi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeChefProfile"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/codechef": {
      "get": {
        "operationId": "getCodeChefStats",
        "summary": "Get CodeChef Statistics",
        "description": "Fetches CodeChef rating, global rank, contest stars, and problems solved.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "CodeChef handle (defaults to urva_gandhi)",
            "schema": {
              "type": "string",
              "default": "urva_gandhi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeChefProfile"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gfg": {
      "get": {
        "operationId": "getGfgStats",
        "summary": "Get GeeksforGeeks Statistics",
        "description": "Fetches GeeksforGeeks overall coding score, streak data, and institute ranking.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "GeeksforGeeks handle (defaults to urvagandhi)",
            "schema": {
              "type": "string",
              "default": "urvagandhi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GfgProfile"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gfg": {
      "get": {
        "operationId": "getGfgStats",
        "summary": "Get GeeksforGeeks Statistics",
        "description": "Fetches GeeksforGeeks overall coding score, streak data, and institute ranking.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "GeeksforGeeks handle (defaults to urvagandhi)",
            "schema": {
              "type": "string",
              "default": "urvagandhi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GfgProfile"
                }
              }
            }
          }
        }
      }
    },
    "/v1/hackerrank": {
      "get": {
        "operationId": "getHackerRankStats",
        "summary": "Get HackerRank Statistics",
        "description": "Fetches HackerRank badges, scores, and problem solving achievements.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "HackerRank handle (defaults to urvagandhi24)",
            "schema": {
              "type": "string",
              "default": "urvagandhi24"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HackerRankProfile"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/hackerrank": {
      "get": {
        "operationId": "getHackerRankStats",
        "summary": "Get HackerRank Statistics",
        "description": "Fetches HackerRank badges, scores, and problem solving achievements.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "HackerRank handle (defaults to urvagandhi24)",
            "schema": {
              "type": "string",
              "default": "urvagandhi24"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HackerRankProfile"
                }
              }
            }
          }
        }
      }
    },
    "/v1/contact": {
      "post": {
        "operationId": "submitContactInquiry",
        "summary": "Submit Contact Form Inquiry",
        "description": "Delivers an inquiry email directly to Urva Gandhi via Brevo HTTPS REST API.",
        "security": [
          {
            "oauth2": [
              "profile:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message delivered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      }
    },
    "/api/v1/contact": {
      "post": {
        "operationId": "submitContactInquiry",
        "summary": "Submit Contact Form Inquiry",
        "description": "Delivers an inquiry email directly to Urva Gandhi via Brevo HTTPS REST API.",
        "security": [
          {
            "oauth2": [
              "profile:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message delivered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      }
    },
    "/v1/mcp": {
      "get": {
        "operationId": "getMcpManifest",
        "summary": "MCP Server Handshake",
        "description": "Returns Model Context Protocol server capabilities, transport options, and available tools.",
        "security": [],
        "responses": {
          "200": {
            "description": "MCP Manifest response"
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      },
      "post": {
        "operationId": "callMcpTool",
        "summary": "Execute MCP Tool or Handshake (JSON-RPC 2.0)",
        "description": "Executes MCP tools and resource handlers.",
        "security": [],
        "responses": {
          "200": {
            "description": "JSON-RPC response payload"
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      }
    },
    "/api/v1/mcp": {
      "get": {
        "operationId": "getMcpManifest",
        "summary": "MCP Server Handshake",
        "description": "Returns Model Context Protocol server capabilities, transport options, and available tools.",
        "security": [],
        "responses": {
          "200": {
            "description": "MCP Manifest response"
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      },
      "post": {
        "operationId": "callMcpTool",
        "summary": "Execute MCP Tool or Handshake (JSON-RPC 2.0)",
        "description": "Executes MCP tools and resource handlers.",
        "security": [],
        "responses": {
          "200": {
            "description": "JSON-RPC response payload"
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      }
    },
    "/v1/keys": {
      "get": {
        "operationId": "selfServeApiKey",
        "summary": "Self-Serve Free API Key",
        "description": "Generates a free-tier API key without signup or human contact, so agents can authenticate immediately (no 'contact sales' forms).",
        "security": [],
        "responses": {
          "200": {
            "description": "API key issued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      }
    },
    "/api/v1/keys": {
      "get": {
        "operationId": "selfServeApiKey",
        "summary": "Self-Serve Free API Key",
        "description": "Generates a free-tier API key without signup or human contact, so agents can authenticate immediately (no 'contact sales' forms).",
        "security": [],
        "responses": {
          "200": {
            "description": "API key issued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      }
    },
    "/v1/sandbox": {
      "get": {
        "operationId": "sandboxSampleData",
        "summary": "Sandbox Test Environment",
        "description": "Returns clearly-labelled sample payloads so agents can test integrations with zero quota impact.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "description": "Sample payload to return",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "leetcode",
                "codeforces",
                "codechef",
                "gfg",
                "hackerrank",
                "profile",
                "projects",
                "contact"
              ],
              "default": "profile"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sample payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "sandboxExecute",
        "summary": "Sandbox Execute / Echo",
        "description": "Echoes or executes sample tool calls inside the sandbox environment.",
        "security": [],
        "responses": {
          "200": {
            "description": "Sandbox result"
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      }
    },
    "/api/v1/sandbox": {
      "get": {
        "operationId": "sandboxSampleData",
        "summary": "Sandbox Test Environment",
        "description": "Returns clearly-labelled sample payloads so agents can test integrations with zero quota impact.",
        "security": [],
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "description": "Sample payload to return",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "leetcode",
                "codeforces",
                "codechef",
                "gfg",
                "hackerrank",
                "profile",
                "projects",
                "contact"
              ],
              "default": "profile"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sample payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "sandboxExecute",
        "summary": "Sandbox Execute / Echo",
        "description": "Echoes or executes sample tool calls inside the sandbox environment.",
        "security": [],
        "responses": {
          "200": {
            "description": "Sandbox result"
          }
        },
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "API version to target. Omit to use the latest stable version (1).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "default": "1"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://urvagandhi.tech/.well-known/oauth/token",
            "scopes": {
              "profile:read": "Read public developer profile and coding statistics.",
              "profile:write": "Submit a contact inquiry on behalf of an authenticated client."
            }
          },
          "authorizationCode": {
            "authorizationUrl": "https://urvagandhi.tech/.well-known/oauth/authorize",
            "tokenUrl": "https://urvagandhi.tech/.well-known/oauth/token",
            "scopes": {
              "profile:read": "Read public developer profile and coding statistics.",
              "profile:write": "Submit a contact inquiry on behalf of an authenticated client."
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string",
            "example": "https://urvagandhi.tech/docs/errors/invalid-parameters"
          },
          "title": {
            "type": "string",
            "example": "Bad Request"
          },
          "status": {
            "type": "integer",
            "example": 400
          },
          "code": {
            "type": "string",
            "example": "MISSING_REQUIRED_FIELDS"
          },
          "detail": {
            "type": "string",
            "example": "Required fields missing."
          },
          "instance": {
            "type": "string",
            "example": "/api/contact"
          },
          "resolution_hint": {
            "type": "string",
            "example": "Check parameters and try again."
          }
        }
      },
      "LeetCodeProfile": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "solved": {
            "type": "integer"
          },
          "rating": {
            "type": "integer"
          }
        }
      },
      "CodeforcesProfile": {
        "type": "object",
        "properties": {
          "handle": {
            "type": "string"
          },
          "rating": {
            "type": "integer"
          }
        }
      },
      "CodeChefProfile": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "rating": {
            "type": "integer"
          }
        }
      },
      "GfgProfile": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "score": {
            "type": "integer"
          }
        }
      },
      "HackerRankProfile": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          }
        }
      },
      "ContactPayload": {
        "type": "object",
        "required": [
          "name",
          "email",
          "message"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ContactResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiKeyResponse": {
        "type": "object",
        "properties": {
          "keyId": {
            "type": "string"
          },
          "apiKey": {
            "type": "string"
          },
          "sandboxKey": {
            "type": "string"
          },
          "tier": {
            "type": "string"
          },
          "quota": {
            "type": "object"
          },
          "sandbox": {
            "type": "object"
          }
        }
      },
      "SandboxResponse": {
        "type": "object",
        "properties": {
          "sample": {
            "type": "boolean"
          },
          "mode": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "data": {
            "type": "object"
          }
        }
      }
    }
  }
}