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

# List Segment

> List all your created segments.



## OpenAPI

````yaml /openapi-v1.json post /segment/search
openapi: 3.1.0
info:
  title: Mailercloud Marketing API
  version: 1.0.0
  description: >-
    Campaigns, contacts, lists, segments, automations, and webhooks for the
    Mailercloud Marketing Platform.
servers:
  - url: https://cloudapi.mailercloud.com/v1
security:
  - apiKey: []
tags:
  - name: Campaigns
  - name: Contacts
  - name: Lists
  - name: Tags
  - name: Segments
  - name: Custom Properties
  - name: Senders
  - name: Templates
  - name: Automations
  - name: Webhooks
  - name: Webforms
  - name: Inbox Tracker
  - name: Account
paths:
  /segment/search:
    post:
      tags:
        - Segments
      summary: List Segment
      description: List all your created segments.
      operationId: list-segment
      parameters:
        - name: Content-Type
          in: header
          required: false
          description: application/json
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: ''
              type: object
              properties:
                limit:
                  type: number
                  description: |-
                    Maximum number of elements to return.

                    Maximum: 100 Minimum: 10
                page:
                  type: number
                  description: >-
                    You can retrieve a subset of records starting from the page
                    value you have specified. You can add a limit, which will
                    determine the number of records you can retrieve on a single
                    page.


                    Starts From: 1
                search:
                  type: string
                  minLength: 1
                  description: 'Filter segment list by name , giving name as search keyword '
                sort_field:
                  type: string
                  minLength: 1
                  description: |-
                    Sort segment list data based on the following field.

                    Available sort fields: name,active_count 
                sort_order:
                  type: string
                  minLength: 1
                  description: |-
                    Sorting order for sort field

                    Available sort orders

                    asc, ASC, desc, DESC
              required:
                - limit
                - page
                - search
                - sort_field
                - sort_order
            examples:
              example-1:
                value:
                  limit: 10
                  page: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  count:
                    type: number
                  data:
                    type: array
                    uniqueItems: true
                    minItems: 1
                    items:
                      required:
                        - active_count
                        - id
                        - list
                        - name
                      properties:
                        active_count:
                          type: number
                        list:
                          type: string
                          minLength: 1
                        name:
                          type: string
                          minLength: 1
                required:
                  - count
                  - data
              examples:
                example-1:
                  value:
                    count: 2
                    data:
                      - active_count: 8690337
                        id: KyGa
                        list: >-
                          Default List,Sending list,sending list 2,Auto Test
                          3,Auto Test 0,Auto Test 1,Auto list New,List
                          bounce,Multy
                          domain,lowww,List10lac1,LIST10lac2,List10lac3,List10lac4,List10Lac6,Fineecho
                          copy paste,List auto test -1,List auto test -2,Vinmail
                          Open,list vinmail,Tb live test-Multydomain,Api test
                        name: Sending list-1
                      - active_count: 8408779
                        id: Kxwf
                        list: >-
                          Default List,Sending list,sending list 2,Auto Test
                          3,Auto Test 0,Auto Test 1,Auto list New,List
                          bounce,Multy
                          domain,lowww,List10lac1,LIST10lac2,List10lac3,List10lac4,List10Lac6,Fineecho
                          copy paste,List auto test -1,List auto test -2,Vinmail
                          Open
                        name: ryth
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: integer
                  message:
                    type: string
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your Mailercloud API key (plain text, no Bearer prefix). Create keys in
        Settings → API.

````