Skip to main content
POST
/
api
/
onboarding
Complete Onboarding
curl --request POST \
  --url https://api.example.com/api/onboarding \
  --header 'Content-Type: application/json' \
  --data '
{
  "barExamTestDate": "<string>",
  "targetScore": 123,
  "studyHours": 123,
  "currentScore": 123,
  "challengingAreas": [
    {}
  ],
  "focusAreas": [
    {}
  ],
  "barExamPreparationMaterial": "<string>",
  "additionalInfo": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "data": {
    "barExamTestDate": "<string>",
    "targetScore": 123,
    "currentScore": 123,
    "studyHours": 123,
    "challengingAreas": [
      {}
    ],
    "focusAreas": [
      {}
    ],
    "additionalInfo": "<string>",
    "barExamPreparationMaterial": "<string>",
    "studyPlan": {},
    "completedAt": "<string>"
  },
  "error": "<string>",
  "details": "<any>"
}

Overview

Completes the user onboarding process by collecting study preferences and exam information. This endpoint creates a personalized study plan based on the user’s current score and initializes their profile with default progress tracking, performance insights, and study data.

Query Parameters

uuid
string
required
The unique identifier for the user

Request Body

barExamTestDate
string
required
The scheduled bar exam test date (ISO 8601 format recommended)
targetScore
number
required
Desired target score for the bar exam (typically 260-400)
studyHours
number
required
Number of hours per week the user can commit to studying
currentScore
number
required
User’s current practice test score. Used to determine study plan:
  • 360+: “amazing” plan
  • 320-359: “good” plan
  • 280-319: “decent” plan
  • 240-279: “bad” plan
  • Below 240: “terrible” plan
challengingAreas
array
required
Array of law topics the user finds challenging (e.g., [“Contracts”, “Torts”])
focusAreas
array
required
Array of specific areas the user wants to focus on
barExamPreparationMaterial
string
required
The preparation materials being used (e.g., “Barbri”, “Themis”, “Kaplan”)
additionalInfo
string
Any additional information or notes about study preferences

Request

cURL
curl -X POST "https://api.example.com/api/onboarding?uuid=user123" \
  -H "Content-Type: application/json" \
  -d '{
    "barExamTestDate": "2026-07-28",
    "targetScore": 350,
    "studyHours": 20,
    "currentScore": 290,
    "challengingAreas": ["Contracts", "Torts"],
    "focusAreas": ["Constitutional Law", "Criminal Procedure"],
    "barExamPreparationMaterial": "Barbri",
    "additionalInfo": "Looking to improve essay writing skills"
  }'

Response

success
boolean
Indicates whether the onboarding was successful
message
string
Success message confirming study plan creation
data
object
Onboarding data and generated study plan

Response Example

{
  "success": true,
  "message": "Your study plan has been created successfully",
  "data": {
    "barExamTestDate": "2026-07-28",
    "targetScore": 350,
    "currentScore": 290,
    "studyHours": 20,
    "challengingAreas": ["Contracts", "Torts"],
    "focusAreas": ["Constitutional Law", "Criminal Procedure"],
    "additionalInfo": "Looking to improve essay writing skills",
    "barExamPreparationMaterial": "Barbri",
    "studyPlan": {
      "name": "Decent Study Plan",
      "weeks": 12,
      "hoursPerWeek": 20
    },
    "completedAt": "2026-03-03T10:30:00.000Z"
  }
}

User Data Initialization

This endpoint initializes the following user profile fields:
  • onboarded: Set to true
  • updatedAt: Current timestamp
  • progress: Initialized with 0% for all law sections (constitutionalLaw, contracts, criminalLaw)
  • performanceInsights: Empty array
  • StudyStreak: Set to 1
  • PracticeQuestions: Set to 0
  • practiceHistory: Empty array
  • bookmarkedQuestions: Empty array
  • simulatedExams: Empty array
  • essays: Empty array
  • payments: Empty array
  • questionDataKey: Set based on current score (terrible/bad/decent/good/amazing)

Error Responses

error
string
Error message describing what went wrong
details
any
Additional error details (only in 500 responses)

400 Bad Request - Missing UUID

Returned when UUID is not provided in query parameters.
{
  "error": "UUID is required in query parameters"
}

400 Bad Request - Missing Fields

Returned when required fields are missing from the request body.
{
  "error": "Missing required fields"
}
Required fields are:
  • barExamTestDate
  • targetScore
  • studyHours
  • currentScore
  • challengingAreas
  • focusAreas
  • barExamPreparationMaterial

500 Internal Server Error

Returned when there’s a server-side error saving onboarding data.
{
  "error": "Failed to save onboarding data",
  "details": {}
}

Build docs developers (and LLMs) love