Skip to main content

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

The BAP Beta Tau backend is a REST API deployed at 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.
// Standard authenticated request pattern
const response = await fetch(`${import.meta.env.VITE_BACKEND_URL}/some-endpoint`, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${session.access_token}`,
  },
  body: JSON.stringify(payload),
});

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)
user_email
string
required
The authenticated user’s email address, sourced from session.user.email.
Response: Role string or sponsor object
(string)
string
One of "general-member", "e-board", "admin", "pledge", "alumni" for regular users.
type
string
"sponsor" — present when the user is a sponsor account.
companyName
string
The sponsor’s company name — present only when type === "sponsor".
curl -X POST https://asubap-backend.vercel.app/users \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{"user_email": "member@asu.edu"}'
# Response: "general-member"

curl -X POST https://asubap-backend.vercel.app/users \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{"user_email": "company-name@example.com"}'
# Response: {"type": "sponsor", "companyName": "Company Name"}

GET /users/summary

Lists all registered users. Restricted to admin/e-board roles. Auth: Authorization: Bearer <token> (required) Response: Array of user summary objects
email
string
The user’s email address.
name
string
Display name.
role
string
Application role string.
rank
string
Member rank (e.g., "inducted", "pledge", "alumni").
curl -X GET https://asubap-backend.vercel.app/users/summary \
  -H "Authorization: Bearer <token>"
# Response: [{"email":"...","name":"...","role":"general-member","rank":"inducted"}]

POST /users/delete-user

Permanently removes a user account. Restricted to admin/e-board roles. Auth: Authorization: Bearer <token> (required)
user_email
string
required
Email address of the user to delete.
curl -X POST https://asubap-backend.vercel.app/users/delete-user \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{"user_email": "member@asu.edu"}'

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
id
string
Event identifier.
event_name
string
Event title.
event_description
string
Description text.
event_location
string
Venue or location string.
event_date
string
ISO date string (YYYY-MM-DD).
event_time
string
Time string (HH:MM:SS).
event_hours
number
Credit hours for attendance.
event_hours_type
string
Hour category (e.g. "professional", "service").
rsvp_count
number
Aggregate RSVP count.
attending_count
number
Aggregate attendance count.
user_rsvped
boolean
Whether the current user has RSVP’d.
user_attended
boolean
Whether the current user attended.
can_check_in
boolean
Whether check-in is currently available.
curl -X GET https://asubap-backend.vercel.app/events \
  -H "Authorization: Bearer <token>"

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_id
string
Event identifier.
event_name
string
Event name.
rsvped_users
array
Array of {user_id, name, user_email} for users who RSVP’d.
attending_users
array
Array of {user_id, name, user_email, checked_in_at?} for users who attended.
rsvp_count
number
Total RSVP count.
attending_count
number
Total attendance count.
curl -X GET https://asubap-backend.vercel.app/events/42/participants \
  -H "Authorization: Bearer <token>"

POST /events/delete-event

Deletes an event. E-board only. Auth: Authorization: Bearer <token> (required)
event_id
string
required
The ID of the event to delete.
curl -X POST https://asubap-backend.vercel.app/events/delete-event \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{"event_id": "42"}'

Announcements

GET /announcements

Retrieves all announcements ordered by pin status and date. Auth: Authorization: Bearer <token> (required) Response: Announcement[]
id
string
Announcement identifier.
title
string
Announcement headline.
description
string
Body text.
created_at
string
ISO timestamp of creation.
is_pinned
boolean
Whether the announcement is pinned to the top.
target_audience
string
"all", "members", or "pledges".
curl -X GET https://asubap-backend.vercel.app/announcements \
  -H "Authorization: Bearer <token>"

POST /announcements/delete-announcement

Deletes an announcement by ID. E-board only. Auth: Authorization: Bearer <token> (required)
announcement_id
string
required
The ID of the announcement to delete.
curl -X POST https://asubap-backend.vercel.app/announcements/delete-announcement \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{"announcement_id": "7"}'

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.
curl -X GET https://asubap-backend.vercel.app/sponsors/ \
  -H "Authorization: Bearer <token>"

POST /sponsors/delete-sponsor

Removes a sponsor from the system. Admin only. Auth: Authorization: Bearer <token> (required)
sponsor_name
string
required
The company name of the sponsor to delete.
curl -X POST https://asubap-backend.vercel.app/sponsors/delete-sponsor \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{"sponsor_name": "Acme Corp"}'

POST /sponsors/change-sponsor-tier

Updates a sponsor’s tier classification. Admin only. Auth: Authorization: Bearer <token> (required)
sponsor_name
string
required
The company name of the sponsor to update.
tier
string
required
The new tier value (e.g., "gold", "silver", "bronze").
curl -X POST https://asubap-backend.vercel.app/sponsors/change-sponsor-tier \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{"sponsor_name": "Acme Corp", "tier": "gold"}'

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
id
number
Database identifier (optional).
company_name
string
Display name of the sponsor.
about
string
Company description.
Links — may arrive as a JSON string, comma-separated string, or array. The frontend parses all three forms.
pfp_url
string
Profile photo URL.
tier
string
Sponsor tier (e.g., "gold", "silver", "bronze").
curl -X GET https://asubap-backend.vercel.app/sponsors/summary \
  -H "Authorization: Bearer <token>"

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
curl -X GET https://asubap-backend.vercel.app/sponsors/names
# Response: [{"company_name": "Acme Corp"}, ...]

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)
sponsor_name
string
required
The company name of the sponsor to retrieve.
Response:
company_name
string
The sponsor’s display name.
about
string
Company description.
pfp_url
string
Profile photo URL (Vercel Blob).
Array of URLs.
curl -X POST https://asubap-backend.vercel.app/sponsors/get-one-sponsor-info \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{"sponsor_name": "Acme Corp"}'

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.
about
string
required
Updated company description (max 500 characters).
Updated array of https:// URLs. Send an empty array [] to clear all links.
curl -X POST "https://asubap-backend.vercel.app/sponsors/Acme%20Corp/details" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{"about": "We build software.", "links": ["https://acme.com"]}'

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
id
string
Internal member identifier.
email
string
Member email.
name
string
Full display name.
phone
string
Phone number.
major
string
Academic major.
graduationDate
string
Expected graduation year/date.
status
string
Job-search status: "Looking for Internship", "Looking for Full-time", or "Not Looking".
about
string
Member bio.
hours
string
Total event hours accumulated.
rank
string
"Current", "Pledge", or "Alumni".
role
string
Application role string.
deleted_at
string | null
Timestamp of soft-deletion; null if active.
curl -X GET "https://asubap-backend.vercel.app/member-info/member%40asu.edu" \
  -H "Authorization: Bearer <token>"

POST /member-info/:email/archive

Soft-deletes a member (sets deleted_at timestamp). Admin/e-board only. Auth: Authorization: Bearer <token> (required) Response: ArchiveResponse
success
boolean
Whether the operation succeeded.
message
string
Human-readable result message.
curl -X POST "https://asubap-backend.vercel.app/member-info/member%40asu.edu/archive" \
  -H "Authorization: Bearer <token>"

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.
curl -X POST "https://asubap-backend.vercel.app/member-info/member%40asu.edu/restore" \
  -H "Authorization: Bearer <token>"

GET /member-info/archived

Returns all currently archived (soft-deleted) members. Admin/e-board only. Auth: Authorization: Bearer <token> (required) Response: ArchivedMember[]
email
string
Member email.
name
string
Display name.
deleted_at
string
ISO timestamp of when the member was archived.
role
string
Application role at time of archival.
rank
string
Member rank (optional).
major
string
Academic major (optional).
graduating_year
number
Expected graduation year (optional).
curl -X GET https://asubap-backend.vercel.app/member-info/archived \
  -H "Authorization: Bearer <token>"

E-board

GET /eboard

Returns the current e-board and faculty advisor roster. Auth: Authorization: Bearer <token> (optional — check backend policy) Response: EboardFacultyEntry[]
role
string
Position title (e.g., "President", "Faculty Advisor").
role_email
string
Role-specific email address.
email
string
Personal email of the holder.
display_email
string
Publicly displayed email (optional).
profile_photo_url
string
Photo URL (optional).
name
string | null
Full name of the position holder.
major
string | null
Academic major (optional).
rank
number
Display order rank (optional).
curl -X GET https://asubap-backend.vercel.app/eboard \
  -H "Authorization: Bearer <token>"

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
category
string
Sponsor company name.
resources
array
Array of resource objects.
curl -X GET https://asubap-backend.vercel.app/resources \
  -H "Authorization: Bearer <token>"

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.
Response: [{ link: string }] — an array with a single object containing the URL.
curl -X GET "https://asubap-backend.vercel.app/links?link_name=forms" \
  -H "Authorization: Bearer <token>"
# Response: [{"link": "https://docs.google.com/forms/..."}]

Error Handling

All endpoints return standard HTTP status codes. Common error shapes:
StatusMeaning
400Bad request — missing or invalid body parameters
401Unauthorized — missing or expired Bearer token
403Forbidden — valid token but insufficient role, or archived member
404Resource not found
500Internal server error
Error responses include a JSON body: { "error": "Human-readable message" }.
The POST /users endpoint returns 403 with { error: "Member is archived" } when an archived member attempts to authenticate. AuthProvider propagates this as authError in the auth context without clearing the session — the /auth/Home page is responsible for displaying the error and signing the user out.

Build docs developers (and LLMs) love