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

# List segments

`GET /api/v1/segments`

## Request

- Base URL: `https://app.convertflow.co`
- URL: `https://app.convertflow.co/api/v1/segments`
- Auth: HTTP bearer

Returns the website's visitor segments sorted by name, each with its conditions. Region and city conditions carry their comma-separated names in `keyword`, country conditions their ISO alpha-2 codes in `country`. Requires the segments:read scope on OAuth tokens.

## Query parameters

- `name` string

## Response `200`

segments returned, filtered by name when given

- object[]
  - `id` integer
  - `name` string
  - `website_id` integer
  - `conditions` object[]
    - `id` integer
    - `condition_type` string
    - `operator` string
    - `keyword` string, nullable
    - `country` string, nullable
    - `url` string, nullable
    - `count` integer
    - `condition_cta` integer
    - `tag_id` integer, nullable
    - `data` object
      - `device` string
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `403`: token lacks the segments:read scope

---

[API](https://skmtc.dev/convertflow/apis/convertflow-api.md) - [All operations](https://skmtc.dev/convertflow/apis/convertflow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/convertflow/apis/convertflow-api/revisions/9a45e0736b68?raw)
