> ## 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.

# List User Teams

> Returns the teams the authenticated customer belongs to, optionally filtered to admin-only teams.

# List User Teams

Returns a paginated list of teams the authenticated customer belongs to. Pass `isTeamAdmin=true` to restrict the results to teams where the customer has admin rights — used across the portal to gate management interfaces. Pass `isTeamAdmin=false` to return all teams regardless of role.

<Note>
  A **team** is a group of customers within a coworking location that can share resources, bookings, and billing. The portal maps teams to companies
  or departments that co-habit a space.
</Note>

## Authentication

Requires a valid customer bearer token. The response is automatically scoped to the authenticated customer — no additional filtering is needed.

## Query Parameters

<ParamField query="isTeamAdmin" type="boolean" required>
  `true` — return only teams where the customer is an administrator. `false` — return all teams the customer belongs to (admins and members).
</ParamField>

<ParamField query="teamId" type="number">
  Filter results to a single team by its numeric ID. When omitted, returns all teams matching the `isTeamAdmin` filter.
</ParamField>

<ParamField query="_shape" type="string">
  Comma-separated dot-notated field paths to include in the response. When provided, only the
  specified fields are returned — useful for reducing payload size. **Example**:
  `_shape=Records.Id,Records.Name,Records.TeamMembersCount`
</ParamField>

<ParamField query="_page" type="number">
  1-based page number. **Default**: `1`
</ParamField>

<ParamField query="_pageSize" type="number">
  Records per page. **Default**: `25` · **Maximum**: `100`
</ParamField>

<ParamField query="_orderBy" type="string">
  Response field to sort by. **Default**: `Name`
</ParamField>

<ParamField query="_sortDirection" type="string">
  `asc` or `desc`. **Default**: `asc`
</ParamField>

## Response

Returns the standard `ApiListResult<Team>` envelope (see [API Overview](/api/overview) for pagination fields). The `Records` array contains team objects.

### Core Fields

<ResponseField name="Records[].Id" type="number" required>
  Unique integer identifier for the team. Use this as `{teamId}` in all team-scoped endpoints.
</ResponseField>

<ResponseField name="Records[].Name" type="string" required>
  Display name of the team.
</ResponseField>

<ResponseField name="Records[].UniqueId" type="string">
  UUID for the team — stable across renames and useful as a cache key.
</ResponseField>

<ResponseField name="Records[].IdString" type="string">
  String cast of `Id`. Provided for environments that lose integer precision (e.g., JavaScript `JSON.parse` on 64-bit IDs).
</ResponseField>

### Profile Fields

<ResponseField name="Records[].Description" type="string | null">
  Full-length team description. May contain HTML.
</ResponseField>

<ResponseField name="Records[].ProfileSummary" type="string">
  Short tagline shown in team cards and selectors.
</ResponseField>

<ResponseField name="Records[].ProfileIsPublic" type="boolean">
  When `true`, the team profile is visible in the public member directory.
</ResponseField>

<ResponseField name="Records[].ProfileWebsite" type="string | null">
  Team website URL.
</ResponseField>

<ResponseField name="Records[].ProfileTags" type="string">
  Space-separated tag string. Use `ProfileTagsList` for array access.
</ResponseField>

<ResponseField name="Records[].ProfileTagsList" type="string[]">
  Pre-split array of tag strings derived from `ProfileTags`.
</ResponseField>

### Location

<ResponseField name="Records[].BusinessName" type="string">
  Name of the coworking location this team belongs to.
</ResponseField>

<ResponseField name="Records[].BusinessHomeUrl" type="string">
  URL of the coworking location's home page.
</ResponseField>

### Social Media

All social fields are `string | null`. Provide a full URL (e.g., `https://twitter.com/handle`) unless stated otherwise.

| Field       | Description               |
| ----------- | ------------------------- |
| `Twitter`   | X / Twitter profile URL   |
| `Facebook`  | Facebook page URL         |
| `Linkedin`  | LinkedIn company page URL |
| `Instagram` | Instagram profile URL     |
| `Github`    | GitHub org or user URL    |
| `Pinterest` | Pinterest profile URL     |
| `Skype`     | Skype username            |
| `Telegram`  | Telegram handle           |
| `Flickr`    | Flickr profile URL        |
| `Vimeo`     | Vimeo channel URL         |
| `Tumblr`    | Tumblr blog URL           |
| `Blogger`   | Blogger profile URL       |

