This API helps detect scams, educate users, and store user reports securely using the Scamzap platform.
/ping – Check if the API is online/users – User-related operations/scams – Reported scams and lookup/lessons – Anti-scam educational lessons/admin – Admin-only operations/ping – Returns
{ message: "API is online" }
/users – List all users/users – Create a user. { id, name, email }
/users/:id – Get user by
id
/scams – List all scams/scams – Report a scam. { ...scam fields }
/scams/categories – List all scam
categories
/scams/category/:category – List scams
by category
/scams/recent – List scams reported in
the last 7 days
/scams/user/:userId – List scams
submitted by a user
/scams/:id – Get scam by
id
/lessons – List all lessons/lessons/:id – Get lesson by
id
/lessons/:lessonId/quiz/:quizId – Get
quiz by quizId in a lesson
/users/follow – Follow a user.
{ userId, targetId }
/users/unfollow – Unfollow a user.
{ userId, targetId }
/users/followers/:userId – List
followers of a user
/users/following/:userId – List users
followed by a user
/admin/role/:id – Get role of a user
/admin/users?userId=ADMIN_ID – List
all users (admin only)
/admin/promote/:id?userId=ADMIN_ID –
Promote user to admin
/admin/demote/:id?userId=ADMIN_ID –
Demote admin to user
/admin/stats?userId=ADMIN_ID – Get
lesson and quiz stats
/admin/scams?userId=ADMIN_ID – List
all scams (admin only)
/admin/scams/:id?userId=ADMIN_ID –
Delete scam (admin only)
/admin/lessons – Create lesson/admin/lessons/:lessonId/quiz?userId=ADMIN_ID – Add quiz to
lesson
/admin/lessons/:lessonId/quiz/:quizId?userId=ADMIN_ID –
Edit quiz in lesson
userId of an admin as a query
parameter.