---
title: "Check Client Duplicates"
method: POST
path: "/read/clinic/clients/duplicate-check"
tags: ["read", "clinic"]
---

# Check Client Duplicates

`POST /read/clinic/clients/duplicate-check`

## Request

- Base URL: `https://api.projectindi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.projectindi.com/read/clinic/clients/duplicate-check`
- Auth: none declared

Which of these candidate clients the caller's clinic already holds.

Authentication: JWT required via Authorization header
RLS: Enforced through user_client isolation - the RPC is SECURITY INVOKER, so
``child_profiles`` policy is what decides which children it can match against.

## Request body

- DuplicateCheckRequest
  - `identities` ClientIdentity[]
    - `name` string, required
    - `date_of_birth` string, required

## Response `200`

Successful Response

- DuplicateCheckResponse: The canonical key of each submitted identity, and which of them exist. ``keys`` is positional - one entry per submitted identity, in the order they were sent. The client uses it for both duplicate questions: an entry in ``existing`` is already in the clinic, and two equal entries in ``keys`` are the same person twice in one file. That is what lets the rule live in exactly one place: the browser holds no copy of it and derives nothing.
  - `keys` string[], required
  - `existing` string[], required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/projectindi/apis/indi-agent-api-first-principles.md) - [All operations](https://skmtc.dev/projectindi/apis/indi-agent-api-first-principles/llms.txt) - [OpenAPI document](https://skmtc.dev/projectindi/apis/indi-agent-api-first-principles/revisions/25a7813e21fd?raw)
