> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Member Permissions

> Updates the permission flags for a specific member within a team.

# Update Member Permissions

Updates the permission flags for a single team member, controlling what actions they can perform within the team context — such as making bookings, purchasing products, or accessing community features. Only team administrators can modify permissions. An administrator cannot change their own `IsTeamAdministrator` flag.

## Authentication

Requires a valid customer bearer token. The customer must be a team administrator of the specified team.

## Path Parameters

<ParamField path="teamId" type="number" required>
  Numeric identifier of the team. Returned as `Id` from [`GET /api/public/teams/my`](/api/endpoints/teams/list-teams).
</ParamField>

<ParamField path="memberId" type="number" required>
  Numeric identifier of the member whose permissions are being updated. Returned as `Id` in the `AllTeamMembers` array from [`GET /api/public/teams/   {teamId}/profile`](/api/endpoints/teams/team-details).
</ParamField>

## Request Body

<ParamField body="Id" type="number">
  Member ID (mirrors the path parameter).
</ParamField>

<ParamField body="IsTeamAdministrator" type="boolean" required>
  When `true`, grants the member full administrative rights. Disabled when editing one's own permissions.
</ParamField>

<ParamField body="CanMakeBookings" type="boolean" required>
  When `true`, the member can create bookings.
</ParamField>

<ParamField body="CanBookForTeam" type="boolean" required>
  When `true`, the member can create bookings on behalf of the team.
</ParamField>

<ParamField body="CanPurchaseProducts" type="boolean" required>
  When `true`, the member can purchase products.
</ParamField>

<ParamField body="CanPurchaseEvents" type="boolean" required>
  When `true`, the member can purchase event tickets.
</ParamField>

<ParamField body="CanAccessCommunity" type="boolean" required>
  When `true`, the member can access community features (directory, discussion boards).
</ParamField>

<ParamField body="AccessCardId" type="string">
  Access card identifier for physical access control. Maximum 15 characters.
</ParamField>

## Response

Returns HTTP `200 OK` with an empty body on success.

## Examples

### Grant admin rights and booking permissions

```http theme={null}
PUT /api/public/teams/55/permissions/102
Authorization: Bearer {token}
Content-Type: application/json
```

```json theme={null}
{
  "Id": 102,
  "IsTeamAdministrator": false,
  "CanMakeBookings": true,
  "CanBookForTeam": true,
  "CanPurchaseProducts": true,
  "CanPurchaseEvents": false,
  "CanAccessCommunity": true,
  "AccessCardId": "CARD-00102"
}
```

```
Status: 200 OK
Body: (empty)
```

## TypeScript Integration

```typescript theme={null}
import { endpoints } from '@/api/endpoints'

await httpClient.put(endpoints.teams.permissions(teamId, memberId), {
  IsTeamAdministrator: false,
  CanMakeBookings: true,
  CanBookForTeam: true,
  CanPurchaseProducts: true,
  CanPurchaseEvents: false,
  CanAccessCommunity: true,
})
```

## Usage in Portal

| Context                                               | Source file                                                          |
| ----------------------------------------------------- | -------------------------------------------------------------------- |
| Team permissions modal (`/team/permissions/{teamId}`) | `src/views/user/team/permissions/components/TeamPermissionModal.tsx` |

## Error Responses

<ResponseField name="401 Unauthorized" type="error">
  The customer is not authenticated or the session has expired.
</ResponseField>

<ResponseField name="403 Forbidden" type="error">
  The customer is not an administrator of the specified team.
</ResponseField>

<ResponseField name="400 Bad Request" type="error">
  Invalid request data — for example, `AccessCardId` exceeding 15 characters.
</ResponseField>

<ResponseField name="404 Not Found" type="error">
  Team or member with the specified ID does not exist.
</ResponseField>

## Related Endpoints

| Method   | Endpoint                                          | Description                    |
| -------- | ------------------------------------------------- | ------------------------------ |
| `GET`    | `/api/public/teams/{teamId}/profile`              | Full team profile with members |
| `POST`   | `/api/public/teams/{teamId}/members`              | Add members to a team          |
| `DELETE` | `/api/public/teams/{teamId}/members/{coworkerId}` | Remove a member from a team    |
| `GET`    | `/api/public/teams/my`                            | List the customer's teams      |
