API Documentation

This page describes the available API endpoints, request formats, and response samples.

⏰ Send Event Reminder Notification

POST https://api.drp-ncnmo.org/send_event_reminder.php

Content-Type: application/json

Description:

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.

Request Body Parameters:

Sample Request:

{
  "event_id": 12,
  "message": "Reminder: The event starts in 1 hour at the main hall."
}

Sample Success Response:

{
  "success": true,
  "message": "Reminder notifications sent successfully",
  "sent_to": 25
}

Sample Error Response (Missing Event ID):

{
  "success": false,
  "message": "Missing required field: event_id"
}

Sample Error Response (Event Not Found):

{
  "success": false,
  "message": "Event not found"
}

Notes:

πŸ‘₯ Get Event Attendees Details

POST https://api.drp-ncnmo.org/get_event_attendees.php

Content-Type: application/json

Description:

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.

Request Body Parameters:

Sample Request:

{
  "event_id": 12
}

Sample Success Response:

{
  "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"
    }
  ]
}

Sample Error Response (Missing Event ID):

{
  "status": "error",
  "message": "Missing required field: event_id"
}

Notes:

🏷️ Get Event Tags

GET https://api.drp-ncnmo.org/get_event_tags.php

Content-Type: application/json

Description:

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.

Sample Request:

GET /get_event_tags.php

Sample Success Response:

{
  "status": "success",
  "data": [
    {
      "id": 1,
      "name": "lecture"
    },
    {
      "id": 2,
      "name": "workshop"
    },
    {
      "id": 3,
      "name": "conference"
    }
  ]
}

Sample Error Response (No Tags Found):

{
  "status": "error",
  "message": "No event tags found."
}

βœ… Submit Verification Request

POST https://api.drp-ncnmo.org/verify_account.php

Content-Type: application/json

Sample Request Body:

{
  "email": "user@example.com"
}

Sample Success Response:

{
  "status": "success",
  "message": "Your verification is under processing"
}

Sample Error Response (Email Not Provided):

{
  "status": "error",
  "message": "Email is required"
}

Sample Error Response (Update Failed):

{
  "status": "error",
  "message": "Failed to update verification status"
}

πŸ”” Push Notification β€” Question Answered

Description:

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.

Trigger:

Notification Title:

πŸ“ Your Question Has Been Answered

Notification Body:

A response has been posted to your question. Tap to view it.

Notification Data Payload:

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"
}

Payload Field Notes:

Mobile App Handling (Recommended):

When type = "community_answer", the mobile app should:

Notes:

πŸŽ“ Submit Mentor Answer & Notify User

POST /https://api.drp-ncnmo.org/mentorship/answerQuestion.php

Content-Type: application/json

Purpose:

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.

Required Request Body:

{
  "questionId": 42,
  "response": "Here is your answer with guidance...",
  "mentorName": "John Doe",
  "mentorEmail": "john@example.com"
}

Success Response:

{
  "success": true,
  "message": "Answer submitted successfully",
  "notified_devices": 2
}

notified_devices indicates how many Expo tokens received the push notification.

Possible Error Responses:

Missing Required Field:

{
  "success": false,
  "message": "Missing required field: response"
}

Question Not Found:

{
  "success": false,
  "message": "Question not found"
}

Failed to Save Response:

{
  "success": false,
  "message": "Failed to save response",
  "error": "Detailed database error"
}

Invalid Method:

{
  "success": false,
  "message": "Only POST method is allowed"
}

Push Notification Details:

When the answer is submitted, the questioner receives a push notification via Expo:

{
  "question_id": 42,
  "type": "mentorship_answer"
}

Notes:

🚨 Report Question

POST https://api.drp-ncnmo.org/reportCommunityQuestion.php

Content-Type: application/json

Description:

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.

Request Body (JSON):

{
  "reporterEmail": "reporter@example.com",
  "questionId": 123
}

Request Parameters:

Response Fields:

Sample Success Response:

{
  "success": true,
  "message": "Question reported successfully"
}

Sample Error Response (Duplicate Report):

