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

# List duplicate rules

> Returns the custom duplicate rules defined for an account. Each rule specifies the properties used to detect matching records. Use objectType to filter by record type, or ruleId to retrieve a specific rule.

> **Supported products**


## OpenAPI

````yaml specs/2027-03-beta/crm-data-quality-v2027-03-beta.json GET /crm/data-quality/objects/2027-03-beta/duplicates/custom-rules
openapi: 3.0.1
info:
  title: CRM Data Quality
  description: Basepom for all HubSpot Projects
  version: 2027-03-beta
  x-hubspot-product-tier-requirements:
    marketing: FREE
    sales: FREE
    service: FREE
    cms: FREE
    commerce: FREE
    crmHub: FREE
    dataHub: FREE
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Basic
paths:
  /crm/data-quality/objects/2027-03-beta/duplicates/custom-rules:
    get:
      tags:
        - Basic
      summary: List duplicate rules
      description: >-
        Returns the custom duplicate rules defined for an account. Each rule
        specifies the properties used to detect matching records. Use objectType
        to filter by record type, or ruleId to retrieve a specific rule.
      operationId: get-/crm/data-quality/objects/2027-03-beta/duplicates/custom-rules
      parameters:
        - name: objectType
          in: query
          description: >-
            The type of records to filter rules by, such as contacts or
            companies. If omitted, rules for all supported record types are
            returned.
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: ruleId
          in: query
          description: The ID of a specific rule to retrieve.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CollectionResponseWithTotalPublicDuplicateRule
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security: []
components:
  schemas:
    CollectionResponseWithTotalPublicDuplicateRule:
      required:
        - results
        - total
      type: object
      properties:
        paging:
          $ref: '#/components/schemas/Paging'
        results:
          type: array
          description: The list of custom duplicate rules on this page.
          items:
            $ref: '#/components/schemas/PublicDuplicateRule'
        total:
          type: integer
          description: The total number of custom duplicate rules matching the request.
          format: int32
    Paging:
      type: object
      properties:
        next:
          $ref: '#/components/schemas/NextPage'
        prev:
          $ref: '#/components/schemas/PreviousPage'
      description: >-
        Represents the pagination information for navigating through a list of
        results in the API. It provides details on how to access the previous or
        next set of results.
    PublicDuplicateRule:
      required:
        - autoMergeEnabled
        - createdAt
        - id
        - name
        - objectType
        - propertyNames
        - updatedAt
      type: object
      properties:
        autoMergeEnabled:
          type: boolean
          description: >-
            A boolean indicating whether automatic merging of duplicates is
            enabled for this rule.
        createdAt:
          type: integer
          description: >-
            A Unix timestamp in milliseconds indicating when the rule was
            created.
          format: int64
          example: 1704067200000
        id:
          type: integer
          description: The unique ID of this rule.
          format: int64
          example: 123456
        name:
          type: string
          description: The display name of the rule.
          example: Email and phone duplicates
        objectType:
          type: string
          description: >-
            The type of records this rule applies to, such as contacts (0-1) or
            companies (0-2).
          example: contacts
        propertyNames:
          type: array
          description: >-
            An array of strings representing the internal names of properties
            used by the rule to identify duplicates.
          example: '["email", "phone"]'
          items:
            type: string
        updatedAt:
          type: integer
          description: >-
            A Unix timestamp in milliseconds indicating when the rule was last
            updated.
          format: int64
          example: 1704067200000
    Error:
      required:
        - category
        - correlationId
        - message
      type: object
      properties:
        category:
          type: string
          description: The error category, represented as a string.
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: >-
            Context about the error condition, represented as an object with
            additional properties. Each property is an array of strings.
          example: >-
            {invalidPropertyName=[propertyValue], missingScopes=[scope1,
            scope2]}
        correlationId:
          type: string
          description: >-
            A unique identifier for the request, formatted as a UUID. Include
            this value with any error reports or support tickets.
          format: uuid
          example: aeb5f871-7f07-4993-9211-075dc63e7cbf
        errors:
          type: array
          description: >-
            Further information about the error, provided as an array of
            ErrorDetail objects.
          items:
            $ref: '#/components/schemas/ErrorDetail'
        links:
          type: object
          additionalProperties:
            type: string
          description: >-
            A map of link names to associated URIs containing documentation
            about the error or recommended remediation steps, represented as an
            object with string properties.
        message:
          type: string
          description: >-
            A human readable message describing the error along with remediation
            steps where appropriate. It is a string.
          example: An error occurred
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error, represented as a string.
      description: >-
        Represents an error response returned by the API when an operation
        fails. This component is used in various endpoints to provide detailed
        information about the error encountered.
      example:
        message: Invalid input (details will vary based on the error)
        correlationId: aeb5f871-7f07-4993-9211-075dc63e7cbf
        category: VALIDATION_ERROR
        links:
          knowledge-base: https://www.hubspot.com/products/service/knowledge-base
    NextPage:
      required:
        - after
      type: object
      properties:
        after:
          type: string
          description: A paging cursor token for retrieving subsequent pages.
        link:
          type: string
          description: A URL that can be used to retrieve the next page results.
      description: >-
        Specifies the paging information needed to retrieve the next set of
        results in a paginated API response
    PreviousPage:
      required:
        - before
      type: object
      properties:
        before:
          type: string
          description: >-
            A string token used to identify the position of the previous page in
            the pagination sequence.
        link:
          type: string
          description: >-
            A URL string that provides a direct link to access the previous page
            of results.
      description: >-
        specifies the paging information needed to retrieve the previous set of
        results in a paginated API response
    ErrorDetail:
      required:
        - message
      type: object
      properties:
        code:
          type: string
          description: >-
            The status code associated with the error detail, indicating the
            type of error that occurred.
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: >-
            Context about the error condition, represented as an object with
            additional properties. Each property is an array of strings
            providing more details, such as missing scopes.
          example: '{missingScopes=[scope1, scope2]}'
        in:
          type: string
          description: >-
            The name of the field or parameter in which the error was found. It
            provides context about the location of the error.
        message:
          type: string
          description: >-
            A human readable message describing the error along with remediation
            steps where appropriate. This is a required property.
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error, offering further classification.
      description: >-
        Represents detailed information about an error that occurred in the API.
        This component is used to provide additional context and specifics about
        errors, typically as part of an error response.
  responses:
    Error:
      description: An error occurred.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'

````