# Assign portfolio segments to a team member.

`POST /teams/members/{sub_user_id}/assigned_segments`

> Wheelhouse Revenue Management API. Web version: https://docs.usewheelhouse.com/rm/reference/rm-post-team-member-assigned-segments · OpenAPI spec: https://docs.usewheelhouse.com/rm/openapi.yaml · Operation ID: `rmPostTeamMemberAssignedSegments` · Tag: Teams

Sets the portfolio segments a team member auto manages listings for, then immediately refreshes their auto managed listing access to match. Replaces any previously assigned segments.

## Request

`POST https://api.usewheelhouse.com/ss_api/v1/teams/members/{sub_user_id}/assigned_segments`

Authentication: send your RM API key in the `X-Integration-Api-Key` header (see https://docs.usewheelhouse.com/rm/authentication.md). Modifies data; read-only keys get `403 Forbidden`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `sub_user_id` | integer | yes | The Wheelhouse internal user ID of the team member. |

### Request body (`application/json`, required)

- `ids` (array of integer, required): Portfolio segment IDs.

### Example request

```bash
curl -X POST 'https://api.usewheelhouse.com/ss_api/v1/teams/members/{sub_user_id}/assigned_segments' \
  -H 'X-Integration-Api-Key: <your RM API key>' \
  -H 'Content-Type: application/json' \
  -d '{
  "ids": [
    0
  ]
}'
```

Only required parameters and body fields are filled in, with placeholder values. Add the optional ones you need from the lists above; some are required in combination, as their descriptions say.

## Responses

### 200

The updated team member.

Body (`application/json`): object `sub_user_response`

A team membership, linking a team owner (`user_id`) and a team member (`sub_user_id`).

- `user_id` (integer): The Wheelhouse internal user ID of the team owner.
- `sub_user_id` (integer): The Wheelhouse internal user ID of the team member.
- `status` (string, one of: `A`, `P`, `I`, `D`): Membership status: `A` active, `P` pending, `I` inactive, `D` declined.
- `user_first_name` (string, nullable): First name of the team owner.
- `user_last_name` (string, nullable): Last name of the team owner.
- `user_email` (string): Email of the team owner.
- `subuser_first_name` (string, nullable): First name of the team member.
- `subuser_last_name` (string, nullable): Last name of the team member.
- `subuser_email` (string): Email of the team member.
- `billing_delegated` (boolean, nullable): Whether the team owner's billing is delegated to the team member.
- `billing_delegated_at` (string (date-time), nullable): When billing was delegated (ISO-8601).
- `auto_managed_listing_level` (string, one of: `N`, `R`, `E`, `F`, `M`): The access level the team member is automatically granted on the owner's listings: `N` disabled, `R` viewer, `E` restricted editor, `F` editor, `M` manager.
- `sub_user_assignments` (array of object): Portfolio segments assigned to the team member for auto managed listing access.
  - `id` (integer): The Wheelhouse internal assignment ID.
  - `sub_user_id` (integer): The Wheelhouse internal `SubUser` record ID this assignment belongs to (distinct from the `sub_user_id` field on the team membership itself).
  - `assignable_id` (integer): The ID of the assigned resource (currently always a portfolio segment ID).
  - `assignable_type` (string): The type of the assigned resource (currently always `PortfolioSegment`).
  - `created_at` (string (date-time)): When the assignment was created (ISO-8601).
  - `updated_at` (string (date-time)): When the assignment was last updated (ISO-8601).

Example shape (generated from the schema; placeholder values, not a real response):

```json
{
  "user_id": 0,
  "sub_user_id": 0,
  "status": "A",
  "user_first_name": "string",
  "user_last_name": "string",
  "user_email": "string",
  "subuser_first_name": "string",
  "subuser_last_name": "string",
  "subuser_email": "string",
  "billing_delegated": true,
  "billing_delegated_at": "2026-01-01T00:00:00Z",
  "auto_managed_listing_level": "N",
  "sub_user_assignments": [
    {
      "id": 0,
      "sub_user_id": 0,
      "assignable_id": 0,
      "assignable_type": "string",
      "created_at": "2026-01-01T00:00:00Z",
      "updated_at": "2026-01-01T00:00:00Z"
    }
  ]
}
```

### 401

API key authorization failed.

### 403

Read-only API key cannot update team members.

### 404

Team member not found, or one or more portfolio segment IDs are not owned by the authenticated user.

### 409

A concurrent request for this team is already in progress. Retry after it completes.

### 429

Rate limit exceeded — the API key has sent too many requests. Wait before retrying. See the **Rate Limits** section in the overview for the recommended exponential backoff strategy.

Body (`application/json`): object

- `error` (string, example: `API token is at rate limit`)

Example shape (generated from the schema; placeholder values, not a real response):

```json
{
  "error": "API token is at rate limit"
}
```
