---
title: "Get Segment"
method: GET
path: "/segment/{segment_id}"
tags: ["segment"]
---

# Get Segment

`GET /segment/{segment_id}`

## Request

- Base URL: `https://api.akkio.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.akkio.com/segment/{segment_id}`
- Auth: none declared

Get segment

## Path parameters

- `segment_id` string, required

## Response `200`

Successful Response

- Segment
  - `id` string: ID of this object.
  - `_markedForDeletion` boolean: marked if record has been soft-deleted.
  - `created_at` union: datetime object representing when this object was created.
    - string, date-time
    - object
  - `updated_at` union: datetime object representing when this object was updated.
    - string, date-time
    - object
  - `name` string, required: The name of the segment.
  - `description` string: description of the segment.
  - `owner` string, required: The owner of the segment.
  - `teamId` string, required: The team ID associated with the segment.
  - `projectId` string, required: The ID of the project associated with the segment.
  - `chatRecordId` string, nullable: The ID of the chat record associated with the segment.
  - `state` 'PENDING' | 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'UNKNOWN_TIMEOUT': Celery task status enum. Update apps/web-backend-api/src/types/TaskStatusEnum.ts if you update this enum.
  - `segmentSql` string, required: The SQL query defining the segment.
  - `region` string, required: The region for which the segment was built.
  - `wave` string, required: The wave for which the segment was built.
  - `defaultCompareSegmentId` string, required: The default compare segment ID.
  - `saved_to_db` boolean, required: Whether the segment is saved to the database.
  - `llm_generated` boolean: Whether the segment was generated by LLM.
  - `isGlobalSegment` boolean: Whether the segment is global or pre-generated.
  - `isSavedByUser` boolean: Whether the segment was saved by the user.
  - `segmentInsights` object: Insights related to the segment.
  - `bannerImagePath` string: storage path for the segment banner.
  - `data` unknown[]: The data for the segment.
    - unknown
  - `sources` unknown[], required: The source tables used for the segment.
    - unknown
  - `comment` union: details on failure.
    - string
    - object
  - `imported` boolean: Whether the segment was imported.
  - `num_rows` integer: The number of rows in the segment.
  - `last_refreshed` string, date-time, nullable: datetime object representing when this segment was last refreshed.

## Other responses

- `422`: Validation Error

---

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