Local: http://localhost:8000
Production: https://your-app.onrender.com
- Create environment
- Add variables:
baseUrl:http://localhost:8000sessionId: (will be set after creating session)questionId: (will be set after generating questions)jobId: (will be set after async operations)
POST {{baseUrl}}/api/v1/user/register
Content-Type: application/json
{
"fullname": "John Doe",
"email": "john.doe@example.com",
"password": "password123"
}
POST {{baseUrl}}/api/v1/user/login
Content-Type: application/json
{
"email": "john.doe@example.com",
"password": "password123"
}
Note: Cookie is automatically saved
GET {{baseUrl}}/api/v1/user/profile
PUT {{baseUrl}}/api/v1/user/profile
Content-Type: application/json
{
"fullname": "John Updated Doe"
}
POST {{baseUrl}}/api/v1/user/logout
POST {{baseUrl}}/api/v1/session/create
Content-Type: application/json
{
"role": "Backend Developer",
"experience": "mid-level",
"topicsToFocus": ["Node.js", "MongoDB", "REST APIs", "Docker"]
}
Save the _id from response as sessionId
Valid Roles:
- Backend Developer
- Frontend Developer
- Full Stack Developer
- DevOps Engineer
- Data Scientist
Valid Experience:
- entry-level
- junior
- mid-level
- senior
- lead
- expert
GET {{baseUrl}}/api/v1/session
GET {{baseUrl}}/api/v1/session/{{sessionId}}
PUT {{baseUrl}}/api/v1/session/{{sessionId}}
Content-Type: application/json
{
"status": "completed",
"duration": 90
}
Valid Status: pending, in-progress, completed, cancelled
DELETE {{baseUrl}}/api/v1/session/{{sessionId}}
POST {{baseUrl}}/api/v1/question/generate
Content-Type: application/json
{
"role": "Backend Developer",
"experience": "mid-level",
"topicsToFocus": ["Node.js", "Express.js", "MongoDB"],
"sessionId": "{{sessionId}}"
}
Save the jobId from response
GET {{baseUrl}}/api/v1/question/session/{{sessionId}}
GET {{baseUrl}}/api/v1/question/{{questionId}}
GET {{baseUrl}}/api/v1/question/search?q=node&limit=20
GET {{baseUrl}}/api/v1/question/session/{{sessionId}}/pinned
GET {{baseUrl}}/api/v1/question/session/{{sessionId}}/stats
POST {{baseUrl}}/api/v1/question/custom
Content-Type: application/json
{
"sessionId": "{{sessionId}}",
"question": "What is the difference between SQL and NoSQL databases?",
"answer": "SQL databases are relational and use structured schemas, while NoSQL databases are non-relational and offer flexible schemas."
}
PUT {{baseUrl}}/api/v1/question/{{questionId}}
Content-Type: application/json
{
"question": "Updated question text",
"answer": "Updated answer text"
}
PATCH {{baseUrl}}/api/v1/question/{{questionId}}/toggle-pin
POST {{baseUrl}}/api/v1/question/{{questionId}}/regenerate
DELETE {{baseUrl}}/api/v1/question/{{questionId}}
POST {{baseUrl}}/api/v1/export/export/{{sessionId}}?format=pdf
Save the jobId from response
POST {{baseUrl}}/api/v1/export/export/{{sessionId}}?format=csv
POST {{baseUrl}}/api/v1/export/export/{{sessionId}}?format=docx
GET {{baseUrl}}/api/v1/export/status/{{jobId}}
GET {{baseUrl}}/api/v1/export/download/{{filename}}
GET {{baseUrl}}/api/v1/queue/question/{{jobId}}
GET {{baseUrl}}/api/v1/queue/export/{{jobId}}
GET {{baseUrl}}/api/v1/analytics/user
GET {{baseUrl}}/api/v1/analytics/session/{{sessionId}}
GET {{baseUrl}}/api/v1/analytics/trending?limit=10
GET {{baseUrl}}/api/v1/notifications?limit=20
POST {{baseUrl}}/api/v1/notifications/read
Content-Type: application/json
{
"notificationIds": ["notif_1710504000000_abc123", "notif_1710504100000_def456"]
}
DELETE {{baseUrl}}/api/v1/notifications/clear
POST {{baseUrl}}/api/v1/bulk/delete
Content-Type: application/json
{
"questionIds": [
"65fa111222333444555666",
"65fa111222333444555667",
"65fa111222333444555668"
]
}
POST {{baseUrl}}/api/v1/bulk/difficulty
Content-Type: application/json
{
"questionIds": [
"65fa111222333444555666",
"65fa111222333444555667"
],
"difficulty": "hard"
}
Valid Difficulty: easy, medium, hard
POST {{baseUrl}}/api/v1/bulk/toggle-pin
Content-Type: application/json
{
"questionIds": [
"65fa111222333444555666",
"65fa111222333444555667"
],
"isPinned": true
}
GET {{baseUrl}}/health
- Register User → Get success
- Login User → Cookie saved automatically
- Get Profile → Verify user data
- Create Session → Save
sessionId - Get All Sessions → Verify session exists
- Get Session By ID → Verify details
- Generate Questions → Save
jobId - Check Job Status → Wait for "completed"
- Get Questions by Session → View generated questions
- Get Single Question → Save
questionId - Toggle Pin → Pin important question
- Get Pinned Questions → Verify pinned
- Update Question → Modify text
- Add Custom Question → Add manual question
- Get User Analytics → View stats
- Get Session Analytics → View session metrics
- Get Trending Topics → See popular topics
- Export to PDF → Save
jobId - Check Export Status → Wait for "completed"
- Download File → Get PDF
- Get multiple question IDs
- Bulk Update Difficulty → Change to "hard"
- Bulk Toggle Pin → Pin multiple
- Bulk Delete → Remove multiple
- Get Notifications → View job notifications
- Mark as Read → Mark some read
- Clear All → Clear notifications
| Operation | Time |
|---|---|
| Health Check | < 50ms |
| Register/Login | < 200ms |
| Create Session | < 100ms |
| Queue Job | < 100ms |
| AI Generation | 30-60s |
| Get Questions | < 100ms |
| Analytics | < 200ms |
| Export Generation | 5-15s |
- Cookie-based Auth: JWT token stored in HTTP-only cookie
- Auto-saved: Postman saves cookie automatically after login
- Expiry: 7 days
- Required: All endpoints except register, login, health, trending
- Cause: Not logged in or token expired
- Fix: Login again
- Cause: Invalid data format
- Fix: Check request body matches examples
- Cause: Invalid ID or resource doesn't exist
- Fix: Verify IDs are correct
- Cause: Rate limit exceeded
- Fix: Wait and try again
- Use Variables: Set
sessionId,questionId,jobIdas environment variables - Save Responses: Use Postman Tests to auto-save IDs
- Collections: Organize by feature
- Environments: Create separate for local/production
- Pre-request Scripts: Auto-login before requests
// Auto-save session ID
if (pm.response.code === 201) {
const response = pm.response.json();
if (response.data && response.data.session) {
pm.environment.set("sessionId", response.data.session._id);
}
}
// Auto-save job ID
if (pm.response.code === 202) {
const response = pm.response.json();
if (response.jobId) {
pm.environment.set("jobId", response.jobId);
}
}Total Endpoints: 36 Ready to test! 🚀