Skip to main content
GET
/
members
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  appID: 'app_xxxxxxxxxxxxxx',
  apiKey: 'My API Key',
});

// Automatically fetches more pages as needed.
for await (const memberListResponse of client.members.list({ company_id: 'biz_xxxxxxxxxxxxxx' })) {
  console.log(memberListResponse.id);
}
{
  "data": [
    {
      "id": "<string>",
      "created_at": "2023-12-01T05:00:00.401Z",
      "updated_at": "2023-12-01T05:00:00.401Z",
      "joined_at": "2023-12-01T05:00:00.401Z",
      "access_level": "no_access",
      "status": "drafted",
      "most_recent_action": "canceling",
      "most_recent_action_at": "2023-12-01T05:00:00.401Z",
      "user": {
        "id": "<string>",
        "email": "<string>",
        "name": "<string>",
        "username": "<string>"
      },
      "phone": "<string>",
      "usd_total_spent": 6.9
    }
  ],
  "page_info": {
    "end_cursor": "<string>",
    "start_cursor": "<string>",
    "has_next_page": true,
    "has_previous_page": true
  }
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Query Parameters

after
string | null

Returns the elements in the list that come after the specified cursor.

before
string | null

Returns the elements in the list that come before the specified cursor.

first
integer | null

Returns the first n elements from the list.

Example:

42

last
integer | null

Returns the last n elements from the list.

Example:

42

company_id
string
required

The ID of the company to list members for

Example:

"biz_xxxxxxxxxxxxxx"

direction
enum<string> | null

The direction to sort the members by The direction of the sort.

Available options:
asc,
desc
order
enum<string> | null

The order to sort the members by Which columns can be used to sort.

Available options:
id,
usd_total_spent,
created_at,
joined_at,
most_recent_action
created_before
string<date-time> | null

The maximum creation date to filter by

Example:

"2023-12-01T05:00:00.401Z"

created_after
string<date-time> | null

The minimum creation date to filter by

Example:

"2023-12-01T05:00:00.401Z"

access_level
enum<string> | null

The access level to filter the members by The access level a given user (or company) has to an access pass or company.

Available options:
no_access,
admin,
customer
access_pass_ids
string[] | null

The access pass IDs to filter the members by

Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "VXNlci0xMA==") or integer (such as 4) input value will be accepted as an ID.

plan_ids
string[] | null

The plan IDs to filter the members by

Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "VXNlci0xMA==") or integer (such as 4) input value will be accepted as an ID.

statuses
enum<string>[] | null

The statuses to filter the members by

promo_code_ids
string[] | null

The promo code IDs to filter the members by

Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "VXNlci0xMA==") or integer (such as 4) input value will be accepted as an ID.

most_recent_actions
enum<string>[] | null

The most recent actions to filter the members by

query
string | null

The name, username, or email to filter the members by. The email filter will only apply if the current actor has the member:email:read permission.

Response

A successful response

The connection type for CompanyMember.

data
object[]
required

A list of nodes.

page_info
object
required

Information to aid in pagination.

I