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

# List deals

> List deals, most recently opened first.

Lists the deals of the workspace, most recently opened first.


## OpenAPI

````yaml GET /v1/deals
openapi: 3.1.0
info:
  title: Claap API
  description: Development documentation
  version: 0.0.0
servers:
  - url: https://api.claap.io/
security:
  - ApiKey: []
paths:
  /v1/deals:
    get:
      description: List deals, most recently opened first.
      operationId: getV1Deals
      parameters:
        - in: query
          name: cursor
          schema:
            type: string
            description: >-
              Paginate the results starting at the cursor returned by a previous
              call.
        - in: query
          name: limit
          schema:
            type: number
            minimum: 1
            maximum: 100
            default: 20
            description: Return at most "limit" results.
      responses:
        '200':
          description: Deals were successfully retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      deals:
                        type: array
                        items:
                          $ref: '#/components/schemas/ApiDeal'
                      pagination:
                        type: object
                        properties:
                          nextCursor:
                            type: string
                          totalCount:
                            type: number
                        required:
                          - totalCount
                    required:
                      - deals
                      - pagination
                required:
                  - result
components:
  schemas:
    ApiDeal:
      type: object
      properties:
        dealId:
          type: string
          description: The deal identifier.
        amount:
          type: object
          properties:
            value:
              type: number
              description: The deal amount.
            currency:
              type: string
              description: The amount currency, as configured in the CRM.
          required:
            - currency
          description: The deal amount.
        closedAt:
          type: string
          description: The deal close date (ISO datetime).
        companyIds:
          type: array
          items:
            type: string
          description: The identifiers of the companies associated with the deal.
        contactIds:
          type: array
          items:
            type: string
          description: The identifiers of the contacts associated with the deal.
        openedAt:
          type: string
          description: The deal creation date (ISO datetime).
        ownerEmail:
          type: string
          description: The deal owner email.
        ownerId:
          type: string
          description: >-
            The deal owner id in the CRM. This is the id accepted by the update
            endpoint.
        ownerName:
          type: string
          description: The deal owner name in the CRM.
        pipeline:
          type: string
          description: The pipeline name in the CRM.
        pipelineId:
          type: string
          description: The pipeline id in the CRM.
        source:
          oneOf:
            - type: object
              properties:
                kind:
                  type: string
                  const: Attio
                attioId:
                  type: string
                attioWorkspaceId:
                  type: string
              required:
                - kind
                - attioId
                - attioWorkspaceId
            - type: object
              properties:
                kind:
                  type: string
                  const: Hubspot
                hubspotId:
                  type: string
                hubspotWorkspaceId:
                  type: string
              required:
                - kind
                - hubspotId
                - hubspotWorkspaceId
            - type: object
              properties:
                kind:
                  type: string
                  const: Pipedrive
                pipedriveId:
                  type: number
                pipedriveCompanyId:
                  type: number
                pipedriveWorkspaceId:
                  type: number
              required:
                - kind
                - pipedriveId
                - pipedriveCompanyId
                - pipedriveWorkspaceId
            - type: object
              properties:
                kind:
                  type: string
                  const: Salesforce
                salesforceId:
                  type: string
                salesforceWorkspaceId:
                  type: string
              required:
                - kind
                - salesforceId
                - salesforceWorkspaceId
          description: The CRM the deal originates from, and its identifiers in that CRM.
        stage:
          type: string
          description: The deal stage name in the CRM.
        stageId:
          type: string
          description: >-
            The deal stage id in the CRM. This is the id accepted by the update
            endpoint.
        status:
          type: string
          enum:
            - Lost
            - Open
            - Won
          description: The deal status.
        summary:
          type: object
          properties:
            markdown:
              type: string
              description: The AI-generated deal summary, in Markdown.
          required:
            - markdown
          description: >-
            The AI-generated deal summary. Absent until it has been generated
            for the first time.
        title:
          type: string
          description: The deal title.
        type:
          type: string
          description: The deal type name in the CRM.
        typeId:
          type: string
          description: >-
            The deal type id in the CRM. This is the id accepted by the update
            endpoint.
        url:
          type: string
          description: The deal page URL in Claap application.
      required:
        - dealId
        - companyIds
        - contactIds
        - openedAt
        - source
        - url
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Claap-Key

````