{
  "success": false,
  "message": "You have already reported this question"
}

Sample Error Response (Missing Fields):

{
  "success": false,
  "message": "reporterEmail or questionId not provided in JSON body"
}

Sample Error Response (Question Not Found):

{
  "success": false,
  "message": "Question not found"
}

🚨 Report Mentorship Question

POST https://api.drp-ncnmo.org/reportMentorshipQuestion.php

Content-Type: application/json

Description:

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.

Request Body (JSON):

{
  "reporterEmail": "reporter@example.com",
  "questionId": 123
}

Request Parameters:

Response Fields:

Sample Success Response:

{
  "success": true,
  "message": "Mentorship question reported successfully"
}

Sample Error Response (Duplicate Report):

{
  "success": false,
  "message": "You have already reported this mentorship question"
}

Sample Error Response (Missing Fields):

{
  "success": false,
  "message": "reporterEmail or questionId not provided in JSON body"
}

Sample Error Response (Question Not Found):

{
  "success": false,
  "message": "Mentorship question not found"
}

πŸ” Check Block Status

POST https://api.drp-ncnmo.org/checkBlockStatus.php

Content-Type: application/json

Description:

Checks whether a user (blocker_email) has blocked another user (blocked_email). This endpoint verifies a one-directional block relationship.

Request Body (JSON):

{
  "blocker_email": "john@example.com",
  "blocked_email": "jane@example.com"
}

Request Parameters:

Response Fields:

Sample Success Response (Blocked):

{
  "success": true,
  "blocker_email": "john@example.com",
  "blocked_email": "jane@example.com",
  "isBlocked": "YES"
}

Sample Success Response (Not Blocked):

{
  "success": true,
  "blocker_email": "john@example.com",
  "blocked_email": "mark@example.com",
  "isBlocked": "NO"
}

Sample Error Response:

{
  "success": false,
  "message": "blocker_email and blocked_email are required"
}

🚫 Block User

POST https://api.drp-ncnmo.org/blockUser.php

Content-Type: application/json

Description:

Allows a user to block another user. Once blocked:

Request Body (JSON):

{
  "blocker_email": "john@example.com",
  "blocked_email": "jane@example.com"
}

Request Parameters:

Sample Success Response:

{
  "success": true,
  "message": "User blocked successfully"
}

Sample Error Responses:

{
  "success": false,
  "message": "blocker_email and blocked_email are required"
}
{
  "success": false,
  "message": "You cannot block yourself"
}

βœ… Unblock User

POST https://api.drp-ncnmo.org/unblockUser.php

Content-Type: application/json

Description:

Allows a user to unblock a previously blocked user. Once unblocked:

Request Body (JSON):

{
  "blocker_email": "john@example.com",
  "blocked_email": "jane@example.com"
}

Request Parameters:

Sample Success Response:

{
  "success": true,
  "message": "User unblocked successfully"
}

Sample Error Response:

{
  "success": false,
  "message": "blocker_email and blocked_email are required"
}

πŸ“Œ Report an Event

POST /https://api.drp-ncnmo.com/reportEvent.php

Content-Type: application/json

Description:

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.

JSON Input:

{
  "reporter_name": "Jane Doe",
  "reporter_email": "jane@example.com",
  "event_id": 123
}

Sample Response (Success):

{
  "status": "received",
  "report_id": "550e8400-e29b-41d4-a716-446655440000"
}

Sample Error Responses:

Missing Required Fields:

{
  "error": "Missing required fields"
}

Event Not Found:

{
  "error": "Event not found"
}

Database Error:

{
  "error": "Failed to create event report"
}

πŸ“Œ Report a User

POST /https://api.drp-ncnmo.com/reportUser.php

Content-Type: application/json

Description:

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.

JSON Input:

{
  "reporter": {
    "name": "Jane Doe",
    "email": "jane@example.com"
  },
  "reported_user": {
    "name": "John Smith",
    "email": "john@example.com"
  },
  "reason": "Harassment"
}

Sample Response (Success):

{
  "status": "received",
  "report_id": "550e8400-e29b-41d4-a716-446655440000"
}

