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

# ListLeadMergeCandidatesAPI mirrors the erdo_list_lead_merge_candidates MCP tool.




## OpenAPI

````yaml /api/openapi.json get /v1/datasets/{datasetSlug}/lead-candidates
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, experiments, and bounded outreach.
    Authenticate with a Bearer API key (erdo_api_...) or scoped token
    (erdo_token_...).
  version: '2026-09-11'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/datasets/{datasetSlug}/lead-candidates:
    get:
      summary: >
        ListLeadMergeCandidatesAPI mirrors the erdo_list_lead_merge_candidates
        MCP tool.
      operationId: GET:mcp.ListLeadMergeCandidatesAPI
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: datasetSlug
          required: true
          schema:
            type: string
          style: simple
        - allowEmptyValue: true
          description: |
            Limit caps the returned captures. Defaults to 50, capped at 200.
          explode: true
          in: query
          name: limit
          required: false
          schema:
            format: int64
            type: integer
          style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  candidates:
                    items:
                      $ref: '#/components/schemas/dataset.CanonicalLeadCandidate'
                    type: array
                  dataset_id:
                    type: string
                  dataset_slug:
                    type: string
                  lead_identity_enabled:
                    description: >
                      at all. Without it an empty candidate list is ambiguous —
                      "we looked and there is nothing to merge" and "nothing
                      here has ever been checked" are the same answer — and a
                      surface that renders the first when the second is true
                      tells somebody the platform verified something it never
                      looked at.
                    title: >
                      LeadIdentityEnabled says whether this dataset has
                      permanent lead identity
                    type: boolean
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    dataset.CanonicalLeadCandidate:
      description: |
        together with the leads it could not choose between.
      properties:
        candidates:
          description: >
            evidence bound to it — which is what an operator compares to decide
            whether they are one person.
          items:
            $ref: '#/components/schemas/dataset.CanonicalLeadCandidateLead'
          title: >
            Candidates are the leads named by the refused capture, each with the
            contact
          type: array
        capture:
          $ref: '#/components/schemas/dataset.CanonicalLeadCapture'
      title: |
        CanonicalLeadCandidate is one capture the resolver refused to guess at,
      type: object
    dataset.CanonicalLeadCandidateLead:
      properties:
        canonical_lead_id:
          type: string
        emails:
          items:
            type: string
          type: array
        merged_into:
          description: |
            an operator sees that a queued candidate was already settled.
          title: >
            MergedInto is set when this candidate has since been absorbed —
            which is how
          type: string
        phones:
          items:
            type: string
          type: array
        reference:
          type: string
      title: >
        CanonicalLeadCandidateLead is one lead named by a refused capture,
        summarised.
      type: object
    dataset.CanonicalLeadCapture:
      properties:
        candidate_lead_ids:
          description: |
            Either of them is what a merge is addressed with.
          items:
            type: string
          title: >
            CandidateLeadIDs are the leads a refused capture could not choose
            between.
          type: array
        conversion_id:
          type: string
        conversion_status:
          type: string
        created_at:
          format: date-time
          type: string
        id:
          type: string
        operation_key:
          type: string
        producer:
          type: string
        resolution:
          title: >
            Resolution is created, matched, enriched, ambiguous, conflict or
            unresolved.
          type: string
        rows_affected:
          format: int64
          type: integer
      title: |
        CanonicalLeadCapture is one recorded capture against a lead.
      type: object
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````