---
title: "List dynamic segments of an asset"
method: GET
path: "/assets/{asset_id}/dynamic-segments"
tags: ["DynamicSegments"]
---

# List dynamic segments of an asset

`GET /assets/{asset_id}/dynamic-segments`

## Request

- Base URL: `https://enterprise.knak.io/api/published/v1`
- URL: `https://enterprise.knak.io/api/published/v1/assets/{asset_id}/dynamic-segments`
- Auth: none declared
- TypeScript: <https://skmtc.dev/knak/apis/knak-enterprise-api/docs/assets/:asset_id/dynamic-segments/get.ts> (a function with typed inputs; its response is checked against the schema)

List the [dynamic segments](#tag/dynamic_segment) available to an asset. By default this returns both the segments local to the asset and the global segments shared across your company.

## Path parameters

- `asset_id` string, required

## Query parameters

- `filter[scope]` 'local' | 'global' | 'all'
- `page` integer
- `per_page` integer

## Response `200`

OK

- DynamicSegmentList
  - `data` DynamicSegment[]
    - `type` string
    - `id` string
    - `attributes` DynamicSegmentAttributes
      - `id` string
      - `name` string: Unique among the segments on the same asset.
      - `asset_id` string, nullable: The asset this segment belongs to. Null for a global segment, which these endpoints can list but not create, edit, or delete.
      - `is_global` boolean: True when the segment is shared company wide rather than scoped to an asset.
      - `platform_dynamic_segments` PlatformDynamicSegment[]
        - `id` string
        - `platform` string: Not restricted to the platforms accepted on write. Segments authored in the builder for other platforms are returned here, and their `conditional_logic` will have a null `merge_tag_id` on its conditions.
        - `integration_id` string: Id of the [integration](#tag/integration) this platform segment is bound to. **An empty string when no integration is set**, never null.
        - `conditional_logic` DynamicSegmentConjunction: A group of conditions, joined by `and` or `or`.
          - `type` 'condition_set', required
          - `conjunction` 'and' | 'or': How the entries in `children` combine. Absent when the group has no conditions to combine.
          - `children` union[], required: Conditions and nested condition sets.
            - union
              - …
  - `links` object
    - `first` string
    - `last` string
    - `prev` string, nullable
    - `next` string, nullable
  - `meta` object
    - `current_page` integer
    - `from` integer
    - `last_page` integer
    - `links` object[]
      - `url` string, nullable
      - `label` string
      - `active` boolean
    - `path` string
    - `per_page` integer
    - `to` integer
    - `total` integer

## Other responses

- `400`: Bad Request
- `401`: Unauthenticated
- `404`: Not Found
- `422`: Unprocessable Entity. The asset is not an email. This guard runs before the `filter[scope]` match, so it also applies when requesting `global` segments through this route.

---

[API](https://skmtc.dev/knak/apis/knak-enterprise-api.md) - [All operations](https://skmtc.dev/knak/apis/knak-enterprise-api/llms.txt) - [OpenAPI document](https://skmtc.dev/knak/apis/knak-enterprise-api/revisions/31d2c94edfcc?raw)
