> ## Documentation Index
> Fetch the complete documentation index at: https://docs.userpilot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Segments

> List all user segments with their IDs and names for filtering analytics exports by specific audience groups.



## OpenAPI

````yaml GET /api/v1/analytics/exports/lookups/segments
openapi: 3.0.0
info:
  title: Userpilot API
  version: 1.0.0
  termsOfService: https://userpilot.io/terms-of-service/
  description: >-
    Userpilot's API suite for user identification, event tracking, data
    import/export, and user/company management.


    Authentication:
     All endpoints that require authentication expect an HTTP header in the following format:

     Authorization: Token {{API_KEY}}

    Example (cURL):
     curl -X GET 'https://appex.userpilot.io/v1/identify' \
       -H 'Authorization: Token abcd1234efgh5678' \
       -H 'Content-Type: application/json'

    Contact Support:
     Email: support@userpilot.com
  contact:
    name: Userpilot
    url: https://userpilot.io
    email: support@userpilot.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://appex.userpilot.io
    description: Application endpoint
security: []
paths:
  /api/v1/analytics/exports/lookups/segments:
    get:
      summary: Get segments
      description: Retrieve a paginated list of segments available for export.
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
      responses:
        '200':
          description: A paginated list of segments.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                  metadata:
                    type: object
                    properties:
                      cursor:
                        type: object
                        properties:
                          after:
                            type: string
                            nullable: true
                          before:
                            type: string
                            nullable: true
                      limit:
                        type: integer
                      total_count:
                        type: integer
              example:
                data:
                  - id: 101
                    title: Active Users
                    usage: all
                    category: user_id
                    is_hidden: false
                    is_protected: false
                    status: published
                metadata:
                  cursor:
                    after: ...
                    before: null
                  limit: 50
                  total_count: 1
components:
  parameters:
    AuthorizationHeader:
      name: Authorization
      in: header
      required: true
      description: >-
        API authentication token in the format: `Token {{API_KEY}}`. Obtain your
        API key from the [Userpilot Environment
        Settings](https://run.userpilot.io/environment).
      schema:
        type: string
      example: Token abcd1234efgh5678

````