The BAP Beta Tau backend is a REST API deployed atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/asubap/website/llms.txt
Use this file to discover all available pages before exploring further.
https://asubap-backend.vercel.app. All frontend requests read the base URL from the VITE_BACKEND_URL environment variable. Most endpoints require a Supabase-issued JWT passed as a Bearer token in the Authorization header — the token is available as session.access_token from the useAuth() hook.
Users
POST /users
Resolves a Supabase session to an application role. Called by AuthProvider immediately after any auth-state change.
Auth: Authorization: Bearer <token> (required)
The authenticated user’s email address, sourced from
session.user.email.One of
"general-member", "e-board", "admin", "pledge", "alumni" for regular users."sponsor" — present when the user is a sponsor account.The sponsor’s company name — present only when
type === "sponsor".GET /users/summary
Lists all registered users. Restricted to admin/e-board roles.
Auth: Authorization: Bearer <token> (required)
Response: Array of user summary objects
The user’s email address.
Display name.
Application role string.
Member rank (e.g.,
"inducted", "pledge", "alumni").POST /users/delete-user
Permanently removes a user account. Restricted to admin/e-board roles.
Auth: Authorization: Bearer <token> (required)
Email address of the user to delete.
Events
GET /events
Returns the event list. The response shape differs based on the caller’s role.
Auth: Authorization: Bearer <token> (required)
Response: MemberEvent[] for members/sponsors, AdminEvent[] for e-board
- MemberEvent fields
- AdminEvent additional fields
Event identifier.
Event title.
Description text.
Venue or location string.
ISO date string (
YYYY-MM-DD).Time string (
HH:MM:SS).Credit hours for attendance.
Hour category (e.g.
"professional", "service").Aggregate RSVP count.
Aggregate attendance count.
Whether the current user has RSVP’d.
Whether the current user attended.
Whether check-in is currently available.
GET /events/:eventId/participants
Returns detailed RSVP and attendance lists with user emails. E-board only.
Auth: Authorization: Bearer <token> (required, e-board role)
Path param: eventId — the event’s string identifier.
Response: EventParticipants
Event identifier.
Event name.
Array of
{user_id, name, user_email} for users who RSVP’d.Array of
{user_id, name, user_email, checked_in_at?} for users who attended.Total RSVP count.
Total attendance count.
POST /events/delete-event
Deletes an event. E-board only.
Auth: Authorization: Bearer <token> (required)
The ID of the event to delete.
Announcements
GET /announcements
Retrieves all announcements ordered by pin status and date.
Auth: Authorization: Bearer <token> (required)
Response: Announcement[]
Announcement identifier.
Announcement headline.
Body text.
ISO timestamp of creation.
Whether the announcement is pinned to the top.
"all", "members", or "pledges".POST /announcements/delete-announcement
Deletes an announcement by ID. E-board only.
Auth: Authorization: Bearer <token> (required)
The ID of the announcement to delete.
Sponsors
GET /sponsors/
Returns the full sponsor list with all details. Authenticated users.
Auth: Authorization: Bearer <token> (required)
Response: ApiSponsor[] — includes resources and email lists.
POST /sponsors/delete-sponsor
Removes a sponsor from the system. Admin only.
Auth: Authorization: Bearer <token> (required)
The company name of the sponsor to delete.
POST /sponsors/change-sponsor-tier
Updates a sponsor’s tier classification. Admin only.
Auth: Authorization: Bearer <token> (required)
The company name of the sponsor to update.
The new tier value (e.g.,
"gold", "silver", "bronze").GET /sponsors/summary
Returns a lightweight list of all sponsors for directory display. Resources and email lists are not included. Used by SponsorsNetworkPage to populate the sponsor directory.
Auth: Authorization: Bearer <token> (required)
Response: Array of sponsor summary objects
Database identifier (optional).
Display name of the sponsor.
Company description.
Links — may arrive as a JSON string, comma-separated string, or array. The frontend parses all three forms.
Profile photo URL.
Sponsor tier (e.g.,
"gold", "silver", "bronze").GET /sponsors/names
Returns the list of sponsor company names. Used by SponsorAuth to populate the company dropdown on the login page. This endpoint does not require an auth token.
Auth: None required
Response: Array of objects with company_name
POST /sponsors/get-one-sponsor-info
Returns the full profile for a single sponsor by name. Used by SponsorHome to load the authenticated sponsor’s own profile data.
Auth: Authorization: Bearer <token> (required)
The company name of the sponsor to retrieve.
The sponsor’s display name.
Company description.
Profile photo URL (Vercel Blob).
Array of URLs.
POST /sponsors/:name/details
Updates a sponsor’s about text and links.
Auth: Authorization: Bearer <token> (required, sponsor role for own profile)
Path param: name — the sponsor’s company name.
Updated company description (max 500 characters).
Updated array of
https:// URLs. Send an empty array [] to clear all links.Member Info
GET /member-info/:email
Returns a member’s full profile detail.
Auth: Authorization: Bearer <token> (required)
Path param: email — the member’s email address (URL-encoded).
Response: MemberDetail
Internal member identifier.
Member email.
Full display name.
Phone number.
Academic major.
Expected graduation year/date.
Job-search status:
"Looking for Internship", "Looking for Full-time", or "Not Looking".Member bio.
Total event hours accumulated.
"Current", "Pledge", or "Alumni".Application role string.
Timestamp of soft-deletion;
null if active.POST /member-info/:email/archive
Soft-deletes a member (sets deleted_at timestamp). Admin/e-board only.
Auth: Authorization: Bearer <token> (required)
Response: ArchiveResponse
Whether the operation succeeded.
Human-readable result message.
POST /member-info/:email/restore
Restores a previously archived member (clears deleted_at). Admin/e-board only.
Auth: Authorization: Bearer <token> (required)
Response: ArchiveResponse — same shape as archive.
GET /member-info/archived
Returns all currently archived (soft-deleted) members. Admin/e-board only.
Auth: Authorization: Bearer <token> (required)
Response: ArchivedMember[]
Member email.
Display name.
ISO timestamp of when the member was archived.
Application role at time of archival.
Member rank (optional).
Academic major (optional).
Expected graduation year (optional).
E-board
GET /eboard
Returns the current e-board and faculty advisor roster.
Auth: Authorization: Bearer <token> (optional — check backend policy)
Response: EboardFacultyEntry[]
Position title (e.g.,
"President", "Faculty Advisor").Role-specific email address.
Personal email of the holder.
Publicly displayed email (optional).
Photo URL (optional).
Full name of the position holder.
Academic major (optional).
Display order rank (optional).
Resources
GET /resources
Returns all sponsor resources grouped by company, with signed URLs for direct browser access.
Auth: Authorization: Bearer <token> (required)
Response: Categorized resource array
Sponsor company name.
Array of resource objects.
Links
GET /links
Returns dynamic URL values stored in the backend (used to avoid hardcoding URLs in the frontend).
Auth: Authorization: Bearer <token> (required)
Query params:
The identifier for the desired link. Example:
forms.[{ link: string }] — an array with a single object containing the URL.
Error Handling
All endpoints return standard HTTP status codes. Common error shapes:| Status | Meaning |
|---|---|
400 | Bad request — missing or invalid body parameters |
401 | Unauthorized — missing or expired Bearer token |
403 | Forbidden — valid token but insufficient role, or archived member |
404 | Resource not found |
500 | Internal server error |
{ "error": "Human-readable message" }.