---
title: "SegmentList"
method: GET
path: "/api/segment"
tags: ["Segment"]
---

# SegmentList

`GET /api/segment`

## Request

- Base URL: `https://api.lytics.io`
- URL: `https://api.lytics.io/api/segment`
- Auth: API key in header `Authorization`

Get list of **Segments** .   Segments can refer to any Table.

The two main tables you will be working with are *User* and *Content*.

```
# Grab all segments from "user" table

curl "$LIOAPI/api/segment" -s -H "Authorization: $LIOKEY" | jq '.'

# Grab all "Content Collections" (ney, segments)

curl "$LIOAPI/api/segment?table=content" -s -H "Authorization: $LIOKEY" | jq '.'


```

## Query parameters

- `account_id` string
- `table` string
- `valid` string

## Response `200`

OK

- SegmentListModel
  - `data` object[]
    - `id` string
    - `account_id` string
    - `author_id` string
    - `kind` string
    - `segment_ql` string
    - `created` string
    - `updated` string
    - `description` string
    - `is_public` boolean
    - `name` string
    - `slug_name` string
    - `tags` string[]

---

[API](https://skmtc.dev/lytics/apis/v1-lytics-api.md) - [All operations](https://skmtc.dev/lytics/apis/v1-lytics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lytics/apis/v1-lytics-api/revisions/339fd1d88486?raw)
