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

# Probabilistic merge-candidate review queue

> Confidence-scored merge candidates for the CDP Identity Rules review queue. Scans the tenant's contacts, blocks them into phone-area / email-domain shards (so the pairwise comparison stays linear in the shard size), scores every in-shard pair with the probabilistic identity kernel, and returns the ranked candidates at/above `min_confidence`. Each candidate carries its band (`auto_merge` | `review`), the per-signal similarity breakdown, and a suggested primary/secondary so a reviewer can approve a merge in one click. READ-ONLY: it derives candidates on the fly and never merges or mutates a contact — approving a candidate calls the existing `POST /contacts/merge`. Owner / admin / developer with the `contacts:read` scope (the payload embeds masked contact PII). Off-spec query params degrade to their defaults rather than erroring.



## OpenAPI

````yaml /openapi.yaml get /api/v1/cdp/identity/merge-candidates
openapi: 3.1.0
info:
  title: Devotel CPaaS API
  description: Orbit by Devotel — Communications Platform as a Service API
  version: 1.0.0
  contact:
    name: Devotel
    url: https://devotel.io
    email: support@devotel.io
  license:
    name: Proprietary
servers:
  - url: https://api.orbit.devotel.io
    description: Production
security:
  - Bearer: []
  - ApiKey: []
tags:
  - name: Messages
    description: >-
      Send and manage messages across all channels (SMS, WhatsApp, RCS, Email,
      Viber, etc.)
  - name: Fax
    description: >-
      List and track fax (MMS/T.38) transmissions on Telnyx-backed fax numbers
      (sending flows through the Messaging API)
  - name: Agents
    description: AI agent creation, configuration, and execution
  - name: Voice
    description: Voice calls, IVR, conferencing, and SIP trunking
  - name: OnCall
    description: On-call rotations and escalation policy planning for incident alerting
  - name: Webhooks
    description: Webhook endpoint management and delivery logs
  - name: Numbers
    description: Phone number search, provisioning, and configuration
  - name: Brand Identity
    description: >-
      Unified cross-channel brand trust posture (10DLC, toll-free, WhatsApp,
      RCS, branded calling, number KYC)
  - name: Contacts
    description: Contact management, segmentation, and lifecycle tracking
  - name: Campaigns
    description: Marketing campaign orchestration and analytics
  - name: Flows
    description: Automation flow builder and execution engine
  - name: Templates
    description: Message template management and approval workflows
  - name: Settings
    description: Organization, channel, and user preference settings
  - name: Verify
    description: OTP generation and verification across channels
  - name: Push
    description: Push notification delivery via FCM and APNs
  - name: Integrations
    description: Third-party service connections and OAuth management
  - name: CDP
    description: >-
      Customer Data Platform — activation surface (CRM object sync, streaming
      destinations, ad-audience activation)
  - name: Files
    description: >-
      Server-to-server media upload, listing, retrieval, and deletion
      (signed-URL backed)
  - name: Commerce
    description: >-
      Omnichannel conversational-commerce — persistent cart + checkout state
      machine, channel-agnostic hosted pay-by-link, native WhatsApp checkout,
      and AP2-style agent payment mandates.
  - name: Sync
    description: >-
      Real-time shared-state primitive (Twilio Sync parity) — Documents, Maps,
      Lists, and ephemeral Streams, with change events relayed over the
      /api/v1/ws/sync WebSocket gateway
