# Catch-all for undocumented API routes

apiNotFound · GET /api/{path}

## Endpoint
`GET /api/{path}`

Any /api/* route no other handler owns returns this structured JSON 404 with an X-Api-Version header, so an agent probing an undocumented route gets a parseable envelope, never the HTML app shell.

## Authentication
```json
[]
```
An empty security requirement means this operation does not declare authentication. Read operation notes for entitlement and protocol-method requirements.

## Parameters
| Name | In | Required | Description |
| --- | --- | --- | --- |
| path | path | Yes |  |

## Responses and errors
| HTTP status | Meaning |
| --- | --- |
| 404 | The requested resource or operation does not exist. JSON-RPC maps 404 to -32002. |

## Response examples
No response example is supplied by OpenAPI for this operation. The complete response schemas are preserved below; use an actual response for observed values.

## Retry guidance
See [errors and retries](/docs/api/overview#errors-and-retries). Honor operation-specific response headers. A POST may create state; do not replay it automatically.

## Complete operation contract
The expanded contract below includes all parameter constraints, response headers, schemas and examples from OpenAPI.

```json
{
  "path": "/api/{path}",
  "method": "GET",
  "parameters": [
    {
      "name": "path",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "operationId": "apiNotFound",
  "summary": "Catch-all for undocumented API routes",
  "description": "Any /api/* route no other handler owns returns this structured JSON 404 with an X-Api-Version header, so an agent probing an undocumented route gets a parseable envelope, never the HTML app shell.",
  "tags": [
    "research"
  ],
  "security": [],
  "responses": {
    "404": {
      "description": "The requested resource or operation does not exist. JSON-RPC maps 404 to -32002.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "error"
            ],
            "properties": {
              "error": {
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "A stable machine-readable code, e.g. unauthorized or not_found."
                  },
                  "message": {
                    "type": "string",
                    "description": "A human-readable explanation."
                  },
                  "hint": {
                    "type": "string",
                    "description": "Optional resolution pointer."
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```