Sample Error Responses:

Missing Required Fields:

{
  "error": "Missing required fields"
}

Self-Reporting Attempt:

{
  "error": "You cannot report yourself"
}

Database Error:

{
  "error": "Failed to create report"
}

πŸ“Œ Get Verification Status

POST /https://api.drp-ncnmo.com/knackApi.php

Content-Type: application/json

Description:

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).

JSON Input:

{
  "email": "user@example.com"
}

Sample Response (Unverified User):

{
  "status": "unverified",
  "message": "Account status fetched successfully."
}

Sample Response (Pending User):

{
  "status": "pending",
  "message": "Account status fetched successfully."
}

Sample Response (Verified User):

{
  "status": "verified",
  "message": "Account status fetched successfully."
}

Sample Error Responses:

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"
}

πŸ“Œ Get All Sub Categories

GET /https://api.drp-ncnmo.com/sub_category.php

Content-Type: application/json

Description:

Retrieves all records from the sub_category table. The endpoint returns full details including ID, name, image, category info, location, icon, and more.

Table Fields Returned:

Sample Success Response:

{
  "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"
    }
  ]
}

Sample Error Response:

{
  "status": "error",
  "message": "Database query failed",
  "details": "SQL error message here"
}

πŸ“Œ Verify Email Status

POST /https://api.drp-ncnmo.com/verify_status.php

Content-Type: application/json

Description:

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.

JSON Input:

{
  "email": "user@example.com"
}

Sample Success Response:

{
  "verify_status": "verified"
}

Sample Error Responses:

Missing Email:

{
  "error": "Email not provided"
}

Email Not Found:

{
  "error": "Email not found"
}

Database Error:

{
  "error": "Database query failed",
  "details": "SQL error message here"
}

πŸ“Œ Delete User Account

POST /https://api.drp-ncnmo.com/delete_account.php

Content-Type: application/json

Description:

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.

JSON Input:

{
  "userEmail": "user@example.com"
}

Sample Success Response:

{
  "status": "success",
  "message": "User account deleted successfully"
}

Sample Error Responses:

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"
}

πŸ“Œ Get Event by Slug

POST https://api.drp-ncnmo.org/get_event_by_slug.php

Content-Type: application/json

Description:

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.

JSON Input:

{
  "slug": "national-conference-2025",
  "userEmail": "user@example.com"
}

Note: userEmail is optional. If not provided, the API will return "attending": "No".

Sample Success Response:

{
  "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"
  }
}

Sample Error Responses:

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"
}

πŸ“Έ Update Profile Photo

POST https://api.drp-ncnmo.org/updatePhoto.php

Content-Type: application/json

Description:

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.

JSON Request Body:

{
  "userEmail": "example@gmail.com",
  "profile_picture": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}

Fields:

Sample Success Response:

{
  "status": "success",
  "message": "Profile picture updated successfully.",
  "profile_picture_url": "https://yourdomain.com/uploads/profile_67392abc17.png"
}

Sample Error Responses:

Missing fields:

{
  "status": "error",
  "message": "Missing userEmail or profile_picture."
}

Invalid Base64 string:

{
  "status": "error",
  "message": "Invalid base64 image data."
}

Database or file save error:

{
  "status": "error",
  "message": "Failed to save profile picture."
}

πŸ” Update Password

POST /https://api.drp-ncnmo.com/updatePassword.php

Content-Type: application/json

Description:

Allows a user to securely update their account password. The API verifies the user's current password before applying the change.

JSON Input:

{
  "userEmail": "user@example.com",
  "current_password": "oldpassword123",
  "new_password": "newstrongpassword456",
  "confirm_password": "newstrongpassword456"
}

Sample Success Response:

{
  "status": "success",
  "message": "Password updated successfully."
}

Sample Error Responses:

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."
}

πŸ“˜ Fetch Event Thread Messages

POST /https://drp-ncnmo.com/event_thread.php

Content-Type: application/json

Description:

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.

Request Body:

{
  "event_id": 123
}

Sample Success Response:

