# list_workspace_members

Source: https://modulify.ai/docs/api/workspaces/list-workspace-members

Lists the members of a workspace and its pending invitations, with each person's name, email, role and when they joined.

- Title: List the people in a workspace
- Scope: `workspaces:read`
- Access: Read only
- Endpoint: `POST /v1/list_workspace_members`

Every member tool takes a `memberId` from here, and an invitation carries an `inviteId` instead, both being the row's `_id`. A pending invitation shows the `Status` `pending` and the name `Invited User`.

Search by name or email with `term`, narrow the list with `role`, and page with `offset` and `limit`. The answer states the total, so you can tell when you have every row. See [Members and roles](https://modulify.ai/docs/reference/members-and-roles#read-the-members-table).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/list_workspace_members`, sending the inputs below as a JSON object. The token needs the `workspaces:read` scope.

It only reads and changes nothing, so retrying it is safe.

```bash
curl -X POST https://api.modulify.ai/v1/list_workspace_members \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"workspaceId":"WORKSPACE_ID"}'
```

Over MCP, the same method is the [list_workspace_members tool](https://modulify.ai/docs/mcp/workspaces/list-workspace-members).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | string | Yes | The workspace id, from `list_workspaces`. |
| `term` | string | No | Matches part of a name or an email address. |
| `role` | string | No | Keeps one group: `pending` for invitations, `accepted` for everyone who has joined, `owner`, `member`, or a custom role's id. |
| `sort` | string | No | `newest` puts the most recently added first. Anything else, or leaving it out, puts the oldest first. |
| `offset` | integer | No | How many to skip, for paging. |
| `limit` | integer | No | How many to return. Defaults to 8 and is capped at 120. |

## Response

Every call answers with the [JSON envelope](https://modulify.ai/docs/api/requests-and-responses#the-response) of `success`, `message`, `data`, `code` and `version`. `data` holds the result described above, and on a method that returns a total, `count` carries it. The [response headers](https://modulify.ai/docs/api/requests-and-responses#headers-on-every-method-call) carry the call's `X-Request-Id` and what is left of your per-minute budget in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. [Errors](https://modulify.ai/docs/api/errors) explains every status code a call can answer with.