REST API · Sanctum Auth
PureClarity Backend API
A secure, role-based REST API powering the PureClarity platform. Access requires a Bearer token — authenticate via /api/auth/login or OAuth.
Authentication
POST
/api/auth/register
Register (email + role + location)
POST
/api/auth/login
Login → returns Bearer token
POST
/api/auth/logout
Revoke current token
GET
/api/auth/me
Authenticated user profile
POST
/api/auth/forgot-password
Send reset link
POST
/api/auth/reset-password
Reset with token
GET
/api/auth/{provider}/redirect
OAuth redirect (google / facebook / apple)
GET
/api/auth/{provider}/callback
OAuth callback → Bearer token
Example Request
# Register a new Requester curl -X POST https://pureclaritybackend.gflow.co/api/auth/register \ -H "Content-Type: application/json" \ -d '{ "name": "Jane Doe", "email": "jane@example.com", "password": "secret1234", "password_confirmation": "secret1234", "role": "REQ", "country": "IN", "city": "Mumbai" }' # Use the token on subsequent calls curl https://pureclaritybackend.gflow.co/api/auth/me \ -H "Authorization: Bearer <your_token>"
Roles & Route Guards
REQ — Requester
Homeowners / buyers. Can post scopes, receive quotes, sign contracts, leave reviews. Routes: /api/requester/*
PROV — Provider
Service providers. Can send quotes, list on marketplace, manage quote library. Routes: /api/provider/*
ADMIN
Full platform access. Manages tiers, categories, promotions, users and audit trail. Routes: /api/admin/*