v1.0 · Stable

TutorHub API

A clean REST API to search tutors, send inquiries, and manage the marketplace. JSON in, JSON out. All endpoints authenticated via bearer tokens.

Bearer authentication
RBAC enforced
POST/auth/session

Create a session for a given role.

Auth
200 OK
application/json
Request body
{ "role": "student" }
Example response
{ "token": "eyJhbGciOi…", "user": { "id": "u_9821", "role": "student" } }
cURL
curl -X POST https://api.tutorhub.ae/v1/auth/session \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "role": "student" }'
Response codes
200Success
201Created
400Bad request
401Unauthorized
403Forbidden
404Not found
429Rate limited
500Server error