### Members

<ResponseField name="Records[].TeamMembersCount" type="number">
  Total count of active members (admins + regular members).
</ResponseField>

<ResponseField name="Records[].TeamAdministratorsFullNames" type="string[]">
  Display names of all team admins — useful for a quick summary without loading full `Customer` objects.
</ResponseField>

<ResponseField name="Records[].TeamAdministrators" type="Coworker[]">
  Full `Coworker` objects for admins only.
</ResponseField>

<ResponseField name="Records[].TeamMembers" type="Coworker[]">
  Full `Coworker` objects for non-admin members.
</ResponseField>

<ResponseField name="Records[].AllTeamMembers" type="Coworker[]">
  Combined `Coworker` objects for all members (admins + regular). Use this instead of merging the two arrays above.
</ResponseField>

### Billing & Configuration

<ResponseField name="Records[].PayingMemberId" type="number | null">
  Customer ID of the member who receives consolidated invoices, if `CreateSingleInvoiceForTeam` is `true`.
</ResponseField>

<ResponseField name="Records[].CreateSingleInvoiceForTeam" type="boolean">
  When `true`, all team charges are rolled into a single invoice addressed to `PayingMemberId`.
</ResponseField>

<ResponseField name="Records[].MaxTeamMemberCount" type="number | null">
  Maximum allowed members. `null` means unlimited.
</ResponseField>

<ResponseField name="Records[].HasContactDetails" type="boolean">
  Whether billing/contact details have been configured for this team.
</ResponseField>

<ResponseField name="Records[].HasDefaultPlan" type="boolean">
  Whether the team has a default membership plan assigned.
</ResponseField>

<ResponseField name="Records[].DefaultTariffId" type="number | null">
  ID of the default membership plan assigned to new team members. `null` if no default plan is set.
</ResponseField>

<ResponseField name="Records[].DefaultTariffName" type="string | null">
  Display name of the default membership plan.
</ResponseField>

<ResponseField name="Records[].DefaultMemberTariffKeepNewAccountsOnHold" type="boolean">
  When `true`, new members added to the team are placed on hold until manually activated.
</ResponseField>

<ResponseField name="Records[].DisableAttendaceDashboard" type="boolean">
  When `true`, the attendance dashboard is hidden for this team. Note the typo in the field name (`Attendace`) — it is preserved as-is in the API.
</ResponseField>

<ResponseField name="Records[].DiscountCharges" type="number | null">
  Percentage discount applied to charges for team members.
</ResponseField>

<ResponseField name="Records[].DiscountExtraServices" type="number | null">
  Percentage discount applied to extra services for team members.
</ResponseField>

<ResponseField name="Records[].DiscountTariffs" type="number | null">
  Percentage discount applied to membership plans for team members.
</ResponseField>

<ResponseField name="Records[].DiscountTimePasses" type="number | null">
  Percentage discount applied to time passes for team members.
</ResponseField>

<ResponseField name="Records[].HasCommunityGroup" type="boolean">
  When `true`, the team has an associated community discussion group.
</ResponseField>

<ResponseField name="Records[].GoogleMapsLink" type="string | null">
  Google Maps link for the team's location.
</ResponseField>

### Media

<ResponseField name="Records[].HasTeamLogo" type="boolean">
  `true` if the team has an uploaded logo. Construct the logo URL as: `https://[space].spaces.nexudus.com/api/public/teams/{Id}/logo`
</ResponseField>

<ResponseField name="Records[].HasImage1" type="boolean">
  `true` if profile image 1 has been uploaded.
</ResponseField>

<ResponseField name="Records[].HasImage2" type="boolean">
  `true` if profile image 2 has been uploaded.
</ResponseField>

<ResponseField name="Records[].HasImage3" type="boolean">
  `true` if profile image 3 has been uploaded.
</ResponseField>

<ResponseField name="Records[].HasImages" type="boolean">
  Convenience flag — `true` if any of the three profile images are present.