{
  "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"
    }
  ]
}

Sample Error Response (No Messages Found):

{
  "status": "error",
  "message": "No messages found for this event."
}

Sample Error Response (Missing Event ID):

{
  "status": "error",
  "message": "Missing event_id in request."
}

πŸ“˜ Add Event Thread Message

POST /https://drp-ncnmo.com/insertchat.php

Content-Type: application/json

Description:

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.

Request Body:

{
  "event_id": 123,
  "user_name": "John Doe",
  "email": "john@example.com",
  "message": "Looking forward to this event!"
}

Sample Success Response:

{
  "success": true,
  "user_name": "John Doe",
  "message": "Looking forward to this event!",
  "created_at": "Tuesday, December 10, 2025 2:30 PM",
  "avatar": "JO"
}

Sample Error Response (Missing Fields):

{
  "success": false,
  "error": "Missing fields"
}

Sample Error Response (Database Failure):

{
  "success": false,
  "error": "Database insert failed"
}

πŸ“˜ Attend / Unattend Event

POST /https://drp-ncnmo/attend-event.php

Content-Type: application/json

Description:

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").

Request Body:

{
  "slug": "event-123",
  "userEmail": "user@example.com",
  "action": "attend"
}

Sample Success Response (Attend):

{
  "status": "attended"
}

Sample Success Response (Already Attending):

{
  "status": "exists"
}

Sample Success Response (Unattend):

{
  "status": "unattended"
}

Sample Error Response:

{
  "status": "error",
  "message": "Event not found"
}

πŸ“˜ Delete Event (User-Specific)

POST /https://drp-ncnmo.com/api/delete_event.php

Content-Type: application/json

Description:

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.

Request Body:

{
  "id": 123,
  "userEmail": "user@example.com"
}

Sample Success Response:

{
  "status": "success",
  "message": "Event deleted and all affected users notified."
}

Sample Partial Success Response (Some emails failed):

{
  "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"
  ]
}

Sample Error Responses:

{
  "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."
}

πŸ“˜ Get Chapters

GET /https://api.drp-ncnmo.org/getChapters.php

Content-Type: application/json

Description:

Fetches a list of all chapters sorted alphabetically by name.

Sample Success Response:

{
  "status": "success",
  "data": [
    {
      "id": "1",
      "name": "Introduction"
    },
    {
      "id": "2",
      "name": "Getting Started"
    }
  ]
}

Sample Empty Response:

{
  "status": "error",
  "message": "No chapters found."
}

πŸ“ User Registration

POST /https://api.drp-ncnmo.org/register.php

Content-Type: application/json

Sample Request Body:

{
  "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"]
}

Sample Success Response:

{
  "success": true,
  "message": "Registration successful. Please check your email for verification code."
}

βœ… Email Verification

POST /https://api.drp-ncnmo.org/verify.php

Content-Type: application/json

Sample Request Body:

{
  "email": "ope@example.com",
  "otp": "123456"
}

Sample Success Response:

{
  "success": true,
  "message": "Email verified successfully."
}

Sample Invalid OTP Response:

{
  "success": false,
  "message": "Invalid OTP."
}

Sample Email Already Verified Response:

{
  "success": true,
  "message": "Email already verified."
}

πŸ”„ Resend Verification Code

POST /https://api.drp-ncnmo.org/resendVerification.php

Content-Type: application/json

Sample Request Body:

{
  "email": "ope@example.com"
}

Sample Success Response:

{
  "success": true,
  "message": "New verification code sent to your email."
}

Sample Email Already Verified Response:

{
  "success": true,
  "message": "Email already verified."
}

πŸ”‘ User Login (JWT Enabled)

POST https://api.drp-ncnmo.org/login.php

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.

Request Body Parameters:

Sample Request Body:

{
  "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.

Sample Success Response:

{
  "success": true,
  "message": "Login successful.",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI...",
  "user": {
    "id": 12,
    "name": "Opeyemi Wasiu",
    "email": "ope@example.com"
  }
}

Sample Email Not Verified Response:

{
  "success": false,
  "message": "Email not verified. Please verify your email.",
  "email": "ope@example.com"
}

Sample Invalid Password Response:

{
  "success": false,
  "message": "Invalid password."
}

Sample Email Not Found Response:

{
  "success": false,
  "message": "Email not found."
}

πŸšͺ User Logout (Remove Device Token)

POST https://api.drp-ncnmo.org/logout.php

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:

Request Body Parameters:

Sample Request:

POST /logout.php
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI...
Content-Type: application/json

{
  "expo_token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]"
}

Sample Success Response:

{
  "success": true,
  "message": "Logout successful. Device token removed."
}

Sample Token Already Removed Response:

{
  "success": true,
  "message": "Logout successful. Token already removed."
}

Sample Unauthorized Response:

{
  "success": false,
  "message": "Invalid or expired token."
}

Sample Missing Token Response:

{
  "success": false,
  "message": "expo_token is required for logout."
}

πŸ“… Get Trending Event

GET /https://api.drp-ncnmo.org/getTrendingEvent.php

Sample Success Response:

{
  "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"
  }
}

Sample When No Event Found:

{
  "success": false,
  "message": "No upcoming event found.",
  "event": {
    "id": 0,
    "name": "No Upcoming Event",
    "details": "Stay tuned for the next big conference!",
    "location": "β€”",
    "timeUntil": ""
  }
}

πŸ“‚ Get Event Categories

GET /https://api.drp-ncnmo.org/getCategories.php

Sample Success Response:

{
  "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."
    }
  ]
}

Sample No Categories Response:

{
  "success": false,
  "message": "No categories found.",
  "categories": []
}

πŸ‘€ Update Profile

POST https://api.drp-ncnmo.org/update_profile.php

Content-Type: application/json

πŸ“© Sample JSON Request Body

{
  "email": "john@example.com",
  "bio": "Software developer and mentor",
  "profession": "Developer",
  "business_link": "https://mybusiness.com",
  "chapter": "West",
  "provideMentorship": "Yes",
  "topics": [
    "careerDevelopment",
    "entrepreneurship"
  ]
}

πŸ“€ Sample Success Response

{
  "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"
  }
}

⚠️ Sample Error Response (User Not Found)

{
  "status": "error",
  "message": "User not found"
}

⚠️ Sample Error Response (Invalid JSON)

{
  "status": "error",
  "message": "Invalid JSON input"
}

πŸ‘€ Get Profile

POST https://api.drp-ncnmo.org/getProfile.php

Content-Type: application/json

πŸ“© Sample JSON Request Body

{
  "email": "john@example.com"
}

πŸ“€ Sample Success Response

{
  "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"
  }
}

⚠️ Sample Error Response (User Not Found)

{
  "status": "error",
  "message": "User not found"
}

⚠️ Sample Error Response (Invalid JSON)

{
  "status": "error",
  "message": "Invalid JSON input"
}

⚠️ Notes

πŸ”’ Reset Password

POST /https://api.drp-ncnmo.org/reset_password_api.php

Content-Type: application/x-www-form-urlencoded

Sample Request Fields:


current_password: "oldpassword123"
new_password: "newpassword456"
confirm_password: "newpassword456"
    

Sample Success Response:

{
  "status": "success",
  "message": "Password updated successfully!"
}

Sample Error Responses:

{
  "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."
}

πŸ”‘ Forgot Password

POST /https://api.drp-ncnmo.org/forgot_password.php

Content-Type: application/json

{
"email": "user@example.com"
}

Sample Success Response:

{
"success": true,
"message": "Password reset link has been sent to your email."
}

Sample Error Response (email not found):

{
"success": false,
"message": "Email address not registered."
}

πŸ”’ Reset Password

POST /https://api.drp-ncnmo.org/reset_password_page.php

Content-Type: application/json

Sample Request Body:

{
"token": "abc123xyz456token",
"new_password": "NewStrongPassword123!",
"confirm_password": "NewStrongPassword123!"
}

Sample Success Response:

{
"success": true,
"message": "Password has been reset successfully!"
}

