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

# Get all audiences for organization with pagination



## OpenAPI

````yaml /openapi.json get /api/audience
openapi: 3.0.0
info:
  title: GoMobile Backend API
  description: >-
    API documentation for GoMobile telephony platform - automated calling
    campaigns, interactive voice flows, and call management
  version: '1.0'
  contact: {}
servers:
  - url: http://localhost:3000
    description: Local Development
security: []
tags:
  - name: Organizations
    description: Multi-tenant organization management
  - name: Teams
    description: Team structure and hierarchy
  - name: Contacts
    description: Customer contact management (CRM)
  - name: Entities
    description: Business entities management
  - name: Audiences
    description: Contact segmentation and groups
  - name: Programs
    description: Call campaign configuration
  - name: Call Flows
    description: Interactive call flow builder
paths:
  /api/audience:
    get:
      tags:
        - Audiences
      summary: Get all audiences for organization with pagination
      operationId: AudienceController_getAll
      parameters:
        - name: page
          required: false
          in: query
          description: Page number (1-based)
          schema:
            minimum: 1
            default: 1
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            minimum: 1
            maximum: 100
            default: 20
            example: 20
            type: number
        - name: search
          required: false
          in: query
          description: Search term to filter results
          schema:
            maxLength: 100
            example: john
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            example: createdAt
            type: string
        - name: sortOrder
          required: false
          in: query
          description: Sort order
          schema:
            default: desc
            example: desc
            type: string
            enum:
              - asc
              - desc
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudienceListResponseDto'
components:
  schemas:
    AudienceListResponseDto:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AudienceWithCountResponseDto'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
      required:
        - data
        - meta
    AudienceWithCountResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 123e4567-e89b-12d3-a456-426614174000
        organizationId:
          type: string
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          example: VIP Customers
        description:
          type: string
          example: High-value customers for priority campaigns
          nullable: true
        createdAt:
          format: date-time
          type: string
          example: '2024-01-01T00:00:00.000Z'
        updatedAt:
          format: date-time
          type: string
          example: '2024-01-01T00:00:00.000Z'
        contactCount:
          type: number
          description: Number of contacts in this audience
          example: 150
      required:
        - id
        - organizationId
        - name
        - createdAt
        - updatedAt
        - contactCount
    PaginationMeta:
      type: object
      properties:
        page:
          type: number
          description: Current page number
          example: 1
        limit:
          type: number
          description: Number of items per page
          example: 20
        total:
          type: number
          description: Total number of items
          example: 150
        totalPages:
          type: number
          description: Total number of pages
          example: 8
        hasNextPage:
          type: boolean
          description: Whether there is a next page
          example: true
        hasPreviousPage:
          type: boolean
          description: Whether there is a previous page
          example: false
      required:
        - page
        - limit
        - total
        - totalPages
        - hasNextPage
        - hasPreviousPage

````