Skip to main content

List User Memberships

List all clubs the authenticated user is a member of

Authentication

Required

Response Fields

club_code
string
required
Club code identifier
role
integer
required
Membership role (0=Owner, 10=Officer, 20=Member)
username
string
User’s username

Example Request

curl https://pennclubs.com/api/memberships/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

[
  {
    "club_code": "pppjo",
    "role": 10,
    "username": "johndoe"
  },
  {
    "club_code": "tech-club",
    "role": 20,
    "username": "johndoe"
  }
]

List Club Members

List all members of a specific club

Authentication

Required

Path Parameters

club_code
string
required
Club code identifier

Response Fields

name
string
Member’s full name (“Anonymous” if public=false)
username
string
Member’s username (null if public=false)
email
string
Member’s email (visible to club officers only)
role
integer
required
Membership role (0=Owner, 10=Officer, 20=Member)
title
string
Custom member title/position (e.g., “President”, “Tech Lead”)
description
string
Member bio/description (max 1000 characters)
public
boolean
Whether membership is publicly visible
active
boolean
Whether member is currently active
image
string
URL to member’s profile image

Example Request

curl https://pennclubs.com/api/clubs/pppjo/members/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

[
  {
    "name": "John Doe",
    "username": "johndoe",
    "email": "[email protected]",
    "role": 0,
    "title": "President",
    "description": "Passionate about building great products",
    "public": true,
    "active": true,
    "image": "https://pennclubs.com/media/membership/pppjo.johndoe.png"
  },
  {
    "name": "Anonymous",
    "username": null,
    "email": null,
    "role": 20,
    "title": "Member",
    "description": "",
    "public": false,
    "active": true,
    "image": null
  }
]

Add Club Member

Add a new member to a club

Authentication

Required - must be club officer or owner

Path Parameters

club_code
string
required
Club code identifier

Request Body

person
integer
required
User ID of the person to add
role
integer
Membership role (0=Owner, 10=Officer, 20=Member, default: 20)
title
string
Custom title/position
public
boolean
Make membership publicly visible (default: true)
active
boolean
Set member as active (default: true)

Example Request

curl -X POST https://pennclubs.com/api/clubs/pppjo/members/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "person": 12345,
    "role": 20,
    "title": "New Member",
    "public": true,
    "active": true
  }'

Update Member

Update a member's role or information

Authentication

Required - must be club officer or owner to change role; members can update their own public/active status

Path Parameters

club_code
string
required
Club code identifier
id
integer
required
Membership ID

Request Body

role
integer
New membership role (officers only, cannot promote above own role)
title
string
Custom title/position (officers only)
description
string
Member bio/description (officers only, max 1000 chars)
public
boolean
Make membership publicly visible (member can change own)
active
boolean
Set member as active/inactive (member can change own)

Example Request

curl -X PATCH https://pennclubs.com/api/clubs/pppjo/members/789/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "role": 10,
    "title": "Vice President"
  }'

Remove Member

Remove a member from a club

Authentication

Required - must be club officer or owner, or the member themselves

Path Parameters

club_code
string
required
Club code identifier
id
integer
required
Membership ID

Example Request

curl -X DELETE https://pennclubs.com/api/clubs/pppjo/members/789/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Membership Requests

List pending membership requests for a club

Authentication

Required - must be club officer or owner

Path Parameters

club_code
string
required
Club code identifier

Response Fields

name
string
Requester’s full name
username
string
Requester’s username
email
string
Requester’s email
club
string
Club code
created_at
datetime
When request was created
school
array
Requester’s schools
major
array
Requester’s majors
graduation_year
integer
Requester’s graduation year

Example Request

curl https://pennclubs.com/api/clubs/pppjo/membershiprequests/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Create Membership Request

Request to join a club

Authentication

Required

Request Body

club
string
required
Club code to request membership in

Example Request

curl -X POST https://pennclubs.com/api/requests/membership/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"club": "pppjo"}'

Accept/Reject Membership Request

Reject a membership request

Authentication

Required - must be club officer or owner

Path Parameters

club_code
string
required
Club code identifier
id
integer
required
Membership request ID
To accept a request, create a membership with the user’s ID instead.

Example Request

curl -X DELETE https://pennclubs.com/api/clubs/pppjo/membershiprequests/456/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Member Invites

Invite someone to join the club via email

Authentication

Required - must be club officer or owner

Path Parameters

club_code
string
required
Club code identifier

Request Body

email
string
required
Email address to send invitation to
role
integer
Role to grant when invite is accepted (default: 20)
title
string
Custom title for the member

Response Fields

id
string
Unique invite ID
email
string
Email address invited
role
integer
Role that will be granted
title
string
Member title
updated_at
datetime
Last update time

Example Request

curl -X POST https://pennclubs.com/api/clubs/pppjo/invites/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "role": 20,
    "title": "Member"
  }'

Build docs developers (and LLMs) love