HigherData

HigherData / Tool

hygiene.repair

Build a change set that associates selected orphans with one company. Dry run returns the plan and writes nothing. Associations need approval unless the space sets them to auto.

Scopes: crm:write

Send execute false to preview the change. Send execute true to write it. A preview does not change stored data.

REST: POST /api/v1/tools/hygiene.repair?execute=false. The same call is POST /api/v1/hygiene/repair?execute=false.

MCP tool name: hygiene_repair. It is in the default MCP catalog when your scopes allow it.

Input

hygiene.repair input
FieldTypeRequiredDescription
idsarrayyesOrphan ids to associate with a company. 1 to 50 items. Each item: UUID.
companiesarraynoExplicit company choices for ambiguous, unmatched or changed proposals. Choices always require review. At most 50 items.
companies[].orphanIdstringyesOrphan finding id for this company choice. UUID.
companies[].companyIdstringyesCRM record id. Pattern: ^[1-9][0-9]{0,19}$.

Output

hygiene.repair output
FieldTypeRequiredDescription
dryRunbooleanyes
changeSetIdvalueyes
associationsarrayyesAt most 50 items.

Request

curl -sS -X POST "https://higherdata.io/api/v1/tools/hygiene.repair?execute=false" \
  -H "Authorization: Bearer hd_example_replace_me" \
  -H "Content-Type: application/json" \
  -d '{
  "ids": [
    "11111111-1111-4111-8111-111111111111"
  ]
}'

SDK

import { HigherData } from "higherdata-sdk";

const higherdata = new HigherData({
  apiKey: "hd_example_replace_me",
  apiUrl: "https://higherdata.io",
});

const result = await higherdata.call("hygiene.repair", {
  "ids": [
    "11111111-1111-4111-8111-111111111111"
  ]
}, { execute: false });

Example

{
  "input": {
    "ids": [
      "11111111-1111-4111-8111-111111111111"
    ]
  },
  "output": {
    "dryRun": true,
    "changeSetId": null,
    "associations": [
      {
        "objectType": "contacts",
        "externalId": "31",
        "companyId": "11",
        "confidence": 90,
        "evidence": {
          "summary": "Contact email domain matches one company.",
          "fields": [
            "email domain"
          ]
        }
      }
    ]
  }
}