# List members

> Source: https://elaichi.ai/docs/api-reference/members/member/listmembers/

`GET /member`

Resource: **Member** · API: **Members**

## Query parameters

- **`q`** _(string)_
  Case-insensitive substring match on the member's name or email. LIKE wildcards are matched literally. Max 200 characters.
- **`role_id`** _(string)_
  Only members holding this role (`role_…`) — where a role's `member_count` leads. Combines with `q`; a `q` matching more members than the search ceiling answers 400 rather than a partial list.
- **`second_factor`** _(string)_
  Only `none`: members who hold neither an authenticator app nor a passkey — the list behind `GET /organization/{id}/security-summary`'s `members_without_second_factor`, answered by the same predicate. Server-side and keyset-paginated like any other filter; combines with `q`, not with `role_id` (400). Requires `org:manage`.
  Allowed: `none`

## Response body

- **`result`** _(array<object>)_
  - **`user_id`** _(string)_
    User id (`usr_…`). A membership has no id of its own.
  - **`status`** _(string)_
    Only `active` members can act in the organization.
  - **`via`** _(string,null)_
    How they joined — invite, verified domain, SCIM, and so on.
  - **`joined_at`** _(string)_
  - **`roles`** _(array<object>)_
    Roles held. Replace the whole set with `PATCH /member/{userId}`.
    - **`id`** _(string)_
      Role id (`role_…`).
    - **`name`** _(string)_
    - **`is_system`** _(boolean)_
    - **`seat_class`** _(string)_
      Allowed: `billable`, `free_admin`
  - **`teams`** _(array<object>)_
    - **`id`** _(string)_
      Team id (`team_…`).
    - **`name`** _(string)_
  - **`user`** _(object,null)_
    Global profile. Null when the profile row could not be resolved.
- **`next_cursor`** _(string,null)_
- **`prev_cursor`** _(string,null)_

## Code examples

### curl

```bash
curl -X GET 'https://api.elaichi.ai/member' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/member', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/member"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())
```
