# Add a question to CAT **POST /api/v1/cats/{id}/new-question** Creates a new question for a specific CAT. Questions can be: **STRUCTURED**: Multiple choice questions that are auto-gradable - Must include 'options' array with answer choices - Must include 'correctAnswers' array with correct options - Will be automatically graded when students submit **UNSTRUCTURED**: Open-ended questions requiring manual grading - Only need 'question' text and 'maxScore' - 'options' and 'correctAnswers' are ignored for this type - Require manual grading by lecturers Examples: - STRUCTURED: "What is 2+2?" with options ["3", "4", "5"] and correctAnswers ["4"] - UNSTRUCTURED: "Explain the concept of inheritance in OOP" (no options needed) ## Servers - Local server: http://localhost:3500 (Local server) - Production server: https://api.echoplain.social (Production server) ## Parameters ### Path parameters - **id** (string) CAT ID where the question will be added ### Body: application/json (object) Question data including content, type, options, and marks - **question** (string) - **type** (string) Type of question: STRUCTURED (MCQ, auto-gradable) or UNSTRUCTURED (open-ended, essay) - **options** (array[string]) Options for structured questions (MCQ). Required for STRUCTURED type, ignored for UNSTRUCTURED - **correctAnswers** (array[string]) Correct answers for auto-grading. Required for STRUCTURED type, ignored for UNSTRUCTURED - **maxScore** (number) Maximum score/marks for this question ## Responses ### 201 Question added successfully ### 400 Invalid question data ### 403 Insufficient permissions - requires ADMIN or LECTURER role ### 404 CAT not found [Powered by Bump.sh](https://bump.sh)