Sample Error Response (token invalid/expired):

{
"success": false,
"message": "Invalid or expired token."
}

Sample Error Response (passwords do not match):

{
"success": false,
"message": "Passwords do not match."
}

πŸ“Œ Fetch All Events (With Attendance Status)

POST /https://api.drp-ncnmo.org/events_api.php

Content-Type: application/json

Sample Request Body:

{
  "userEmail": "janedoe@example.com"
}

Sample Success Response:

{
  "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"
    }
  ]
}

Sample Error Response (missing userEmail):

{
  "status": "error",
  "message": "Missing userEmail in JSON input"
}

Sample Error Response (database issue):

{
  "status": "error",
  "message": "Database query failed",
  "error": "SQL error details"
}

πŸ“… Create Event

POST https://api.drp-ncnmo.org/create_event.php

Content-Type: application/json

Description

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.

Sample Request Body:

{
  "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"
}

Field Notes

Sample Success Response:

{
  "success": true,
  "message": "Event created successfully!",
  "event_slug": "react-native-workshop-4821"
}

Sample Error Response (missing required fields):

{
  "success": false,
  "message": "Missing required fields."
}

Sample Error Response (invalid timezone):

{
  "success": false,
  "message": "Invalid timezone."
}

Sample Error Response (database issue):

{
  "success": false,
  "message": "Database error"
}

πŸŽ“ Get Scholars

GET /https://api.drp-ncnmo.org/get_scholars.php

Content-Type: application/json

Description:

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.

Sample Success Response:

{
  "success": true,
  "data": [
    {
      "id": "1",
      "name": "John Doe"
    },
    {
      "id": "2",
      "name": "Sarah Williams"
    }
  ]
}

Sample Error Response (database connection issue):

{
  "success": false,
  "message": "Database connection failed."
}

Sample Error Response (no scholars found):

{
  "success": false,
  "message": "No scholars found."
}

✏️ Edit Event

POST https://api.drp-ncnmo.org/edit_event.php

Content-Type: application/json

Description:

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.

Sample Request Body:

{
  "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",
   
}

Field Notes:

Push Notification Behavior:

When an event is updated, users who have saved the event will receive a push notification via Expo.

Notification Title:

πŸ“… Event Updated

Notification Body:

{EVENT_TITLE} has been updated. Tap to view details.

Notification Data Payload:

{
  "event_id": 12,
  "event_slug": "react-native-workshop-4821",
  "type": "event_update"
}

Sample Success Response:

{
  "success": true,
  "message": "Event updated successfully!",
  "event_slug": "react-native-workshop-4821",
  "event_date": "2025-12-15",
  "event_time": "14:30"
}

Sample Error Response (missing required fields):

{
  "success": false,
  "message": "Missing required field: title"
}

Sample Error Response (invalid timezone):

{
  "success": false,
  "message": "Invalid timezone."
}

Sample Error Response (unauthorized access):

{
  "success": false,
  "message": "You do not have permission to edit this event."
}

Sample Error Response (event not found):

{
  "success": false,
  "message": "Event not found."
}

Sample Error Response (database issue):

{
  "success": false,
  "message": "Failed to update event."
}

❓ Ask Scholar

POST /https://api.drp-ncnmo.org/ask_scholar.php

Content-Type: application/json

Description:

This endpoint allows users to send a question to a scholar. Questions may be public or private and can include optional tags.

Sample Request Body:

{
  "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"
}

Sample Success Response:

{
  "success": true,
  "message": "Your public question has been submitted!",
  "question_id": 1023
}

Sample Error Response (missing fields):

{
  "success": false,
  "message": "scholar_id, question, privacy, userName, and userEmail are required."
}

Sample Error Response (scholar not found):

{
  "success": false,
  "message": "Scholar not found."
}

Sample Error Response (database issue):

{
  "success": false,
  "message": "Database error: Duplicate entry or server issue."
}

πŸ”’ Private Questions

GET /https://api.drp-ncnmo.org/private_questions.php

Content-Type: application/json

Description:

