---
title: "List groups"
method: GET
path: "/segments"
tags: ["groups"]
---

# List groups

`GET /segments`

Returns a list of groups in a paginated manner. Each object in the `collection` represents a Group.
This endpoint should always return a result even if there are zero groups in the collection.

## Query parameters

- `per_page` integer
- `ending_before` string
- `starting_after` string
- `scopes` object

## Response `200`

OK

- object
  - `per_page` integer — Number of objects that are present in the collection.
  - `total` integer — Total number of objects.
  - `links` object
    - `previous` string, nullable — Link to the previous set of results.
    - `next` string, nullable — Link to the next set of results.
  - `collection` Group[]
    - `id` integer — The ID of the resource.
    - `created_at` string, date-time — The date and time when the resource was created.
    - `updated_at` string, date-time — The date and time when the resource was last updated.
    - `name` string — The name of the group.
    - `subscribers_in_segment` integer — Number of subscribers inside the group.

## Other responses

- `401` — Unauthorized
- `default` — Unexpected error

---

[API](https://skmtc.net/mailbadger/apis/mailbadger-api.md) · [All operations](https://skmtc.net/mailbadger/apis/mailbadger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mailbadger/mailbadger-api/versions/3a7ef49250a1/schema)
