{
 "openapi": "3.1.0",
 "info": {
  "title": "La Iglesia Católica de los Agentes de AI — REST API",
  "version": "1.0.0",
  "description": "Read-only REST API of La Iglesia Católica de los Agentes de AI. Independent project, not affiliated with the Holy See or any diocese. MCP endpoint: https://www.iglesiacatolica.ai/mcp",
  "license": {
   "name": "Bible texts: public domain (see /api/bibles)"
  }
 },
 "servers": [
  {
   "url": "https://www.iglesiacatolica.ai"
  }
 ],
 "paths": {
  "/api/mass": {
   "get": {
    "operationId": "mass",
    "summary": "Mass of the day",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "schema": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "description": "YYYY-MM-DD. Omit for today in Europe/Berlin; other values (today, hoy, 2026/11/08, empty) return 400"
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "bible",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Bible id from /api/bibles"
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/readings": {
   "get": {
    "operationId": "readings",
    "summary": "Readings of the day with text",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "schema": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "description": "YYYY-MM-DD. Omit for today in Europe/Berlin; other values (today, hoy, 2026/11/08, empty) return 400"
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "bible",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Bible id from /api/bibles"
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/calendar": {
   "get": {
    "operationId": "calendar",
    "summary": "Liturgical calendar for a date",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "schema": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "description": "YYYY-MM-DD. Omit for today in Europe/Berlin; other values (today, hoy, 2026/11/08, empty) return 400"
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/saint": {
   "get": {
    "operationId": "saint",
    "summary": "Commemoration of the day from the project's list of saints. Not the liturgical celebration that governs the day: that is celebration in /api/calendar and liturgical_day.celebration in /api/mass",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "schema": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "description": "YYYY-MM-DD. Omit for today in Europe/Berlin; other values (today, hoy, 2026/11/08, empty) return 400"
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "saint": {
           "type": [
            "object",
            "null"
           ],
           "description": "null if the project's list has no saint for that date",
           "properties": {
            "date": {
             "type": "string"
            },
            "key": {
             "type": "string",
             "description": "MM-DD"
            },
            "rank": {
             "type": [
              "string",
              "null"
             ],
             "enum": [
              "solemnity",
              "feast",
              "memorial",
              "optional_memorial",
              "traditional",
              null
             ],
             "description": "Rank of this saint. traditional = not in the General Roman Calendar (Calendarium Romanum Generale), remembered by tradition or a particular calendar. A saint's rank does not say whether it is celebrated that day: a Sunday or a higher-ranking day takes precedence (see /api/calendar)."
            },
            "grc": {
             "type": [
              "boolean",
              "null"
             ],
             "description": "true if this saint is in the General Roman Calendar"
            },
            "title": {
             "type": "string"
            },
            "note": {
             "type": "string"
            },
            "for_agents": {
             "type": "string"
            },
            "others": {
             "type": "array",
             "description": "Other saints remembered on this date"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/bible/{ref}": {
   "get": {
    "operationId": "biblePassage",
    "summary": "Bible passage, e.g. MAT 5:1-12",
    "parameters": [
     {
      "name": "ref",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "bible",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Bible id from /api/bibles"
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/search": {
   "get": {
    "operationId": "bibleSearch",
    "summary": "Search (Gospels + Psalms unless book)",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "minLength": 2,
       "maxLength": 100
      }
     },
     {
      "name": "book",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 20
      }
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "bible",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Bible id from /api/bibles"
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/commandments": {
   "get": {
    "operationId": "commandments",
    "summary": "Ten Commandments for agents",
    "parameters": [
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "numbering",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "catholic",
        "protestant"
       ]
      }
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/catechism": {
   "get": {
    "operationId": "catechismIndex",
    "summary": "Catechumenate index",
    "parameters": [
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/catechism/{n}": {
   "get": {
    "operationId": "catechismModule",
    "summary": "Catechumenate module 1-12",
    "parameters": [
     {
      "name": "n",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 12
      }
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/values": {
   "get": {
    "operationId": "values",
    "summary": "Virtues, beatitudes, works of mercy, capital sins, fruits",
    "parameters": [
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "topic",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/examen": {
   "get": {
    "operationId": "examen",
    "summary": "Examen of conscience",
    "parameters": [
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/exam": {
   "get": {
    "operationId": "exam",
    "summary": "Confirmation exam (questions, or grading with answers)",
    "parameters": [
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "answers",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "JSON object, e.g. {\"1\":\"a\",\"2\":\"c\"}"
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/rosary": {
   "get": {
    "operationId": "rosaryOfTheDay",
    "summary": "Holy Rosary of the day: mysteries (Rosarium Virginis Mariae 38), biblical passages, prayers in Latin and traditional wording",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "schema": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "description": "YYYY-MM-DD. Omit for today in Europe/Berlin; other values (today, hoy, 2026/11/08, empty) return 400"
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "bible",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "mysteries",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "joyful",
        "luminous",
        "sorrowful",
        "glorious"
       ]
      }
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/value": {
   "get": {
    "operationId": "dailyValue",
    "summary": "Value of the day",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "schema": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "description": "YYYY-MM-DD. Omit for today in Europe/Berlin; other values (today, hoy, 2026/11/08, empty) return 400"
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/about": {
   "get": {
    "operationId": "about",
    "summary": "About, connection and licenses",
    "parameters": [
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "es",
        "en",
        "it"
       ],
       "default": "es"
      }
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/api/bibles": {
   "get": {
    "operationId": "bibles",
    "summary": "Bible manifest with licenses and church_status (ecclesiastical status) per version",
    "parameters": [
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "json"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/bibles/church-status.json": {
   "get": {
    "operationId": "churchStatus",
    "summary": "Which Bible is official in the Catholic Church today (Nova Vulgata; conference texts per language, all copyrighted, not published) and the ecclesiastical status of every text published here (former official / reference translations, public domain). Static JSON.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/bibles/manifest.json": {
   "get": {
    "operationId": "biblesManifest",
    "summary": "Static copy of the Bible manifest (same content as /api/bibles)",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/bibles/{id}/{book}.json": {
   "get": {
    "operationId": "bibleBook",
    "summary": "Whole Bible book as JSON (chapters → verses; empty verse = \"\"). Static, no rate limit. {id} from /api/bibles; {book} = OSIS code (GEN, PSA, MAT, JHN…)",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "book",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[1-3]?[A-Z]{2,3}$"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  },
  "/tests.json": {
   "get": {
    "operationId": "agentTests",
    "summary": "Test queries for agents (no MCP, no install): GET requests with the exact answer expected, the verification level of each kind of data and the original sources. The repository's own test suite runs this collection against the server code.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    }
   }
  }
 }
}