BankRegX API Documentation

Welcome to the BankRegX API documentation. Below are the available endpoints and how to use them.

1️⃣ Ask AI a Compliance Question

POST /api/ask

Description: Submit a compliance-related query to the AI chatbot and receive a response.

📌 Request Body (JSON):

{
  "query": "What are the Basel III regulations?",
  "userId": "user_12345"
}

📌 Response Example:

{
  "answer": "Basel III is a set of international banking regulations aimed at improving financial stability."
}

2️⃣ Submit Feedback

POST /api/feedback

Description: Send feedback on AI responses (whether they were useful or not).

📌 Request Body (JSON):

{
  "userId": "user_12345",
  "aiResponse": "Basel III is a set of banking regulations...",
  "feedback": "useful"
}

📌 Response Example:

{
  "message": "Feedback submitted successfully"
}

3️⃣ API Documentation

GET /docs

Description: Returns this API documentation.