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

# List Campaigns



## OpenAPI

````yaml get /campaigns
openapi: 3.0.0
info:
  title: Flock API
  description: API Documentation for Flock
  version: '1.0'
  contact: {}
servers:
  - url: https://api-dev.withflock.com
security: []
tags: []
paths:
  /campaigns:
    get:
      tags:
        - Campaign
      operationId: CampaignController_listCampaigns
      parameters:
        - name: environment
          required: false
          in: query
          description: Filter campaigns by environment
          schema:
            type: string
            enum:
              - production
              - test
        - name: isLive
          required: false
          in: query
          description: Filter live campaigns only
          schema:
            type: boolean
        - name: isDefault
          required: false
          in: query
          description: Filter default campaigns only
          schema:
            type: boolean
        - name: orderBy
          required: false
          in: query
          description: 'Sorting criteria. Available options: createdAt'
          schema:
            $ref: '#/components/schemas/Object'
        - name: orderDirection
          required: false
          in: query
          description: 'Sorting direction. Available options: asc, desc'
          schema:
            $ref: '#/components/schemas/Object'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CampaignResponseDTO'
      security:
        - accessKey: []
components:
  schemas:
    Object:
      type: object
      properties: {}
    CampaignResponseDTO:
      type: object
      properties:
        name:
          type: string
        refereeLandingPageUrl:
          type: object
          nullable: true
        termsUrl:
          type: object
          nullable: true
        proposedRewardTrigger:
          type: object
          nullable: true
        manualRewardTrigger:
          type: object
          nullable: true
        inviteMessage:
          type: object
          nullable: true
        isLive:
          type: boolean
          nullable: false
        isDefault:
          type: boolean
          nullable: false
        environment:
          type: string
          enum:
            - production
            - test
        copiedFromCampaignId:
          type: object
          nullable: true
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        deletedAt:
          type: object
          nullable: true
        organizationId:
          type: string
        applicationId:
          type: string
        lastPingAt:
          type: object
          nullable: true
        lastPingOrigin:
          type: object
          nullable: true
        rewards:
          type: array
          items:
            $ref: '#/components/schemas/CampaignRewardResponseDTO'
        emails:
          type: array
          items:
            $ref: '#/components/schemas/CampaignEmailResponseDTO'
        campaignPages:
          type: array
          items:
            $ref: '#/components/schemas/CampaignPageSummaryResponseDTO'
        faqs:
          type: array
          items:
            $ref: '#/components/schemas/FaqDTO'
        platforms:
          type: array
          items:
            type: string
            enum:
              - mobile
              - web
      required:
        - name
        - refereeLandingPageUrl
        - termsUrl
        - proposedRewardTrigger
        - manualRewardTrigger
        - inviteMessage
        - isLive
        - isDefault
        - environment
        - copiedFromCampaignId
        - id
        - createdAt
        - updatedAt
        - deletedAt
        - organizationId
        - applicationId
        - lastPingAt
        - lastPingOrigin
        - rewards
        - emails
        - campaignPages
        - faqs
        - platforms
    CampaignRewardResponseDTO:
      type: object
      properties:
        name:
          type: object
          nullable: true
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        deletedAt:
          type: object
          nullable: true
        organizationId:
          type: string
        applicationId:
          type: string
        limit:
          type: object
          nullable: true
        type:
          type: string
          enum:
            - payout
            - discount
        campaignId:
          type: string
        description:
          type: object
          nullable: true
        party:
          type: string
          enum:
            - referrer
            - referee
        method:
          type: string
          nullable: true
          enum:
            - paypal
            - amazon_gift_card
            - visa_gift_card
            - mobile_coupon
            - venmo
            - custom
        payoutAmount:
          type: object
          nullable: true
        discountAmount:
          type: object
          nullable: true
        discountPercentage:
          type: object
          nullable: true
        discountDurationInMonth:
          type: object
          nullable: true
        currency:
          type: string
          enum:
            - usd
            - cad
        limitUnit:
          type: object
          nullable: true
        limitInterval:
          type: object
          nullable: true
        disabled:
          type: boolean
      required:
        - name
        - id
        - createdAt
        - updatedAt
        - deletedAt
        - organizationId
        - applicationId
        - limit
        - type
        - campaignId
        - description
        - party
        - method
        - payoutAmount
        - discountAmount
        - discountPercentage
        - discountDurationInMonth
        - currency
        - limitUnit
        - limitInterval
        - disabled
    CampaignEmailResponseDTO:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        deletedAt:
          type: object
          nullable: true
        organizationId:
          type: string
        applicationId:
          type: string
        message:
          type: string
        type:
          type: string
          enum:
            - referrer:reward
            - invitee:reward
        campaignId:
          type: string
        subjectLine:
          type: string
        buttonText:
          type: string
        buttonColor:
          type: string
        logoUrl:
          type: object
          nullable: true
        logoSize:
          type: object
          nullable: true
      required:
        - id
        - createdAt
        - updatedAt
        - deletedAt
        - organizationId
        - applicationId
        - message
        - type
        - campaignId
        - subjectLine
        - buttonText
        - buttonColor
        - logoUrl
        - logoSize
    CampaignPageSummaryResponseDTO:
      type: object
      properties:
        path:
          type: string
        id:
          type: string
        isEmpty:
          type: boolean
        name:
          type: object
        placementId:
          type: object
        platform:
          type: object
      required:
        - path
        - id
        - isEmpty
        - name
        - placementId
        - platform
    FaqDTO:
      type: object
      properties: {}
  securitySchemes:
    accessKey:
      type: apiKey
      in: header
      name: Authorization

````