Skip to content

FAQ API

import { Badge } from ‘@astrojs/starlight/components’;

FAQs are displayed in the dashboard and also used by the chatbot to answer patient questions via WhatsApp.

List all active FAQs for the clinic.

Auth: Required

Response 200:

[
{
"id": "uuid",
"clinic_id": "uuid",
"category": "parking",
"question": "¿Dónde puedo estacionarme?",
"answer": "Contamos con estacionamiento gratuito frente a la clínica...",
"keywords": ["estacionamiento", "parqueo", "parking"],
"is_active": true,
"created_at": "2026-05-01T00:00:00Z"
}
]

Categories: parking, prices, payment, hours, general

Keywords are used by the chatbot: if a patient’s message contains any of these words, this FAQ is surfaced as a candidate answer.


Create a new FAQ.

Auth: Admin only

Request:

{
"category": "prices",
"question": "¿Cuánto cuesta la consulta?",
"answer": "La consulta general tiene un costo de $20...",
"keywords": ["precio", "costo", "cuánto", "cobran"]
}

Response 201: FAQ object with id


Update an existing FAQ.

Auth: Admin only

Request: Same fields as POST (all optional).

Response 200: Updated FAQ object


Delete a FAQ.

Auth: Admin only

Response 200:

{ "message": "FAQ deleted successfully" }