This endpoint retrieves all questions from the ask_scholar table where privacy = "no". These are questions submitted privately to scholars.

Sample Success Response:

{
  "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"
    }
  ]
}

Sample Error Response (no private questions):

{
  "success": false,
  "message": "No private questions found."
}

Sample Error Response (database issue):

{
  "success": false,
  "message": "Database error: Unable to fetch private questions."
}

🌍 Public Questions

POST /https://api.drp-ncnmo.org/public_questions.php

Content-Type: application/json

Description:

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".

Sample Request Body:

{
  "userEmail": "test@example.com"
}

Sample Success Response:

{
  "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"
    }
  ]
}

Sample Error Response (missing userEmail):

{
  "success": false,
  "message": "userEmail not provided in JSON body"
}

Sample Error Response (no public questions):

{
  "success": false,
  "message": "No public questions found."
}

Sample Error Response (database issue):

{
  "success": false,
  "message": "Database error: Unable to fetch public questions."
}

πŸ§‘β€πŸ« Mentorship Questions

GET /https://api.drp-ncnmo.org/mentorship_questions.php

Content-Type: application/json

Description:

This endpoint retrieves all mentorship questions submitted by users. Each question includes user details, question content, tags, mentor category, status, and timestamp.

Sample Success Response:

{
  "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"
    }
  ]
}

Sample Error Response (no records):

{
  "success": false,
  "message": "No mentorship questions found."
}

Sample Error Response (database issue):

{
  "success": false,
  "message": "Database error: Unable to fetch mentorship questions."
}

πŸ§‘β€πŸ« Ask Mentor

POST /https://api.drp-ncnmo.org/ask_mentor.php

Content-Type: application/json

Description:

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.

Sample Request Body:

{
  "userName": "John Doe",
  "userEmail": "john@example.com",
  "question": "How do I start a career in data science?",
  "mentorCategory": "Technology",
  "tags": ["career", "datascience"]
}

Sample Success Response:

{
  "success": true,
  "message": "Your question has been submitted successfully!",
  "question_id": 105
}

Sample Error Response (missing fields):

{
  "success": false,
  "message": "userName, userEmail, question, and mentorCategory are required."
}

Sample Error Response (database issue):

{
  "success": false,
  "message": "Database error: Duplicate entry or server issue."
}

πŸ—¨οΈ Get Mentor Responses

GET /https://api.drp-ncnmo.org/get_mentor_responses.php?questionId=123

Content-Type: application/json

Description:

This endpoint retrieves a mentorship question and all corresponding responses from mentors. Returns question details, all answers, timestamps, and time-ago values.

Sample Success Response:

{
  "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
}

Sample Error Response (missing ID):

{
  "success": false,
  "message": "Invalid or missing questionId."
}

Sample Error Response (not found):

{
  "success": false,
  "message": "Question not found."
}

πŸ§‘β€πŸ« Get Mentors

GET /https://api.drp-ncnmo.org/get_mentors.php?mentorArea=careerDevelopment

Content-Type: application/json

Description:

This endpoint retrieves all verified mentors. You can optionally filter mentors by their area of expertise using the mentorArea query parameter.

Available Mentor Areas:


academicSuccess
careerDevelopment
Immigration
Entrepreneurship
financialPlanning
healthandWellness

Sample Success Response:

{
  "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"
    }
  ]
}

Sample Error Response (no mentors):

{
  "success": false,
  "message": "No mentors found."
}

Sample Error Response (database issue):

{
  "success": false,
  "message": "Database error: Unable to fetch mentors."
}

πŸ“… Schedule Mentorship Session

POST /https://api.drp-ncnmo.org/save_session.php

Content-Type: application/json

Description:

This endpoint allows a user to schedule a mentorship session with a selected mentor. It saves the session request in the mentorship_sessions table.

Required Fields:

Sample Request Body:

{
  "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"
}

Sample Success Response:

{
  "status": "success",
  "message": "βœ… Session scheduled successfully!",
  "session_id": 78
}

Sample Error Response (missing field):

{
  "status": "error",
  "message": "Missing required field: mentorEmail"
}

