# Members

## Manage members

You can add and remove members to a feed. This is useful for building communities where a set of users can add content to the feed.

It's not possible to set/update member role on client-side. Use server-side SDKs for this. When adding members client-side all new members will have `feed_member` role:

```dart label="Dart"
// The following methods are available to edit the members of a feed
final result = await feed.updateFeedMembers(
  request: const UpdateFeedMembersRequest(
    members: [
      FeedMemberRequest(
        custom: {'joined': '2024-01-01'},
        userId: 'john',
      ),
    ],
    operation: UpdateFeedMembersRequestOperation.upsert,
  ),
);

// Remove members
await feed.updateFeedMembers(
  request: const UpdateFeedMembersRequest(
    members: [
      FeedMemberRequest(userId: 'john'),
      FeedMemberRequest(userId: 'jane'),
    ],
    operation: UpdateFeedMembersRequestOperation.remove,
  ),
);

// Set members (overwrites the list)
await feed.updateFeedMembers(
  request: const UpdateFeedMembersRequest(
    members: [FeedMemberRequest(userId: 'john')],
    operation: UpdateFeedMembersRequestOperation.set,
  ),
);
```

## Overview of the feed member model

<h3 id="FeedMemberResponse"><a href="#FeedMemberResponse">FeedMemberResponse</a></h3><table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Constraints</th></tr></thead><tbody><tr><td><code>created_at</code></td><td><code>number</code></td><td>When the membership was created</td><td>Required</td></tr><tr><td><code>custom</code></td><td><code>object</code></td><td>Custom data for the membership</td><td>-</td></tr><tr><td><code>invite_accepted_at</code></td><td><code>number</code></td><td>When the invite was accepted</td><td>-</td></tr><tr><td><code>invite_rejected_at</code></td><td><code>number</code></td><td>When the invite was rejected</td><td>-</td></tr><tr><td><code>membership_level</code></td><td><code>MembershipLevelResponse</code></td><td>Membership level assigned to the member</td><td>-</td></tr><tr><td><code>role</code></td><td><code>string</code></td><td>Role of the member in the feed</td><td>Required</td></tr><tr><td><code>status</code></td><td><code>string (member, pending, rejected)</code></td><td>Status of the membership. One of: member, pending, rejected</td><td>Required</td></tr><tr><td><code>updated_at</code></td><td><code>number</code></td><td>When the membership was last updated</td><td>Required</td></tr><tr><td><code>user</code></td><td><code>UserResponse</code></td><td>User who is a member</td><td>Required</td></tr></tbody></table>

## Feed members vs followers

Followers and members might seem like similar concepts, but they serve two different purposes with some key differences.

<b>Followers</b> can only be feeds (for example the `timeline` feed of Alice follows the `user` feed of Bob). Followers' aim is to access the content of a feed they're interested in and interact with it.

<b>Members</b> can only be users (for example Alice adds Bob as a member to her feed about "Travel Hacks"). The aim of feed members is usually to help out with admin tasks (helpful if you want to build apps similar to Facebook pages) or to decide what activities a user has access to using membership levels (for example Bob becomes a premium member in Alice's community).

## Member invites

You can invite members with the `invite` flag, where invited users can accept or reject the membership.

```dart label="Dart"
// Request to become a member
await feed.updateFeedMembers(
  request: const UpdateFeedMembersRequest(
    members: [
      FeedMemberRequest(
        custom: {'reason': 'community builder'},
        invite: true,
        userId: 'john',
      ),
    ],
    operation: UpdateFeedMembersRequestOperation.upsert,
  ),
);

// Accept and reject member requests
await feed.acceptFeedMember();
await feed.rejectFeedMember();
```

## Query Feed Members

You can query the members of a feed. This is useful for showing the list of members in a community.

```js label="JavaScript"
await feed.queryFeedMembers({
  filter: {
    role: "moderator",
  },
});
```

## Feed Members Queryable Built-in Fields

| name         | type                                              | description                                    | supported operations                | example                                                    |
| ------------ | ------------------------------------------------- | ---------------------------------------------- | ----------------------------------- | ---------------------------------------------------------- |
| `user_id`    | string or list of strings                         | The ID of the user who is a member of the feed | `$in`, `$eq`                        | `{ user_id: { $eq: 'user_123' } }`                         |
| `role`       | string or list of strings                         | The role of the member                         | `$in`, `$eq`                        | `{ role: { $in: [ 'admin', 'moderator', 'member' ] } }`    |
| `status`     | string or list of strings                         | The membership status                          | `$in`, `$eq`                        | `{ status: { $in: [ 'member', 'pending', 'rejected' ] } }` |
| `created_at` | string, must be formatted as an RFC3339 timestamp | The time the membership was created            | `$eq`, `$gt`, `$gte`, `$lt`, `$lte` | `{ created_at: { $gte: '2023-12-04T09:30:20.45Z' } }`      |
| `updated_at` | string, must be formatted as an RFC3339 timestamp | The time the membership was last updated       | `$eq`, `$gt`, `$gte`, `$lt`, `$lte` | `{ updated_at: { $gte: '2023-12-04T09:30:20.45Z' } }`      |


---

This page was last updated at 2026-08-07T20:37:29.549Z.

For the most recent version of this documentation, visit [https://getstream.io/activity-feeds/docs/flutter/feed-members/](https://getstream.io/activity-feeds/docs/flutter/feed-members/).