Eklavvya API
Two REST APIs power the Eklavvya platform. The Core API manages candidates, exams, scheduling and results. The AI API handles face verification, automated proctoring and code grading. Both speak JSON over HTTPS.
Core API
Candidate & exam lifecycle, scheduling, results. JWT-secured.
AI API
Face verification, proctoring image analysis, code & SQL evaluation. API-key secured.
Overview
All endpoints return JSON in the shape:
{
"Data": { ... },
"Message": "Success",
"StatusCode": 200
}
Base URLs
Core API
Health probe: GET /home/TestAPI, environment probe: GET /home/TestEnv.
AI API
Health probe: GET /health returns { status, service, environment, timestamp }.
Authentication
Core API — JWT Bearer
Send a Bearer token in the Authorization header on every request. Tokens are issued by the login endpoint and carry InstituteID and Roles claims (HMAC-SHA256).
- Access token — valid for 15 minutes.
- Refresh token — valid for 120 minutes; exchange it before the access token expires.
POST /Account/Login HTTP/1.1
Host: api-v2.eklavvya.com
Content-Type: application/json
{ "UserName": "you@org.com", "Password": "•••" }
Use the returned token on subsequent calls:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
AI API — X-Api-Key
Every request must include your 32-char hex API key:
X-Api-Key: 0a1b2c3d4e5f60718293a4b5c6d7e8f9
Content-Type: application/json
AdminOnly policy). Request keys from your account manager.
Candidates
Example — Create candidate
{
"FirstName": "Rajesh",
"MiddleName": "Kumar",
"LastName": "Singh",
"RollNo": "EMP001",
"EmailID": "rajesh.singh@company.com",
"MobileNo": "9876543210",
"BatchID": "12345",
"BatchName": "Q1-2026-Cohort"
}
Exams & Schedules
Example — Create exam
{
"ExamName": "Quarterly Assessment Q1",
"ExamDescription": "Full-length mock exam",
"TotalMarks": 100,
"PassingPercentage": 40,
"DurationInMinutes": 180,
"IsProctoringEnabled": true,
"IsNegativeMarkingApplied": true,
"NegativeMarkPercentage": 0.25
}
Example — Schedule an exam
{
"ExamID": 456,
"ExamName": "Quarterly Assessment Q1",
"ScheduleDateTime": "2026-06-15 10:00:00",
"ExpireDateTime": "2026-06-15 13:30:00",
"TimeZone": "Asia/Kolkata",
"MaxAttempts": 1,
"ShowResultsAfterExam": true
}
Results
AI Proctoring & Face Verification
The AI API analyses base64-encoded images for face presence, identity match and suspicious behaviour. Use it inline during an exam, or batch-process captured frames after.
Example — Face comparison
{
"referenceImage": "iVBORw0KGgoAAAANS...",
"candidateImage": "iVBORw0KGgoAAAANS...",
"promptName": "comparephotowithfaceprompt"
}
Code & SQL Evaluation
Run candidate submissions through an LLM-graded pipeline that scores syntax, logic and best practice — and surfaces structured feedback.
Example — Submit code
{
"Question": "Write a function to find the longest palindrome",
"Description": "Optimised O(n) solution required",
"Language": "Python",
"UserCode": "def longest_palindrome(s):\n ...",
"TestCases": ["'aba'", "'racecar'", "'ac'"],
"PromptName": "AICodingSQLAssessment"
}
Errors & Rate Limits
- 401 Unauthorized — missing / expired token (Core) or wrong
X-Api-Key(AI). Refresh and retry. - 403 Forbidden — your role / key tier doesn't allow this operation.
- 422 Unprocessable Entity — schema validation failed. Check the
Messagefield for which property is wrong. - 5xx — server-side. Retry with exponential backoff (250 ms → 500 ms → 1 s → 2 s).
/Result/CompleteExamResult after candidates submit. Webhook support is on the roadmap.
Explore live with Swagger
Both APIs publish OpenAPI specs behind a login gate:
- Core —
https://api-v2.eklavvya.com/swagger - AI —
https://ai-api.eklavvya.com/swagger
Request access via WhatsApp or email help@eklavvya.com.