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

# List campaigns

> List campaigns with filtering, sorting, and pagination



## OpenAPI

````yaml /api-reference/cx/swagger.json post /deals/campaign/_list
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /deals/campaign/_list:
    post:
      tags:
        - deals
      summary: List campaigns
      description: List campaigns with filtering, sorting, and pagination
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/routes_deals_campaign.ListCampaignsRequest'
        description: List campaigns request
        required: true
      responses:
        '200':
          description: Campaign list
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/routes_deals_campaign.ListCampaignsResponse
        '400':
          description: Bad request - invalid request body
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    routes_deals_campaign.ListCampaignsRequest:
      type: object
      properties:
        filters:
          $ref: '#/components/schemas/routes_deals_campaign.ListcampaignsFilter'
        page:
          $ref: '#/components/schemas/types.ListPagination'
        sort:
          $ref: '#/components/schemas/types.ListSort'
    routes_deals_campaign.ListCampaignsResponse:
      type: object
      properties:
        campaigns:
          type: array
          items:
            $ref: '#/components/schemas/types.Campaign'
        total:
          type: integer
    routes_deals_campaign.ListcampaignsFilter:
      type: object
      properties:
        manager:
          $ref: >-
            #/components/schemas/stax_ai_cx_cx-api_pkg_routes_filters.IncludeExcludeFilter
        search:
          type: string
        tags:
          $ref: >-
            #/components/schemas/stax_ai_cx_cx-api_pkg_routes_filters.IncludeExcludeFilter
        type:
          type: string
    types.ListPagination:
      type: object
      properties:
        limit:
          type: integer
        skip:
          type: integer
    types.ListSort:
      type: object
      properties:
        field:
          type: string
        last: {}
        order:
          type: integer
    types.Campaign:
      type: object
      properties:
        _id:
          type: string
        activity:
          description: For returning
          type: array
          items:
            $ref: '#/components/schemas/types.Activity'
        clicks:
          description: Cached data
          type: integer
        created_at:
          type: string
        deleted_at:
          type: string
        manager:
          type: string
        name:
          type: string
        notes:
          type: string
        opens:
          type: integer
        redirect:
          type: string
        resource:
          type: string
        tags:
          type: array
          items:
            type: string
        team:
          type: string
        tracks:
          type: array
          items:
            $ref: '#/components/schemas/types.Track'
        type:
          type: string
    stax_ai_cx_cx-api_pkg_routes_filters.IncludeExcludeFilter:
      type: object
      properties:
        exclude:
          type: array
          items:
            type: string
        include:
          type: array
          items:
            type: string
    types.Activity:
      type: object
      properties:
        _id:
          type: string
        action:
          type: string
        changes:
          type: array
          items:
            $ref: '#/components/schemas/types.Change'
        client:
          type: string
        on_id:
          type: string
        on_py:
          type: integer
        on_type:
          type: string
        team:
          type: string
        timestamp:
          type: string
        user:
          type: string
    types.Track:
      type: object
      properties:
        _id:
          type: string
        campaign:
          type: string
        click:
          type: boolean
        ip:
          type: string
        source:
          type: string
        tag:
          type: string
        timestamp:
          type: string
        url:
          type: string
    types.Change:
      type: object
      properties:
        data:
          type: string
        field:
          type: string
        from:
          type: string
        to:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.