BankRegX API Documentation

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 Site Feedback

POST /api/site-feedback

Description: Submit overall feedback with optional consent to publish as a testimonial.

📌 Request Body (JSON):

{
  "userId": "user_12345",
  "name": "Ada Lovelace",
  "email": "ada@example.com",
  "organization": "BankCo",
  "role": "Compliance Officer",
  "rating": 5,
  "comments": "Excellent summaries of FCA updates.",
  "consentToPublish": true,
  "allowContact": true
}

📌 Response:

{ "message": "Feedback submitted." }

3️⃣ Public Testimonials (Approved)

GET /api/testimonials

Description: Returns the latest approved testimonials.