Sample Error Response (database issue):

{
  "status": "error",
  "message": "Database error: Duplicate entry or server issue."
}

πŸ™‹ Propose a Mentor

POST /https://api.drp-ncnmo.org/propose_mentor.php

Content-Type: application/json

Description:

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.

Required Fields:

Sample Request Body:

{
  "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"
}

Sample Success Response:

{
  "status": "success",
  "message": "βœ… Mentor request submitted successfully!",
  "request_id": 101
}

Sample Error Response (missing field):

{
  "status": "error",
  "message": "Missing required field: mentorEmail"
}

Sample Error Response (database issue):

{
  "status": "error",
  "message": "Database error: Duplicate entry or server issue."
}

πŸ‘₯ Get All Users

POST https://api.drp-ncnmo.org/getuser.php?page=1&search=John&profession=Engineer

Content-Type: application/json

Description:

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.

Block Visibility Rules:

Query Parameters:

Request Body (JSON):

{
  "requester_email": "john@example.com"
}

Sample Success Response:

{
  "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"
    }
  ]
}

Sample Error Response:

{
  "success": false,
  "message": "Invalid request or unable to fetch users."
}

πŸ‘ Toggle Like on Question

POST /https://api.drp-ncnmo.org/toggle_like.php

Content-Type: application/json

Sample Request Body:

{
  "questionId": 12,
  "userEmail": "test@example.com"
}

Sample Success Response (Liked):

{
  "status": "success",
  "liked": true,
  "totalLikes": 5
}

Sample Success Response (Unliked):

{
  "status": "success",
  "liked": false,
  "totalLikes": 4
}

Sample Error Response (Missing Fields):

{
  "status": "error",
  "message": "Missing questionId or userEmail in JSON body"
}

πŸ“– Get Response Details

POST /https://api.drp-ncnmo.org/responses.php

Content-Type: application/json

Sample Request Body:

{
  "id": "123"
}

Sample Success Response:

{
  "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..."
  }
}

Sample Error Response (ID Not Provided):

{
  "status": "error",
  "message": "ID not provided"
}

Sample Error Response (ID Not Found):

{
  "status": "error",
  "message": "No details found"
}

🟦 Create Annual NCMO Event (Category 1)

POST https:/api.drp-ncnmo.com/submitannual_event.php

Content-Type: application/json

πŸ“₯ Sample Request Body:

{
  "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"
}

πŸ“€ Sample Success Response:

{
  "success": true,
  "message": "Event created successfully!",
  "event_slug": "annual-test-event-4821"
}

❌ Sample Error Response (Missing Required Fields):

{
  "success": false,
  "message": "Missing required fields."
}

❌ Sample Error Response (Database Failure):

{
  "success": false,
  "message": "Insert failed",
  "error": "SQL error details here"
}

🟩 Create Chapter Event (Category 2)

POST https://api.drp-ncnmo.org/submitchapter_event.php

Content-Type: application/json

πŸ“₯ Sample Request Body:

{
  "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"
}

πŸ“€ Sample Success Response:

{
  "success": true,
  "message": "Chapter event created successfully!",
  "event_slug": "chapter-annual-meeting-4821"
}

❌ Sample Error Response (Missing Required Fields):

{
  "success": false,
  "message": "Missing required fields."
}

❌ Sample Error Response (Database Failure):

{
  "success": false,
  "message": "Insert failed",
  "error": "SQL error details here"
}

🟦 Create Gender-Specific Event (Meetup Event)

POST https://api.drp-ncnmo.org/submitmeetup_event.php

Content-Type: application/json

πŸ“₯ Sample Request Body:

{
  "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"
}

πŸ“€ Sample Success Response:

{
  "success": true,
  "message": "Gender-specific event created successfully!",
  "event_slug": "women-leadership-meetup-8742"
}

❌ Sample Error Response (Missing Required Fields):

{
  "success": false,
  "message": "Missing required fields."
}

❌ Sample Error Response (Database Failure):

{
  "success": false,
  "message": "Insert failed",
  "error": "SQL error details here"
}