{
  "openapi": "3.1.0",
  "info": {
    "title": "Nayeret API",
    "version": "1.1.0",
    "description": "Read-only, static JSON describing common Israeli forms, guides, letter templates and tools in Hebrew, with official links. No auth. Cached hourly. The Rules API (verified, date-versioned tax / National Insurance / labour parameters, calculators, deadlines and a change feed) has its own spec: https://nayeret.ai/api/v1/rules/openapi.json"
  },
  "servers": [
    {
      "url": "https://nayeret.ai"
    }
  ],
  "paths": {
    "/api/v1/forms.json": {
      "get": {
        "operationId": "listForms",
        "summary": "List all forms",
        "responses": {
          "200": {
            "description": "Form list"
          }
        }
      }
    },
    "/api/v1/forms/{id}.json": {
      "get": {
        "operationId": "getForm",
        "summary": "Get one form by its id (the \"id\" in /api/v1/forms.json)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The form id: the official form number for numbered forms (e.g. 101, 106, 161), or a word id for forms without a number (e.g. green-form, police-complaint, car-transfer-poa)",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$"
            },
            "examples": {
              "number": {
                "value": "101"
              },
              "word": {
                "value": "green-form"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Form detail"
          },
          "404": {
            "description": "Unknown form id: JSON {\"error\":\"not_found\"}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "not_found"
                    },
                    "message": {
                      "type": "string"
                    },
                    "forms": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/guides.json": {
      "get": {
        "operationId": "listGuides",
        "summary": "List the step-by-step guides",
        "responses": {
          "200": {
            "description": "Guides"
          }
        }
      }
    },
    "/api/v1/templates.json": {
      "get": {
        "operationId": "listTemplates",
        "summary": "List the letter templates",
        "responses": {
          "200": {
            "description": "Templates"
          }
        }
      }
    },
    "/api/v1/tools.json": {
      "get": {
        "operationId": "listTools",
        "summary": "List the in-browser tools (PDF, document makers, calculators)",
        "responses": {
          "200": {
            "description": "Tools: { updated, count, tools: [{ id, name, description, url, runs }] }",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updated": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "runs": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "updated",
                    "count",
                    "tools"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcp",
        "summary": "MCP JSON-RPC endpoint (initialize, tools/list, tools/call)",
        "responses": {
          "200": {
            "description": "JSON-RPC response"
          }
        }
      }
    }
  }
}