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

# List deals

> Returns a paginated list of deals. Supports search and filtering.



## OpenAPI

````yaml /openapi.json get /deals
openapi: 3.1.1
info:
  title: Heffl Public API (Legacy v1)
  version: 1.0.0
  description: >-
    Legacy Heffl REST API v1. Maintained for existing integrations. For new
    projects, use API v2 at https://docs.heffl.com/api-v2/introduction.
  contact:
    name: Heffl Support
    url: https://heffl.com/support
    email: support@heffl.com
servers:
  - url: https://api.heffl.com/api/v1
    description: Production API Server
security:
  - ApiKeyAuth: []
paths:
  /deals:
    get:
      tags:
        - Deals
      summary: List deals
      description: Returns a paginated list of deals. Supports search and filtering.
      operationId: deals.list
      parameters:
        - name: cursor
          in: query
          schema:
            type: string
            description: >-
              Cursor for pagination. Pass the previous response nextCursor value
              to fetch the next page.
          allowEmptyValue: true
          allowReserved: true
        - name: limit
          in: query
          schema:
            type: number
            minimum: 1
            maximum: 100
            default: 20
            description: Number of items to return (max 100)
          allowEmptyValue: true
          allowReserved: true
        - name: search
          in: query
          schema:
            type: string
            default: ''
            description: Search by deal title
          allowEmptyValue: true
          allowReserved: true
        - name: pipelineId
          in: query
          schema:
            type: string
            description: Filter by pipeline public ID
          allowEmptyValue: true
          allowReserved: true
        - name: stageId
          in: query
          schema:
            type: string
            description: Filter by stage public ID
          allowEmptyValue: true
          allowReserved: true
        - name: status
          in: query
          schema:
            enum:
              - ACTIVE
              - WON
              - LOST
            description: Filter by deal status (ACTIVE, WON, LOST)
          style: deepObject
          explode: true
          allowEmptyValue: true
          allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Deal public ID
                        number:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Auto-generated deal number
                        title:
                          type: string
                          description: Deal title
                        price:
                          anyOf:
                            - type: number
                            - type: 'null'
                          description: Deal price/value
                        status:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Deal status
                        priority:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Deal priority
                        expectedCloseDate:
                          anyOf:
                            - type: string
                              format: date-time
                              x-native-type: date
                            - type: 'null'
                          description: Expected close date
                        clientId:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Client public ID
                        pipelineId:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Pipeline public ID
                        stageId:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Pipeline stage public ID
                        sourceId:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Deal source public ID
                        leadId:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Lead public ID
                        createdAt:
                          type: string
                          format: date-time
                          x-native-type: date
                          description: When the deal was created
                        customFields:
                          anyOf:
                            - type: object
                              propertyNames:
                                type: string
                              additionalProperties: {}
                            - type: 'null'
                          description: Custom field values
                      required:
                        - id
                        - title
                        - createdAt
                  nextCursor:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      Cursor to fetch the next page. Null if there are no more
                      results.
                  hasMore:
                    type: boolean
                    description: Whether additional results are available
                required:
                  - items
                  - hasMore
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Get yours at
        app.heffl.com/settings/developers

````