</ResponseField>

### Timestamps

All datetime fields are ISO 8601 strings. `*On` fields are in the location's local timezone; `*OnUtc` fields are UTC.

<ResponseField name="Records[].CreatedOn" type="string">
  Local datetime the team was created.
</ResponseField>

<ResponseField name="Records[].CreatedOnUtc" type="string">
  UTC datetime the team was created.
</ResponseField>

<ResponseField name="Records[].UpdatedOn" type="string">
  Local datetime of the last update.
</ResponseField>

<ResponseField name="Records[].UpdatedOnUtc" type="string">
  UTC datetime of the last update.
</ResponseField>

## Examples

### Fetch admin teams (full payload)

```http theme={null}
GET /api/public/teams/my?isTeamAdmin=true
Authorization: Bearer {token}
```

```json theme={null}
{
  "Records": [
    {
      "Id": 55,
      "Name": "Tech Innovators",
      "Description": "A collaborative team focused on cutting-edge technology solutions",
      "ProfileSummary": "Building the future, one innovation at a time",
      "ProfileIsPublic": true,
      "ProfileWebsite": "https://techinnovators.example.com",
      "ProfileTags": "technology startup innovation collaboration",
      "ProfileTagsList": ["technology", "startup", "innovation", "collaboration"],
      "BusinessName": "Downtown Coworking Hub",
      "BusinessHomeUrl": "https://downtown-hub.example.com",
      "Twitter": "https://twitter.com/techinnovators",
      "Facebook": null,
      "Linkedin": "https://linkedin.com/company/techinnovators",
      "Instagram": null,
      "Github": "https://github.com/techinnovators",
      "Pinterest": null,
      "Skype": null,
      "Telegram": null,
      "Flickr": null,
      "Vimeo": null,
      "Tumblr": null,
      "Blogger": null,
      "TeamMembersCount": 12,
      "TeamAdministratorsFullNames": ["Jane Smith", "John Doe"],
      "TeamAdministrators": [{ "Id": 101, "FullName": "Jane Smith", "Email": "jane@techinnovators.com" }],
      "TeamMembers": [{ "Id": 102, "FullName": "Bob Wilson", "Email": "bob@techinnovators.com" }],
      "AllTeamMembers": [
        { "Id": 101, "FullName": "Jane Smith", "Email": "jane@techinnovators.com" },
        { "Id": 102, "FullName": "Bob Wilson", "Email": "bob@techinnovators.com" }
      ],
      "PayingMemberId": 101,
      "CreateSingleInvoiceForTeam": true,
      "HasContactDetails": true,
      "HasDefaultPlan": true,
      "MaxTeamMemberCount": 20,
      "DisableAttendaceDashboard": false,
      "HasTeamLogo": true,
      "HasImage1": true,
      "HasImage2": false,
      "HasImage3": false,
      "HasImages": true,
      "Id": 55,
      "IdString": "55",
      "UniqueId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "CreatedOn": "2024-01-15T09:30:00",
      "UpdatedOn": "2024-07-20T14:22:33",
      "CreatedOnUtc": "2024-01-15T09:30:00Z",
      "UpdatedOnUtc": "2024-07-20T14:22:33Z"
    }
  ],
  "CurrentPageSize": 1,
  "CurrentPage": 1,
  "CurrentOrderField": "Name",
  "CurrentSortDirection": "asc",
  "FirstItem": 1,
  "HasNextPage": false,
  "HasPreviousPage": false,
  "LastItem": 1,
  "PageNumber": 1,
  "PageSize": 25,
  "TotalItems": 1,
  "TotalPages": 1
}
```

### Fetch all teams with a minimal field set

Use `_shape` to return only the fields your UI needs, reducing payload size significantly.

```http theme={null}
GET /api/public/teams/my?isTeamAdmin=false&_shape=Records.Id,Records.Name,Records.TeamMembersCount
Authorization: Bearer {token}
```

