---
title: "Segment listing"
method: GET
path: "/api/segments"
tags: ["Segments"]
---

# Segment listing

`GET /api/segments`

## Request

- Base URL: `https://go.urbanairship.com`
- URL: `https://go.urbanairship.com/api/segments`
- Auth: one of:
  - HTTP basic
  - HTTP bearer
- TypeScript: <https://skmtc.dev/airship/apis/airship-api/docs/api/segments/get.ts> (a function with typed inputs; its response is checked against the schema)

List all segments for the application.

## Query parameters

- `limit` integer

## Response `200`

Returned on success a JSON object containing segments.

- object
  - `next_page` string: An optional relative URL which can be used to retrieve the next page of results. If no more results are available, next_page will be absent.
  - `segments` object[], required: An array of segments for the application.
    - `creation_date` integer, required: The original creation date of segment in epoch milliseconds.
    - `display_name` string, required: The segment display name.
    - `id` string, required: A unique identifier for the segment.
    - `modification_date` integer, required: Latest modification date of the segment in epoch milliseconds.

## Other responses

- `401`: Authentication information (the app key and secret or bearer token) was either incorrect or missing.

---

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