paths:
  /api/v1/cdp/identity/merge-candidates:
    get:
      tags:
        - CDP
      summary: Probabilistic merge-candidate review queue
      description: >-
        Confidence-scored merge candidates for the CDP Identity Rules review
        queue. Scans the tenant's contacts, blocks them into phone-area /
        email-domain shards (so the pairwise comparison stays linear in the
        shard size), scores every in-shard pair with the probabilistic identity
        kernel, and returns the ranked candidates at/above `min_confidence`.
        Each candidate carries its band (`auto_merge` | `review`), the
        per-signal similarity breakdown, and a suggested primary/secondary so a
        reviewer can approve a merge in one click. READ-ONLY: it derives
        candidates on the fly and never merges or mutates a contact — approving
        a candidate calls the existing `POST /contacts/merge`. Owner / admin /
        developer with the `contacts:read` scope (the payload embeds masked
        contact PII). Off-spec query params degrade to their defaults rather
        than erroring.
      parameters:
        - name: limit
          in: query
          required: false
          description: >-
            Max candidates returned (post-ranking). Out-of-range values fall
            back to 50.
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
        - name: min_confidence
          in: query
          required: false
          description: >-
            Confidence floor, 0–100. Defaults to the `review`-band threshold so
            the queue surfaces every candidate a human should look at.
          schema:
            type: integer
            minimum: 0
            maximum: 100
            default: 62
        - name: include_auto_merge
          in: query
          required: false
          description: >-
            When false, drops `auto_merge`-band candidates and returns only the
            human-review mid-band.
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: Confidence-ranked merge candidates (may be empty)
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      thresholds:
                        type: object
                        properties:
                          auto_merge:
                            type: integer
                            description: >-
                              Confidence at/above which a pair is banded
                              `auto_merge`.
                          review:
                            type: integer
                            description: >-
                              Confidence at/above which a pair lands in the
                              review queue.
                      min_confidence:
                        type: integer
                      include_auto_merge:
                        type: boolean
                      limit:
                        type: integer
                      scanned_contacts:
                        type: integer
                        description: Contacts pulled into the blocking pass this scan.
                      total_candidates:
                        type: integer
                        description: Total candidates found before the page limit.
                      truncated:
                        type: boolean
                        description: >-
                          True when the scan or a shard hit its cap, so some
                          pairs may be unscored this pass.
                      count:
                        type: integer
                        description: Candidates in this page.
                      candidates:
                        type: array
                        items:
                          type: object
                          properties:
                            candidate_id:
                              type: string
                            confidence:
                              type: integer
                              description: Overall confidence, 0–100.
                            band:
                              type: string
                              enum:
                                - auto_merge
                                - review
                            primary_id:
                              type: string
                              description: >-
                                Suggested merge survivor (the more complete
                                record).
                            secondary_id:
                              type: string
                            reasons:
                              type: array
                              items:
                                type: string
                            signals:
                              type: array
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                  similarity:
                                    type: number
                                  weight:
                                    type: number
                            contact_primary:
                              type: object
                              description: >-
                                PII-masked projection of the suggested primary
                                contact.
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                  nullable: true
                                email:
                                  type: string
                                  nullable: true
                                phone:
                                  type: string
                                  nullable: true
                                company:
                                  type: string
                                  nullable: true
                                tags:
                                  type: array
                                  items:
                                    type: string
                                last_activity:
                                  type: string
                                  nullable: true
                            contact_secondary:
                              type: object
                              description: >-
                                PII-masked projection of the suggested secondary
                                contact.
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                  nullable: true
                                email:
                                  type: string
                                  nullable: true
                                phone:
                                  type: string
                                  nullable: true
                                company:
                                  type: string
                                  nullable: true
                                tags:
                                  type: array
                                  items:
                                    type: string
                                last_activity:
                                  type: string
                                  nullable: true
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
components:
  schemas:
    ResponseMeta:
      type: object
      required:
        - request_id
        - timestamp
      additionalProperties: false
      properties:
        request_id:
          type: string
          description: Unique request identifier (also returned as X-Request-Id header)
        timestamp:
          type: string
          format: date-time
        docs_url:
          type: string
          format: uri
          nullable: true
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Dashboard JWT token from Clerk
    ApiKey:
      type: apiKey
      name: X-API-Key
      in: header
      description: Server-to-server API key (dv_live_sk_*)

````