```json theme={null}
{
  "Records": [
    { "Id": 55, "Name": "Tech Innovators", "TeamMembersCount": 12 },
    { "Id": 67, "Name": "Marketing Team", "TeamMembersCount": 8 },
    { "Id": 89, "Name": "Design Studio", "TeamMembersCount": 5 }
  ],
  "CurrentPageSize": 3,
  "CurrentPage": 1,
  "CurrentOrderField": "Name",
  "CurrentSortDirection": "asc",
  "FirstItem": 1,
  "HasNextPage": false,
  "HasPreviousPage": false,
  "LastItem": 3,
  "PageNumber": 1,
  "PageSize": 25,
  "TotalItems": 3,
  "TotalPages": 1
}
```

## TypeScript Integration

The portal types this response as `TeamList` (from `src/types/endpoints/TeamList.ts`) and accesses it through the `endpoints.teams` helper:

```typescript theme={null}
import { endpoints } from '@/api/endpoints'
import { TeamList } from '@/types/endpoints/TeamList'
import { useData } from '@/hooks/useData'

// Minimal selector data (team switcher dropdowns, nav menus)
const { resource: adminTeams } = useData<TeamList>(
  httpClient,
  endpoints.teams.list(true), // isTeamAdmin=true
  { shape: { fields: ['Records.Id', 'Records.Name'] } },
)

// Richer data for management pages
const { resource: allTeams } = useData<TeamList>(
  httpClient,
  endpoints.teams.list(false), // isTeamAdmin=false
  {
    shape: {
      fields: ['Records.Id', 'Records.Name', 'Records.ProfileSummary', 'Records.TeamMembersCount'],
    },
  },
)
```

## Usage in Portal

The `isTeamAdmin` flag drives a clear permission split across the portal:

| Context                      | `isTeamAdmin` | Source file                                                                                          |
| ---------------------------- | :-----------: | ---------------------------------------------------------------------------------------------------- |
| Team Dashboard team-switcher |     `true`    | `src/views/user/dashboards/team/TeamDashboardPage.tsx`                                               |
| Team Profile editor          |     `true`    | `src/views/user/team/profile/TeamProfessionalProfilePage.tsx`                                        |
| Team Permissions management  |     `true`    | `src/views/user/team/permissions/TeamPermissionsPage.tsx`                                            |
| Team Attendance management   |     `true`    | `src/views/user/team/attendance/AttendanceManagementPage.tsx`                                        |
| Global navigation menu       |     `true`    | `src/states/useMenuItems.tsx`                                                                        |
| Team Attendance dashboard    |    `false`    | `src/views/user/team/attendance/AttendanceDashboardPage.tsx`                                         |
| Attendance management        |     `true`    | `src/views/user/team/attendance/AttendanceManagementPage.tsx`                                        |
| My Bookings team selector    |    `false`    | `src/views/user/activity/bookings/MyBookingsSection.tsx`                                             |
| Booking visitors             |    `false`    | `src/views/public/checkout/booking/components/BookingVisitors.tsx`                                   |
| Onboarding profile action    |    `false`    | `src/views/user/dashboards/personal/components/OnBoarding/components/CompleteProfileActionPanel.tsx` |
| Team members section         |    `false`    | `src/views/user/team/members/TeamMembersSection.tsx`                                                 |

## Error Responses

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

<ResponseField name="400 Bad Request" type="error">
  A query parameter value is invalid — for example, a non-boolean `isTeamAdmin` or an out-of-range `_pageSize`.
</ResponseField>

## Related Endpoints

| Method   | Endpoint                                          | Description                      |
| -------- | ------------------------------------------------- | -------------------------------- |
| `GET`    | `/api/public/teams/{teamId}/profile`              | Full profile for a single team   |
| `PUT`    | `/api/public/teams/{teamId}/profile`              | Update team profile (admin only) |
| `GET`    | `/api/public/teams/{teamId}/kpi`                  | Team KPI metrics                 |
| `GET`    | `/api/public/teams/{teamId}/attendance`           | Team attendance data             |
| `GET`    | `/api/public/teams/{teamId}/metrics`              | Team performance metrics         |
| `POST`   | `/api/public/teams/{teamId}/members`              | Add members to a team            |
| `DELETE` | `/api/public/teams/{teamId}/members/{coworkerId}` | Remove a member from a team      |
