Student Verification API
Student Verification API
Section titled “Student Verification API”POST /api/students/verify checks whether one student ID and email address match the same record. It requires Laravel Sanctum authentication. It is not authentication for the student and must not be used as proof of identity by itself.
Request
Section titled “Request”POST /api/students/verifyAccept: application/jsonContent-Type: application/jsonAuthorization: Bearer YOUR_TOKEN
{ "student_id": "2024001", "email": "student@example.edu"}| Field | Validation |
|---|---|
student_id | Required string, maximum 50 characters |
email | Required valid email, maximum 255 characters |
Match found
Section titled “Match found”HTTP 200:
{ "message": "Student verified successfully", "data": { "exists": true, "student_id": 2024001, "email": "student@example.edu", "full_name": "Example Student", "status": "enrolled", "student_type": "college" }}The current model serializes a matched student_id as an integer. The request field remains a string; unmatched responses echo the submitted string. Clients should accept this existing distinction until a future version explicitly announces a normalized response contract.
No matching record
Section titled “No matching record”HTTP 404:
{ "message": "Student not found", "data": { "exists": false, "student_id": "2024001", "email": "student@example.edu" }}The same not-found response is used when the ID exists but belongs to a different email. Clients should not infer which submitted value was incorrect.
Other responses
Section titled “Other responses”- HTTP
401when Sanctum authentication is missing or invalid - HTTP
422with field errors when either input fails validation
Because this endpoint handles personal data, integrations should minimize retention, avoid logging submitted identifiers, use HTTPS, protect tokens, and rate-limit callers at the operator-managed edge where appropriate.