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

# Teams

> How to list teams and team members using the API

<Info>Before you start, ensure that you have an [API Key](./api-keys) with `Teams -> Read` permission</Info>

## Listing Your Teams

Retrieve the teams you belong to using the `GET /user/teams` endpoint.

```bash theme={null}
curl --request GET \
  --url 'https://api.primeintellect.ai/api/v1/user/teams' \
  --header 'Authorization: Bearer your_api_key'
```

This is a paginated request with a default `limit` of **100** results. Use query parameters to adjust:

```bash theme={null}
curl --request GET \
  --url 'https://api.primeintellect.ai/api/v1/user/teams?offset=0&limit=50' \
  --header 'Authorization: Bearer your_api_key'
```

### Response

```json theme={null}
{
  "total_count": 2,
  "offset": 0,
  "limit": 50,
  "data": [
    {
      "teamId": "clvb0itli0000oxevorvgrpfn",
      "name": "My Team",
      "slug": "my-team",
      "role": "ADMIN",
      "createdAt": "2025-01-15T10:30:00.000000"
    },
    {
      "teamId": "clvb1jtmk0001pxfv1abc2def",
      "name": "Research Lab",
      "slug": "research-lab",
      "role": "MEMBER",
      "createdAt": "2025-02-01T14:20:00.000000"
    }
  ]
}
```

### Response Fields

| Field       | Type   | Description                                    |
| ----------- | ------ | ---------------------------------------------- |
| `teamId`    | string | Unique team identifier                         |
| `name`      | string | Team display name                              |
| `slug`      | string | Team URL slug                                  |
| `role`      | string | Your role in the team (`ADMIN` or `MEMBER`)    |
| `createdAt` | string | ISO 8601 timestamp of when you joined the team |

## Listing Team Members

Retrieve the members of a team using the `GET /teams/{team_id}/members` endpoint. You must be a member of the team to access this endpoint.

```bash theme={null}
curl --request GET \
  --url 'https://api.primeintellect.ai/api/v1/teams/{team_id}/members' \
  --header 'Authorization: Bearer your_api_key'
```

This is a paginated request with a default `limit` of **100** results. Use query parameters to adjust:

```bash theme={null}
curl --request GET \
  --url 'https://api.primeintellect.ai/api/v1/teams/{team_id}/members?offset=0&limit=50' \
  --header 'Authorization: Bearer your_api_key'
```

### Response

```json theme={null}
{
  "total_count": 2,
  "offset": 0,
  "limit": 50,
  "data": [
    {
      "userId": "clvb0itli0000oxevorvgrpfn",
      "userName": "Alice",
      "userEmail": "alice@example.com",
      "role": "ADMIN",
      "joinedAt": "2025-01-15T10:30:00.000000"
    },
    {
      "userId": "clvb1jtmk0001pxfv1abc2def",
      "userName": "Bob",
      "userEmail": "bob@example.com",
      "role": "MEMBER",
      "joinedAt": "2025-02-01T14:20:00.000000"
    }
  ]
}
```

### Response Fields

| Field       | Type   | Description                                         |
| ----------- | ------ | --------------------------------------------------- |
| `userId`    | string | Unique user identifier                              |
| `userName`  | string | User's display name                                 |
| `userEmail` | string | User's email address                                |
| `role`      | string | Team role (`ADMIN` or `MEMBER`)                     |
| `joinedAt`  | string | ISO 8601 timestamp of when the user joined the team |

<Tip>You can find your `teamId` on your [Team's Profile page](https://app.primeintellect.ai/dashboard/team-profile) or by calling `GET /user/teams`.</Tip>
