---
title: "Retrieve list of segments"
method: GET
path: "/audiences/{audienceId}/segments"
tags: ["Segments"]
---

# Retrieve list of segments

`GET /audiences/{audienceId}/segments`

Retrieve a list of segments.

## Path parameters

- `audienceId` integer, required

## Response `200`

successful operation

- Segment[]
  - `audienceId` string, integer
  - `id` string, integer
  - `name` string
  - `realtime` boolean — Whether the segment is realtime segment or not
  - `kind` integer — 0: batch, 1: realtime, 2: funnel_stage
  - `description` string, nullable
  - `segmentFolderId` string, integer
  - `population` integer, nullable
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `createdBy` User
    - `id` string
    - `td_user_id` string
    - `name` string
  - `updatedBy` User
    - `id` string
    - `td_user_id` string
    - `name` string
  - `rule` union
    - union
      - EmptyCondition
      - AndCondition
        - `type` 'And', required
        - `conditions` Condition[], required
          - union
            - AndCondition — recursive
            - OrCondition
              - …
            - ValueCondition
              - …
            - ReferenceCondition
              - …
      - OrCondition
        - `type` 'Or', required
        - `conditions` Condition[], required
          - union
            - AndCondition
              - …
            - OrCondition — recursive
            - ValueCondition
              - …
            - ReferenceCondition
              - …
      - CompositeCondition
        - `type` 'Composite', required
        - `conditions` Condition[], required
          - union
            - AndCondition
              - …
            - OrCondition
              - …
            - ValueCondition
              - …
            - ReferenceCondition
              - …
        - `expr` string, required
    - union
      - PartialV5RuleYamlV5IonRuleIonRule
        - `conditions` PartialV5RuleYamlV5IonRuleValueConditionSet[], required
          - `conditions` union[], required
            - union
              - …
          - `description` string
          - `expr` string
          - `type` 'Or' | 'And' | 'Composite', required
        - `expr` string
        - `limit` PartialV5RuleYamlV5IonRuleValueLimit
          - `number` number, required
          - `orderColumns` union[]
            - union
              - …
          - `type` 'Count' | 'Percent', required
        - `type` 'Or' | 'And' | 'Composite', required
      - object, nullable

## Other responses

- `400` — Given parameters are not valid
- `401` — Unauthorized; You don't provide valid credentials. Maybe you didn't specify valid TD's Master API Key as 'TD1 {Your TD Master API Key}'.
- `403` — Requested resource or action is not allowed because you don't have sufficient permissions
- `404` — The specified resource was not found
- `4XX` — There is a high possibility of error of the authentication system. Please check the contents and authority of the key. Please contact the TD support team if you do not resolve it.
- `5XX` — System error. Because there is a possibility of a temporary error due to network trouble and so on, we recommend several times retry on request side. Please contact the TD support team if you do not resolve it.

---

[API](https://skmtc.net/treasure/apis/cdp-api.md) · [All operations](https://skmtc.net/treasure/apis/cdp-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/treasure/cdp-api/revisions/24caa8eb809b/schema)
