# `PolarExpress.Services.CustomerPortal.MembersService`
[🔗](https://github.com/jeffhuen/polar_express/blob/main/lib/polar_express/services/customer_portal/members_service.ex#L2)

Members

Members API operations.

# `add_member`

```elixir
@spec add_member(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.CustomerPortalMember.t()}
  | {:error, PolarExpress.Error.t()}
```

Add Member

Add a new member to the customer's team.

Only available to owners and billing managers of team customers.

Rules:
- Cannot add a member with the owner role (there must be exactly one owner)
- If a member with this email already exists, the existing member is returned

See `PolarExpress.Params.CustomerPortal.MembersAddMemberParams` for parameter details.

# `list_members`

```elixir
@spec list_members(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, PolarExpress.ListObject.t()} | {:error, PolarExpress.Error.t()}
```

List Members

List all members of the customer's team.

Only available to owners and billing managers of team customers.

See `PolarExpress.Params.CustomerPortal.MembersListMembersParams` for parameter details.

# `remove_member`

```elixir
@spec remove_member(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, PolarExpress.Error.t()}
```

Remove Member

Remove a member from the team.

Only available to owners and billing managers of team customers.

Rules:
- Cannot remove yourself
- Cannot remove the only owner

See `PolarExpress.Params.CustomerPortal.MembersRemoveMemberParams` for parameter details.

# `update_member`

```elixir
@spec update_member(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.CustomerPortalMember.t()}
  | {:error, PolarExpress.Error.t()}
```

Update Member

Update a member's role.

Only available to owners and billing managers of team customers.

Rules:
- Cannot modify your own role (to prevent self-demotion)
- Customer must have exactly one owner at all times

See `PolarExpress.Params.CustomerPortal.MembersUpdateMemberParams` for parameter details.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
