This page describes the available API endpoints, request formats, and response samples.
Content-Type: application/json
This endpoint sends a reminder push notification to all users who have saved or are attending a specific event. The event ID is required and is used to fetch event details and identify all users linked to the event. Notifications are sent using Expo push notifications.
A custom reminder message can optionally be provided. If not provided, a default reminder message will be sent based on the event title.
{
"event_id": 12,
"message": "Reminder: The event starts in 1 hour at the main hall."
}
{
"success": true,
"message": "Reminder notifications sent successfully",
"sent_to": 25
}
{
"success": false,
"message": "Missing required field: event_id"
}
{
"success": false,
"message": "Event not found"
}
Content-Type: application/json
This endpoint retrieves detailed information about all users attending (or who have saved) a specific event. The event ID is provided in the request body. The system fetches all matching emails from the mysaved_event table and joins them with the ncnmo_table to return full user profiles.
This is useful for displaying attendee lists, managing event participants, or sending targeted notifications.
{
"event_id": 12
}
{
"status": "success",
"event_id": 12,
"count": 2,
"data": [
{
"id": 1,
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"city": "Benin",
"state": "Edo",
"profession": "Developer",
"bio": "Software engineer",
"birthMonth": "June",
"birthYear": 1998,
"chapter": "Edo",
"mentorship": "Yes",
"mentorAreas": "Tech",
"verify_status": "verified",
"business_link": "",
"created_at": "2024-01-10 12:00:00",
"profile_picture": "profile.jpg",
"email_verified": "YES"
}
]
}
{
"status": "error",
"message": "Missing required field: event_id"
}
Content-Type: application/json
This endpoint retrieves all available event tags used for categorizing events. Tags are returned in alphabetical order and can be used to populate category dropdowns during event creation or editing.
GET /get_event_tags.php
{
"status": "success",
"data": [
{
"id": 1,
"name": "lecture"
},
{
"id": 2,
"name": "workshop"
},
{
"id": 3,
"name": "conference"
}
]
}
{
"status": "error",
"message": "No event tags found."
}
Content-Type: application/json
{
"email": "user@example.com"
}
{
"status": "success",
"message": "Your verification is under processing"
}
{
"status": "error",
"message": "Email is required"
}
{
"status": "error",
"message": "Failed to update verification status"
}
This push notification is sent via Expo Push Notifications when a response is posted to a community question. The notification is delivered to the user who originally asked the question.
Notifications are only sent if the user has a valid Expo push token registered in the system.
Answeredπ Your Question Has Been Answered
A response has been posted to your question. Tap to view it.
The following data object is included in the push notification payload and can be used by the mobile application for deep linking or navigation.
{
"question_id": 45,
"type": "community_answer"
}
When type = "community_answer", the mobile app should:
question_idContent-Type: application/json
Allows a mentor to submit an answer to a user's question. Once the answer is saved, the user who asked the question will receive a push notification if they have Expo tokens registered.
{
"questionId": 42,
"response": "Here is your answer with guidance...",
"mentorName": "John Doe",
"mentorEmail": "john@example.com"
}
{
"success": true,
"message": "Answer submitted successfully",
"notified_devices": 2
}
notified_devices indicates how many Expo tokens received the push notification.
{
"success": false,
"message": "Missing required field: response"
}
{
"success": false,
"message": "Question not found"
}
{
"success": false,
"message": "Failed to save response",
"error": "Detailed database error"
}
{
"success": false,
"message": "Only POST method is allowed"
}
When the answer is submitted, the questioner receives a push notification via Expo:
{
"question_id": 42,
"type": "mentorship_answer"
}
Content-Type: application/json
Allows a user to report a question. The endpoint records the reporter's email, the question ID, and information about the question poster. Duplicate reports by the same reporter for the same question are not allowed.
{
"reporterEmail": "reporter@example.com",
"questionId": 123
}
reporterEmail (required) β Email of the user reporting the questionquestionId (required) β ID of the question being reportedsuccess β true if the report was successful, false otherwisemessage β Details about the result or error{
"success": true,
"message": "Question reported successfully"
}
{
"success": false,
"message": "You have already reported this question"
}
{
"success": false,
"message": "reporterEmail or questionId not provided in JSON body"
}
{
"success": false,
"message": "Question not found"
}
Content-Type: application/json
Allows a user to report a mentorship question. The endpoint records the reporter's email, the mentorship question ID, and information about the question poster. Duplicate reports by the same reporter for the same question are not allowed.
{
"reporterEmail": "reporter@example.com",
"questionId": 123
}
reporterEmail (required) β Email of the user reporting the mentorship questionquestionId (required) β ID of the mentorship question being reportedsuccess β true if the report was successful, false otherwisemessage β Details about the result or error{
"success": true,
"message": "Mentorship question reported successfully"
}
{
"success": false,
"message": "You have already reported this mentorship question"
}
{
"success": false,
"message": "reporterEmail or questionId not provided in JSON body"
}
{
"success": false,
"message": "Mentorship question not found"
}
Content-Type: application/json
Checks whether a user (blocker_email) has blocked another user
(blocked_email).
This endpoint verifies a one-directional block relationship.
{
"blocker_email": "john@example.com",
"blocked_email": "jane@example.com"
}
blocker_email (required) β Email of the user who may have blocked another userblocked_email (required) β Email of the user being checkedisBlocked β YES if blocked, NO if not blocked{
"success": true,
"blocker_email": "john@example.com",
"blocked_email": "jane@example.com",
"isBlocked": "YES"
}
{
"success": true,
"blocker_email": "john@example.com",
"blocked_email": "mark@example.com",
"isBlocked": "NO"
}
{
"success": false,
"message": "blocker_email and blocked_email are required"
}
Content-Type: application/json
Allows a user to block another user. Once blocked:
{
"blocker_email": "john@example.com",
"blocked_email": "jane@example.com"
}
blocker_email (required) β Email of the user performing the blockblocked_email (required) β Email of the user being blocked{
"success": true,
"message": "User blocked successfully"
}
{
"success": false,
"message": "blocker_email and blocked_email are required"
}
{
"success": false,
"message": "You cannot block yourself"
}
Content-Type: application/json
Allows a user to unblock a previously blocked user. Once unblocked:
{
"blocker_email": "john@example.com",
"blocked_email": "jane@example.com"
}
blocker_email (required) β Email of the user performing the unblockblocked_email (required) β Email of the user being unblocked{
"success": true,
"message": "User unblocked successfully"
}
{
"success": false,
"message": "blocker_email and blocked_email are required"
}
Content-Type: application/json
Allows a user to report an event by its event_id.
The API uses the event_id to look up the original poster (posted_by)
and their email in the event_table.
A report is created with the reporter's name and email, the reported user's name and email,
the event ID, and a default status of pending.
{
"reporter_name": "Jane Doe",
"reporter_email": "jane@example.com",
"event_id": 123
}
{
"status": "received",
"report_id": "550e8400-e29b-41d4-a716-446655440000"
}
Missing Required Fields:
{
"error": "Missing required fields"
}
Event Not Found:
{
"error": "Event not found"
}
Database Error:
{
"error": "Failed to create event report"
}
Content-Type: application/json
Allows an authenticated or identified user to report another user for misconduct.
The API stores the reporter's and reported user's names and emails along with the reason for reporting.
Each report is assigned a unique report_id and a default status of pending.
{
"reporter": {
"name": "Jane Doe",
"email": "jane@example.com"
},
"reported_user": {
"name": "John Smith",
"email": "john@example.com"
},
"reason": "Harassment"
}
{
"status": "received",
"report_id": "550e8400-e29b-41d4-a716-446655440000"
}
Missing Required Fields:
{
"error": "Missing required fields"
}
Self-Reporting Attempt:
{
"error": "You cannot report yourself"
}
Database Error:
{
"error": "Failed to create report"
}
Content-Type: application/json
Checks the user's verify_status from ncnmo_table using the provided email.
The API returns the exact verification status stored in the database
(for example: unverified, pending, verified, rejected).
{
"email": "user@example.com"
}
{
"status": "unverified",
"message": "Account status fetched successfully."
}
{
"status": "pending",
"message": "Account status fetched successfully."
}
{
"status": "verified",
"message": "Account status fetched successfully."
}
Missing Email:
{
"status": "error",
"message": "Missing email in JSON body"
}
Email Not Found:
{
"status": "error",
"message": "Email not found."
}
Database Error:
{
"status": "error",
"message": "Database query failed",
"details": "SQL error message here"
}
Content-Type: application/json
Retrieves all records from the sub_category table.
The endpoint returns full details including ID, name, image, category info, location, icon, and more.
idsub_namesub_detailslocationsub_imagecat_idcat_nameiconconventionlearn_more{
"status": "success",
"total": 3,
"data": [
{
"id": "1",
"sub_name": "Programming",
"sub_details": "Learn coding and more",
"location": "Online",
"sub_image": "programming.jpg",
"cat_id": "10",
"cat_name": "Education",
"icon": "code-icon.png",
"convention": "2025-02-01",
"learn_more": "https://example.com/programming"
}
]
}
{
"status": "error",
"message": "Database query failed",
"details": "SQL error message here"
}
Content-Type: application/json
Retrieves the verify_status of a user from ncnmo_table using the user's email address.
The email must be supplied in the JSON body.
{
"email": "user@example.com"
}
{
"verify_status": "verified"
}
Missing Email:
{
"error": "Email not provided"
}
Email Not Found:
{
"error": "Email not found"
}
Database Error:
{
"error": "Database query failed",
"details": "SQL error message here"
}
Content-Type: application/json
Deletes a user account from ncnmo_table using the user's email address.
Also removes any associated mentor profile from the mentors table.
Email must be supplied in the JSON body.
{
"userEmail": "user@example.com"
}
{
"status": "success",
"message": "User account deleted successfully"
}
Missing Email:
{
"status": "error",
"message": "Missing userEmail in request body"
}
Invalid Email Format:
{
"status": "error",
"message": "Invalid email format"
}
User Not Found:
{
"status": "error",
"message": "No user found with this email"
}
Database Failure:
{
"status": "error",
"message": "Database query failed",
"error": "SQL error message here"
}
Content-Type: application/json
Fetches a single event from event_table using a unique event
slug. Optionally checks whether a user is attending the
event when userEmail is provided.
{
"slug": "national-conference-2025",
"userEmail": "user@example.com"
}
Note: userEmail is optional.
If not provided, the API will return "attending": "No".
{
"status": "success",
"event": {
"id": "14",
"title": "National Conference 2025",
"slug": "national-conference-2025",
"date_start": "2025-12-15",
"event_datetime_utc": "2025-12-15 14:30:00",
"event_date": "2025-12-15",
"event_time": "14:30",
"location": "Texas",
"cat_id": "3",
"cat_name": "Convention",
"subcategory_id": "12",
"subcategory_name": "Annual",
"details": "Event details info...",
"image": "event14.jpg",
"posted_by": "Admin",
"email": "admin@ncnmo.com",
"date": "2025-01-15",
"status": "active",
"interest": "0",
"info": "upcoming",
"gender": "Both",
"chapter": "National",
"event_group": "",
"event_tag": "NCNMO",
"year": "2025",
"off": "0",
"attending": "Yes",
"image_type": "png"
}
}
Missing Slug:
{
"status": "error",
"message": "Missing slug in JSON input"
}
Event Not Found:
{
"status": "error",
"message": "Event not found for slug: national-conference-2025"
}
Database Failure:
{
"status": "error",
"message": "Database query failed",
"error": "SQL error message here"
}
Content-Type: application/json
Updates the user's profile picture.
The image must be sent as a Base64 encoded string because mobile apps (React Native) cannot upload files using $_FILES.
{
"userEmail": "example@gmail.com",
"profile_picture": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
{
"status": "success",
"message": "Profile picture updated successfully.",
"profile_picture_url": "https://yourdomain.com/uploads/profile_67392abc17.png"
}
{
"status": "error",
"message": "Missing userEmail or profile_picture."
}
{
"status": "error",
"message": "Invalid base64 image data."
}
{
"status": "error",
"message": "Failed to save profile picture."
}
Content-Type: application/json
Allows a user to securely update their account password. The API verifies the user's current password before applying the change.
{
"userEmail": "user@example.com",
"current_password": "oldpassword123",
"new_password": "newstrongpassword456",
"confirm_password": "newstrongpassword456"
}
{
"status": "success",
"message": "Password updated successfully."
}
Missing Fields:
{
"status": "error",
"message": "All fields are required."
}
Incorrect Current Password:
{
"status": "error",
"message": "Current password is incorrect."
}
Password Mismatch:
{
"status": "error",
"message": "New password and confirmation do not match."
}
User Not Found:
{
"status": "error",
"message": "User not found."
}
Content-Type: application/json
Fetches all messages for a specific event. Messages are returned in chronological order along with the user's name, email, avatar (first two letters of the name), and formatted creation time.
{
"event_id": 123
}
{
"status": "success",
"data": [
{
"id": 1,
"user_name": "John Doe",
"email": "john@example.com",
"message": "Looking forward to this event!",
"created_at": "Tuesday, December 10, 2025 2:30 PM",
"avatar": "JO"
},
{
"id": 2,
"user_name": "Jane Smith",
"email": "jane@example.com",
"message": "Excited to join!",
"created_at": "Tuesday, December 10, 2025 2:45 PM",
"avatar": "JA"
}
]
}
{
"status": "error",
"message": "No messages found for this event."
}
{
"status": "error",
"message": "Missing event_id in request."
}
Content-Type: application/json
Adds a new message to an event thread. All fields are required. The API returns the message details, creation time, and a user avatar generated from the first two letters of the user name.
{
"event_id": 123,
"user_name": "John Doe",
"email": "john@example.com",
"message": "Looking forward to this event!"
}
{
"success": true,
"user_name": "John Doe",
"message": "Looking forward to this event!",
"created_at": "Tuesday, December 10, 2025 2:30 PM",
"avatar": "JO"
}
{
"success": false,
"error": "Missing fields"
}
{
"success": false,
"error": "Database insert failed"
}
Content-Type: application/json
Marks the user as attending or unattending an event. The user email and event slug must be provided in the request body. The "action" parameter determines whether to attend or unattend ("attend" or "unattend").
{
"slug": "event-123",
"userEmail": "user@example.com",
"action": "attend"
}
{
"status": "attended"
}
{
"status": "exists"
}
{
"status": "unattended"
}
{
"status": "error",
"message": "Event not found"
}
Content-Type: application/json
Deletes a specific event **only if it belongs to the user making the request**. The event ID and the user's email must be provided in the JSON request body. Users who saved the event will be notified via email of its cancellation.
{
"id": 123,
"userEmail": "user@example.com"
}
{
"status": "success",
"message": "Event deleted and all affected users notified."
}
{
"status": "partial_success",
"message": "Event deleted, but some emails failed.",
"errors": [
"Failed to send to user1@example.com: SMTP Error",
"Failed to send to user2@example.com: SMTP Error"
]
}
{
"status": "error",
"message": "Invalid request: missing event ID or userEmail."
}
{
"status": "error",
"message": "Event not found or you do not have permission to delete it."
}
Content-Type: application/json
Fetches a list of all chapters sorted alphabetically by name.
{
"status": "success",
"data": [
{
"id": "1",
"name": "Introduction"
},
{
"id": "2",
"name": "Getting Started"
}
]
}
{
"status": "error",
"message": "No chapters found."
}
Content-Type: application/json
{
"firstName": "Opeyemi",
"lastName": "Wasiu",
"email": "ope@example.com",
"password": "123456",
"confirmPassword": "123456",
"city": "Lagos",
"state": "Lagos",
"profession": "Developer",
"bio": "Software developer",
"birthMonth": "June",
"birthYear": "1995",
"chapter": "West",
"mentorship": "Yes",
"mentorAreas": ["Web Development", "Career Growth"]
}
{
"success": true,
"message": "Registration successful. Please check your email for verification code."
}
Content-Type: application/json
{
"email": "ope@example.com",
"otp": "123456"
}
{
"success": true,
"message": "Email verified successfully."
}
{
"success": false,
"message": "Invalid OTP."
}
{
"success": true,
"message": "Email already verified."
}
Content-Type: application/json
{
"email": "ope@example.com"
}
{
"success": true,
"message": "New verification code sent to your email."
}
{
"success": true,
"message": "Email already verified."
}
Content-Type: application/json
Authenticates a user and returns a JWT token. Optionally accepts an Expo Push Token to enable push notifications on the userβs device.
{
"email": "ope@example.com",
"password": "123456",
"expo_token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]"
}
Note: The expo_token is optional. Login will succeed even if it is not provided.
{
"success": true,
"message": "Login successful.",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI...",
"user": {
"id": 12,
"name": "Opeyemi Wasiu",
"email": "ope@example.com"
}
}
{
"success": false,
"message": "Email not verified. Please verify your email.",
"email": "ope@example.com"
}
{
"success": false,
"message": "Invalid password."
}
{
"success": false,
"message": "Email not found."
}
Logs out the authenticated user by removing the current deviceβs Expo Push Notification token. This prevents further push notifications from being sent to that device.
Headers:
POST /logout.php
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI...
Content-Type: application/json
{
"expo_token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]"
}
{
"success": true,
"message": "Logout successful. Device token removed."
}
{
"success": true,
"message": "Logout successful. Token already removed."
}
{
"success": false,
"message": "Invalid or expired token."
}
{
"success": false,
"message": "expo_token is required for logout."
}
{
"success": true,
"event": {
"id": 5,
"name": "Tech Expo",
"details": "Annual technology conference",
"location": "New York",
"date": "2025-01-20",
"timeUntil": "in 3 weeks",
"sub_image": "expo.jpg",
"learn_more": "https://example.com/expo"
}
}
{
"success": false,
"message": "No upcoming event found.",
"event": {
"id": 0,
"name": "No Upcoming Event",
"details": "Stay tuned for the next big conference!",
"location": "β",
"timeUntil": ""
}
}
{
"success": true,
"categories": [
{
"id": 1,
"name": "Music",
"slug": "music",
"details": "All musical events and concerts."
},
{
"id": 2,
"name": "Technology",
"slug": "technology",
"details": "Tech meetups and conferences."
}
]
}
{
"success": false,
"message": "No categories found.",
"categories": []
}
Content-Type: application/json
{
"email": "john@example.com",
"bio": "Software developer and mentor",
"profession": "Developer",
"business_link": "https://mybusiness.com",
"chapter": "West",
"provideMentorship": "Yes",
"topics": [
"careerDevelopment",
"entrepreneurship"
]
}
{
"status": "success",
"message": "Profile updated successfully!",
"data": {
"bio": "Software developer and mentor",
"profession": "Developer",
"business_link": "https://mybusiness.com",
"chapter": "West",
"mentorship": "Yes",
"mentorAreas": "careerDevelopment,entrepreneurship"
}
}
{
"status": "error",
"message": "User not found"
}
{
"status": "error",
"message": "Invalid JSON input"
}
Content-Type: application/json
{
"email": "john@example.com"
}
{
"status": "success",
"message": "Profile retrieved successfully",
"data": {
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"city": "Charlotte",
"state": "NC",
"profession": "Engineer",
"bio": "Experienced mechanical engineer",
"chapter": "West",
"business_link": "https://johndoe.com",
"mentorship": "Yes",
"mentorAreas": "Leadership,Career Development",
"profile_picture": "uploads/profile_12abcd.png"
}
}
{
"status": "error",
"message": "User not found"
}
{
"status": "error",
"message": "Invalid JSON input"
}
email field.uploads/ directory.Content-Type: application/x-www-form-urlencoded
current_password: "oldpassword123"
new_password: "newpassword456"
confirm_password: "newpassword456"
{
"status": "success",
"message": "Password updated successfully!"
}
{
"status": "error",
"message": "Current password is incorrect."
}
{
"status": "error",
"message": "New password and confirmation do not match."
}
{
"status": "error",
"message": "Please fill in all fields."
}
Content-Type: application/json
{
"email": "user@example.com"
}
{
"success": true,
"message": "Password reset link has been sent to your email."
}
{
"success": false,
"message": "Email address not registered."
}
Content-Type: application/json
{
"token": "abc123xyz456token",
"new_password": "NewStrongPassword123!",
"confirm_password": "NewStrongPassword123!"
}
{
"success": true,
"message": "Password has been reset successfully!"
}
{
"success": false,
"message": "Invalid or expired token."
}
{
"success": false,
"message": "Passwords do not match."
}
Content-Type: application/json
{
"userEmail": "janedoe@example.com"
}
{
"status": "success",
"count": 2,
"events": [
{
"id": "15",
"title": "Leadership Seminar",
"slug": "leadership-seminar",
"event_datetime_utc": "2025-12-15 14:30:00",
"event_date": "2025-12-15",
"event_time": "14:30",
"location": "Abuja",
"cat_id": "3",
"cat_name": "Seminar",
"subcategory_id": "5",
"subcategory_name": "Leadership",
"details": "A high-level leadership training event.",
"image": "leadership.jpg",
"image_type": "banner",
"posted_by": "Admin",
"email": "admin@drp.org",
"date": "2025-01-05",
"status": "active",
"interest": "General",
"info": "",
"gender": "All",
"chapter": "HQ",
"event_group": "",
"event_tag": "training",
"year": "2025",
"off": "0",
"isAttending": "yes"
},
{
"id": "12",
"title": "Tech Meetup",
"slug": "tech-meetup",
"date_start": "2025-02-20",
"date_end": "2025-02-20",
"event_datetime_utc": "2026-02-12 18:30:00",
"location": "Lagos",
"cat_id": "2",
"cat_name": "Meetup",
"subcategory_id": "4",
"subcategory_name": "Technology",
"details": "A gathering of tech enthusiasts.",
"image": "meetup.png",
"posted_by": "Tech Dept",
"email": "tech@drp.org",
"date": "2025-01-20",
"status": "active",
"interest": "",
"info": "",
"gender": "All",
"chapter": "Lagos",
"event_group": "",
"event_tag": "tech",
"year": "2025",
"off": "0",
"isAttending": "no"
}
]
}
{
"status": "error",
"message": "Missing userEmail in JSON input"
}
{
"status": "error",
"message": "Database query failed",
"error": "SQL error details"
}
Content-Type: application/json
Creates a new event. The API accepts the event date, time, and timezone as provided by the user and automatically converts the event time to UTC for internal storage.
{
"title": "React Native Workshop",
"description": "Learn React Native with practical examples.",
"event_tag": "workshop",
"onlineType": "in-person",
"location": "Lagos, Nigeria",
"subcategory_id": "2",
"category_id": "1",
"event_date": "2025-12-15",
"event_time": "14:30",
"event_timezone": "Africa/Lagos",
"posted_by": "John Doe",
"email": "john@example.com",
"targetGroup": ["Students", "Professionals"],
"image_type": "jpg"
}
Africa/Lagos, America/New_York, Europe/London)
event_date + event_time +
event_timezone into a UTC timestamp internally.
{
"success": true,
"message": "Event created successfully!",
"event_slug": "react-native-workshop-4821"
}
{
"success": false,
"message": "Missing required fields."
}
{
"success": false,
"message": "Invalid timezone."
}
{
"success": false,
"message": "Database error"
}
Content-Type: application/json
This endpoint retrieves a list of all scholars from the database. It returns the id and name of users whose role is set to scholar.
{
"success": true,
"data": [
{
"id": "1",
"name": "John Doe"
},
{
"id": "2",
"name": "Sarah Williams"
}
]
}
{
"success": false,
"message": "Database connection failed."
}
{
"success": false,
"message": "No scholars found."
}
Content-Type: application/json
Updates an existing event. The requesting user must own the event
(userEmail must match the event owner).
The API accepts the eventβs local date, time, and timezone, then converts
them internally to a UTC timestamp (event_datetime_utc)
for storage.
If the event is updated successfully, users who have saved the event will automatically receive a push notification via Expo.
{
"id": 12,
"title": "Updated React Workshop",
"details": "Updated details about the workshop.",
"event_tag": "workshop",
"date_start": "2025-12-15",
"event_time": "14:30",
"event_timezone": "Africa/Lagos",
"location": "Lagos, Nigeria",
"targetGroup": ["Group2", "Group3"],
"userEmail": "john@example.com",
}
Africa/Lagos, America/New_York)
When an event is updated, users who have saved the event will receive a push notification via Expo.
π
Event Updated
{EVENT_TITLE} has been updated. Tap to view details.
{
"event_id": 12,
"event_slug": "react-native-workshop-4821",
"type": "event_update"
}
{
"success": true,
"message": "Event updated successfully!",
"event_slug": "react-native-workshop-4821",
"event_date": "2025-12-15",
"event_time": "14:30"
}
{
"success": false,
"message": "Missing required field: title"
}
{
"success": false,
"message": "Invalid timezone."
}
{
"success": false,
"message": "You do not have permission to edit this event."
}
{
"success": false,
"message": "Event not found."
}
{
"success": false,
"message": "Failed to update event."
}
Content-Type: application/json
This endpoint allows users to send a question to a scholar. Questions may be public or private and can include optional tags.
{
"scholar_id": "12",
"question": "What is the best way to prepare for postgraduate research?",
"privacy": "yes",
"tags": ["research", "education"],
"userName": "Michael Adams",
"userEmail": "michael@example.com"
}
{
"success": true,
"message": "Your public question has been submitted!",
"question_id": 1023
}
{
"success": false,
"message": "scholar_id, question, privacy, userName, and userEmail are required."
}
{
"success": false,
"message": "Scholar not found."
}
{
"success": false,
"message": "Database error: Duplicate entry or server issue."
}
Content-Type: application/json
This endpoint retrieves all questions from the ask_scholar table where privacy = "no". These are questions submitted privately to scholars.
{
"success": true,
"count": 2,
"data": [
{
"id": "45",
"scholar_id": "12",
"scholarName": "Dr. Ibrahim Musa",
"question": "How do I apply for graduate funding?",
"tags": "education,funding",
"privacy": "no",
"userName": "Sarah Doe",
"userEmail": "sarah@example.com",
"status": "Not Answered"
},
{
"id": "44",
"scholar_id": "7",
"scholarName": "Prof. Ali Kareem",
"question": "What documents are required for MSc admission?",
"tags": "",
"privacy": "no",
"userName": "John Sam",
"userEmail": "john@example.com",
"status": "Answered"
}
]
}
{
"success": false,
"message": "No private questions found."
}
{
"success": false,
"message": "Database error: Unable to fetch private questions."
}
Content-Type: application/json
This endpoint retrieves all questions from the ask_scholar table where privacy = "yes". These are questions visible to the public. Additionally, it checks whether the user (identified by userEmail) has liked each question and includes a like field with "yes" or "no".
{
"userEmail": "test@example.com"
}
{
"success": true,
"count": 2,
"data": [
{
"id": "51",
"scholar_id": "12",
"scholarName": "Dr. Ibrahim Musa",
"question": "How can I prepare for a scholarship interview?",
"tags": "interview,scholarship",
"privacy": "yes",
"userName": "Amina Yusuf",
"userEmail": "amina@example.com",
"status": "Not Answered",
"totalLikes": 5,
"like": "yes"
},
{
"id": "50",
"scholar_id": "7",
"scholarName": "Prof. Ali Kareem",
"question": "What are the best study techniques for postgraduate exams?",
"tags": "",
"privacy": "yes",
"userName": "Lukman Bello",
"userEmail": "lukman@example.com",
"status": "Answered",
"totalLikes": 3,
"like": "no"
}
]
}
{
"success": false,
"message": "userEmail not provided in JSON body"
}
{
"success": false,
"message": "No public questions found."
}
{
"success": false,
"message": "Database error: Unable to fetch public questions."
}
Content-Type: application/json
This endpoint retrieves all mentorship questions submitted by users. Each question includes user details, question content, tags, mentor category, status, and timestamp.
{
"success": true,
"count": 2,
"data": [
{
"id": "15",
"userName": "Aisha Bello",
"userEmail": "aisha@example.com",
"question": "How do I choose the right research area?",
"tags": "research,career",
"mentorCategory": "Academic",
"status": "unanswered",
"created_at": "2025-02-01 12:45:22"
},
{
"id": "14",
"userName": "David Michael",
"userEmail": "david@example.com",
"question": "What certifications should I get for IT career growth?",
"tags": "IT,career",
"mentorCategory": "Technology",
"status": "answered",
"created_at": "2025-02-01 11:30:10"
}
]
}
{
"success": false,
"message": "No mentorship questions found."
}
{
"success": false,
"message": "Database error: Unable to fetch mentorship questions."
}
Content-Type: application/json
This endpoint allows users to submit mentorship questions.
Users can include tags and select a mentor category.
The question is stored in the mentorship_question table.
{
"userName": "John Doe",
"userEmail": "john@example.com",
"question": "How do I start a career in data science?",
"mentorCategory": "Technology",
"tags": ["career", "datascience"]
}
{
"success": true,
"message": "Your question has been submitted successfully!",
"question_id": 105
}
{
"success": false,
"message": "userName, userEmail, question, and mentorCategory are required."
}
{
"success": false,
"message": "Database error: Duplicate entry or server issue."
}
Content-Type: application/json
This endpoint retrieves a mentorship question and all corresponding responses from mentors. Returns question details, all answers, timestamps, and time-ago values.
{
"success": true,
"question": {
"id": "10",
"userName": "Amina Musa",
"userEmail": "amina@example.com",
"question": "How do I begin a career in cybersecurity?",
"tags": "security,career",
"mentorCategory": "Technology",
"status": "unanswered",
"created_at": "2025-01-25 11:20:45"
},
"responses": [
{
"id": "34",
"question_id": "10",
"mentorName": "Dr. Ahmed Yusuf",
"mentorEmail": "ahmed@example.com",
"response": "Start with basic networking and security certifications.",
"created_at": "2025-01-25 12:00:00",
"time_ago": "40 minutes ago"
}
],
"responseCount": 1
}
{
"success": false,
"message": "Invalid or missing questionId."
}
{
"success": false,
"message": "Question not found."
}
Content-Type: application/json
This endpoint retrieves all verified mentors. You can optionally filter mentors by their area of expertise using the mentorArea query parameter.
academicSuccess
careerDevelopment
Immigration
Entrepreneurship
financialPlanning
healthandWellness
{
"success": true,
"count": 2,
"data": [
{
"id": "3",
"name": "Dr. Mary Johnson",
"email": "mary@example.com",
"mentorAreas": ["careerDevelopment", "academicSuccess"],
"bio": "Career coach with 10 years of experience...",
"verify_status": "Yes"
},
{
"id": "1",
"name": "Ahmed Musa",
"email": "ahmed@example.com",
"mentorAreas": ["careerDevelopment"],
"bio": "Professional mentor in the tech industry.",
"verify_status": "Yes"
}
]
}
{
"success": false,
"message": "No mentors found."
}
{
"success": false,
"message": "Database error: Unable to fetch mentors."
}
Content-Type: application/json
This endpoint allows a user to schedule a mentorship session with a selected mentor. It saves the session request in the mentorship_sessions table.
{
"mentorName": "Dr. Ahmed Yusuf",
"mentorEmail": "ahmed@example.com",
"userName": "Amina Musa",
"userEmail": "amina@example.com",
"questionDescription": "I want guidance on career in data science.",
"selectedDate": "2025-12-05",
"selectedTime": "15:00"
}
{
"status": "success",
"message": "β
Session scheduled successfully!",
"session_id": 78
}
{
"status": "error",
"message": "Missing required field: mentorEmail"
}
{
"status": "error",
"message": "Database error: Duplicate entry or server issue."
}
Content-Type: application/json
This endpoint allows a user to propose a new mentor. Users must provide mentor details, their expertise, and a short reason why the person would be a good mentor.
{
"mentorName": "Dr. Mary Johnson",
"mentorEmail": "mary@example.com",
"expertise": "Career Development",
"whyGoodMentor": "She has 15 years of experience mentoring students in tech careers.",
"yourName": "Amina Musa",
"yourEmail": "amina@example.com"
}
{
"status": "success",
"message": "β
Mentor request submitted successfully!",
"request_id": 101
}
{
"status": "error",
"message": "Missing required field: mentorEmail"
}
{
"status": "error",
"message": "Database error: Duplicate entry or server issue."
}
Content-Type: application/json
Retrieve a paginated list of all verified users.
Blocked users are not excluded; instead, each user object includes
an isBlocked flag indicating the block relationship relative to the requester.
isBlocked = YES β The requester has blocked this user or this user has blocked the requesterisBlocked = NO β No block relationship existspage (optional) β Page number (default: 1)search (optional) β Search by first name, last name, or professionprofession (optional) β Filter users by profession{
"requester_email": "john@example.com"
}
{
"success": true,
"page": 1,
"per_page": 100,
"total_users": 25,
"total_pages": 1,
"users": [
{
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"city": "Lagos",
"state": "Lagos",
"profession": "Engineer",
"bio": "Experienced engineer...",
"chapter": "Lagos",
"business_link": "https://johndoe.com",
"profile_picture": "https://drp-ncnmo.org/uploads/john.jpg",
"isBlocked": "NO"
},
{
"firstName": "Jane",
"lastName": "Smith",
"email": "jane@example.com",
"city": "Abuja",
"state": "FCT",
"profession": "Doctor",
"bio": "Medical doctor with 5 years...",
"chapter": "Abuja",
"business_link": null,
"profile_picture": null,
"isBlocked": "YES"
}
]
}
{
"success": false,
"message": "Invalid request or unable to fetch users."
}
Content-Type: application/json
{
"questionId": 12,
"userEmail": "test@example.com"
}
{
"status": "success",
"liked": true,
"totalLikes": 5
}
{
"status": "success",
"liked": false,
"totalLikes": 4
}
{
"status": "error",
"message": "Missing questionId or userEmail in JSON body"
}
Content-Type: application/json
{
"id": "123"
}
{
"status": "success",
"data": {
"id": "123",
"question": "What is PHP?",
"scholarName": "Dr. Smith",
"tags": "php,backend",
"userName": "John Doe",
"created_on": "Thursday, March 23, 2025",
"response": "PHP is a server-side scripting language..."
}
}
{
"status": "error",
"message": "ID not provided"
}
{
"status": "error",
"message": "No details found"
}
Content-Type: application/json
{
"title": "Annual Test Event",
"description": "This is a test event description.",
"event_tag": "NCNMO",
"onlineType": "online",
"location": "",
"subcategory_id": "5",
"event_date": "2025-03-21",
"targetGroup": ["Youth", "Executives"],
"posted_by": "John Doe",
"email": "john.doe@example.com"
}
{
"success": true,
"message": "Event created successfully!",
"event_slug": "annual-test-event-4821"
}
{
"success": false,
"message": "Missing required fields."
}
{
"success": false,
"message": "Insert failed",
"error": "SQL error details here"
}
Content-Type: application/json
{
"title": "Chapter Annual Meeting",
"description": "Details about the chapter annual meeting.",
"event_tag": "ChapterEvent",
"onlineType": "in-person",
"state": "California",
"city": "Los Angeles",
"street": "123 Main St",
"category_id": "2",
"event_date": "2025-06-15",
"chapter": "LA Chapter",
"targetGroup": ["Members", "Volunteers"],
"posted_by": "Jane Doe",
"email": "jane.doe@example.com"
}
{
"success": true,
"message": "Chapter event created successfully!",
"event_slug": "chapter-annual-meeting-4821"
}
{
"success": false,
"message": "Missing required fields."
}
{
"success": false,
"message": "Insert failed",
"error": "SQL error details here"
}
Content-Type: application/json
{
"title": "Women Leadership Meetup",
"description": "Networking and mentorship event for female leaders.",
"event_tag": "Meetup, Women",
"onlineType": "in-person",
"state": "California",
"city": "San Francisco",
"street": "456 Market St",
"category_id": "3",
"event_date": "2025-07-10",
"gender": "Female Only",
"targetGroup": ["Leaders", "Mentors"],
"posted_by": "John Smith",
"email": "john.smith@example.com"
}
{
"success": true,
"message": "Gender-specific event created successfully!",
"event_slug": "women-leadership-meetup-8742"
}
{
"success": false,
"message": "Missing required fields."
}
{
"success": false,
"message": "Insert failed",
"error": "SQL error details here"
}