---
title: "List user segments"
method: GET
path: "/api/v1/user/segments"
tags: ["User"]
---

# List user segments

`GET /api/v1/user/segments`

## Query parameters

- `pinned` '0' | '1'
- `limit` integer

## Response `200`

Segments list with tier_max

- UserSegmentListResponse
  - `count` integer, required
  - `tier_max` integer, required
  - `segments` UserSegment[], required
    - `id` integer
    - `user_id` integer
    - `name` string
    - `description` string
    - `filters_json` string
    - `filters` UserSegmentStoredFilters — Read-only decoded filters_json from an existing segment. New writes must use UserSegmentFilters. Historic records may still contain removed keys such as forma or estado; clients must present them as unavailable and execution fails closed rather than ignoring them.
    - `persona` string, nullable
    - `icon` string, nullable
    - `pinned` union
      - integer
      - boolean
    - `created_at` string
    - `updated_at` string

## Other responses

- `400` — Invalid request
- `401` — Authentication required (no active session)
- `422` — The query is lexically valid but outside a documented numeric or length bound, or uses an unsupported indexed combination.

---

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