---
title: "List team groups"
method: GET
path: "/v1/analytics/team-groups"
tags: ["Analytics"]
---

# List team groups

`GET /v1/analytics/team-groups`

## Request

- Base URL: `https://api.magnific.com`
- URL: `https://api.magnific.com/v1/analytics/team-groups`
- Auth: API key in header `x-magnific-api-key`

Returns all groups within the caller's team with their ID, name,
and member count. Use the returned `group_id` values as filters in
`POST /v1/analytics/team-credit-usage`.

Authenticates via API key (`X-Magnific-API-Key` header). The caller's team
is resolved automatically from the API key.

## Response `200`

OK

- V1AnalyticsTeamGroupsGet200Response
  - `data` TeamGroup[]
    - `group_id` integer: Group identifier. Use in `group_ids` filter of team-credit-usage.
    - `name` string: Group name.
    - `member_count` integer: Number of members in this group.

## Other responses

- `403`: Forbidden - The client does not have permission to access the requested resource.
- `500`: Internal Server Error - The server has encountered a situation it doesn't know how to handle.

---

[API](https://skmtc.dev/magnific/apis/magnific-api.md) · [All operations](https://skmtc.dev/magnific/apis/magnific-api/llms.txt) · [OpenAPI document](https://skmtc.dev/magnific/apis/magnific-api/revisions/60711fb082c7?raw)
