CRM Data Intelligence API Documentation

Normalize CRM exports, explain duplicate matches, and suggest cleanup steps from the records and facts supplied in the request. Payment is the exact USDC price on Base with x402.

POSThttps://brainiac.software/api/v1/crm-intelligence/contact-normalize$0.03 USDC

Normalize CRM contacts

Normalize names, emails, phone numbers, company names, and addresses from a CSV or JSON contact export. Original values stay beside the normalized values.

Body

FieldRequiredNotes
contactsNoarray; Array
csvNostring
jsonNostring
fileNoobject; Object

Request exampleJSON

{
  "csv": "first_name,last_name,email,phone,company,street,notes\nAda,Lovelace,Ada@Analytical.example,\"(555) 010-1234\",Analytical Engines Inc.,1 King St,skip\n"
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T11:00:00.000Z",
  "crmModified": false,
  "detailsInvented": false,
  "status": "normalized",
  "recordCount": 1,
  "contacts": [
    {
      "id": "row:1",
      "row": 1,
      "nameComposed": true,
      "original": {
        "firstName": "Ada",
        "lastName": "Lovelace",
        "fullName": "",
        "email": "Ada@Analytical.example",
        "phone": "(555) 010-1234",
        "company": "Analytical Engines Inc.",
        "title": "",
        "street": "1 King St",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": ""
      },
      "normalized": {
        "firstName": "Ada",
        "lastName": "Lovelace",
        "fullName": "Ada Lovelace",
        "email": "ada@analytical.example",
        "phone": "5550101234",
        "company": "Analytical Engines Inc.",
        "title": "",
        "street": "1 King Street",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": ""
      },
      "emailStatus": "valid",
      "phoneDigits": "5550101234"
    }
  ],
  "issues": [
    {
      "kind": "ignored",
      "code": "unknown_column",
      "recordId": "",
      "field": "notes",
      "detail": "The column notes is not a supported CRM field and was ignored."
    }
  ],
  "limitations": [
    "No CRM system was contacted or changed.",
    "Contact details, company attributes, and relationships are not invented.",
    "Enrichment copies only caller-supplied facts into empty fields.",
    "A fuzzy match is a suggestion with a confidence level, not a completed merge.",
    "Records with different email addresses are not treated as the same person."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/crm-intelligence/contact-normalize" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "csv": "first_name,last_name,email,phone,company,street,notes\nAda,Lovelace,Ada@Analytical.example,\"(555) 010-1234\",Analytical Engines Inc.,1 King St,skip\n"
}
JSON
POSThttps://brainiac.software/api/v1/crm-intelligence/company-normalize$0.03 USDC

Normalize CRM companies

Normalize company names, domains, phone numbers, and addresses from a CSV or JSON company export. A trailing legal suffix stays in the name and is used only as a match key.

Body

FieldRequiredNotes
companiesNoarray; Array
csvNostring
jsonNostring
fileNoobject; Object

Request exampleJSON

{
  "csv": "name,website,industry\nAnalytical Engines Inc.,https://www.Analytical.example,Software\n"
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T11:00:00.000Z",
  "crmModified": false,
  "detailsInvented": false,
  "status": "normalized",
  "recordCount": 1,
  "companies": [
    {
      "id": "row:1",
      "row": 1,
      "original": {
        "name": "Analytical Engines Inc.",
        "domain": "https://www.Analytical.example",
        "phone": "",
        "street": "",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": "",
        "industry": "Software"
      },
      "normalized": {
        "name": "Analytical Engines Inc.",
        "domain": "analytical.example",
        "phone": "",
        "street": "",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": "",
        "industry": "Software"
      },
      "phoneDigits": ""
    }
  ],
  "issues": [],
  "limitations": [
    "No CRM system was contacted or changed.",
    "Contact details, company attributes, and relationships are not invented.",
    "Enrichment copies only caller-supplied facts into empty fields.",
    "A fuzzy match is a suggestion with a confidence level, not a completed merge.",
    "Records with different email addresses are not treated as the same person."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/crm-intelligence/company-normalize" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "csv": "name,website,industry\nAnalytical Engines Inc.,https://www.Analytical.example,Software\n"
}
JSON
POSThttps://brainiac.software/api/v1/crm-intelligence/duplicate-contact-detect$0.05 USDC

Detect duplicate contacts

Find duplicate contacts with explainable rules and confidence levels. Different email addresses are not treated as the same person. Safe merge suggestions copy only empty fields and do not change a CRM.

Body

FieldRequiredNotes
contactsNoarray; Array
csvNostring
jsonNostring
fileNoobject; Object

Request exampleJSON

{
  "contacts": [
    {
      "id": "c1",
      "firstName": "Ada",
      "lastName": "Lovelace",
      "email": "Ada@Analytical.example",
      "phone": "(555) 010-1234",
      "company": "Analytical Engines Inc.",
      "street": "1 King St"
    },
    {
      "id": "c2",
      "fullName": "Ada Lovelace",
      "email": "ada@analytical.example",
      "phone": "5550101234",
      "company": "Analytical Engines",
      "street": "1 King Street",
      "title": "Engineer"
    },
    {
      "id": "c3",
      "firstName": "Grace",
      "lastName": "Hopper",
      "email": "grace@navy.example",
      "company": "Navy"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T11:00:00.000Z",
  "crmModified": false,
  "detailsInvented": false,
  "status": "checked",
  "recordCount": 3,
  "pairs": [
    {
      "leftId": "c1",
      "leftRow": 1,
      "rightId": "c2",
      "rightRow": 2,
      "rule": "email_exact",
      "confidence": 0.99,
      "level": "confirmed",
      "detail": "Both emails normalize to ada@analytical.example."
    }
  ],
  "merges": [
    {
      "survivorId": "c1",
      "duplicateId": "c2",
      "safe": true,
      "rule": "email_exact",
      "confidence": 0.99,
      "copies": [
        {
          "field": "title",
          "value": "Engineer"
        }
      ],
      "conflicts": [
        {
          "field": "company",
          "survivor": "Analytical Engines Inc.",
          "duplicate": "Analytical Engines"
        }
      ]
    }
  ],
  "issues": [],
  "limitations": [
    "No CRM system was contacted or changed.",
    "Contact details, company attributes, and relationships are not invented.",
    "Enrichment copies only caller-supplied facts into empty fields.",
    "A fuzzy match is a suggestion with a confidence level, not a completed merge.",
    "Records with different email addresses are not treated as the same person."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/crm-intelligence/duplicate-contact-detect" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "contacts": [
    {
      "id": "c1",
      "firstName": "Ada",
      "lastName": "Lovelace",
      "email": "Ada@Analytical.example",
      "phone": "(555) 010-1234",
      "company": "Analytical Engines Inc.",
      "street": "1 King St"
    },
    {
      "id": "c2",
      "fullName": "Ada Lovelace",
      "email": "ada@analytical.example",
      "phone": "5550101234",
      "company": "Analytical Engines",
      "street": "1 King Street",
      "title": "Engineer"
    },
    {
      "id": "c3",
      "firstName": "Grace",
      "lastName": "Hopper",
      "email": "grace@navy.example",
      "company": "Navy"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/crm-intelligence/duplicate-company-detect$0.05 USDC

Detect duplicate companies

Find duplicate companies by a normalized domain or company-name key, and flag fuzzy name matches with a confidence level. Different domains are not merged. Suggestions do not change a CRM.

Body

FieldRequiredNotes
companiesNoarray; Array
csvNostring
jsonNostring
fileNoobject; Object

Request exampleJSON

{
  "companies": [
    {
      "id": "co1",
      "name": "Analytical Engines Inc.",
      "domain": "https://www.Analytical.example",
      "street": "1 King St"
    },
    {
      "id": "co2",
      "name": "Analytical Engines",
      "domain": "analytical.example",
      "industry": "Software"
    },
    {
      "id": "co3",
      "name": "Analytical Engine",
      "domain": "other.example"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T11:00:00.000Z",
  "crmModified": false,
  "detailsInvented": false,
  "status": "checked",
  "recordCount": 3,
  "pairs": [
    {
      "leftId": "co1",
      "leftRow": 1,
      "rightId": "co2",
      "rightRow": 2,
      "rule": "domain_exact",
      "confidence": 0.99,
      "level": "confirmed",
      "detail": "Both domains normalize to analytical.example."
    }
  ],
  "merges": [
    {
      "survivorId": "co1",
      "duplicateId": "co2",
      "safe": true,
      "rule": "domain_exact",
      "confidence": 0.99,
      "copies": [
        {
          "field": "industry",
          "value": "Software"
        }
      ],
      "conflicts": [
        {
          "field": "name",
          "survivor": "Analytical Engines Inc.",
          "duplicate": "Analytical Engines"
        }
      ]
    }
  ],
  "issues": [],
  "limitations": [
    "No CRM system was contacted or changed.",
    "Contact details, company attributes, and relationships are not invented.",
    "Enrichment copies only caller-supplied facts into empty fields.",
    "A fuzzy match is a suggestion with a confidence level, not a completed merge.",
    "Records with different email addresses are not treated as the same person."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/crm-intelligence/duplicate-company-detect" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "companies": [
    {
      "id": "co1",
      "name": "Analytical Engines Inc.",
      "domain": "https://www.Analytical.example",
      "street": "1 King St"
    },
    {
      "id": "co2",
      "name": "Analytical Engines",
      "domain": "analytical.example",
      "industry": "Software"
    },
    {
      "id": "co3",
      "name": "Analytical Engine",
      "domain": "other.example"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/crm-intelligence/record-enrichment-from-input$0.04 USDC

Enrich CRM records from input

Copy caller-supplied facts into empty contact fields. A fact never overwrites a value that is already present, and no contact detail is invented.

Body

FieldRequiredNotes
contactsNoarray; Array
csvNostring
jsonNostring
fileNoobject; Object
factsNoarray; Array

Request exampleJSON

{
  "contacts": [
    {
      "id": "c1",
      "firstName": "Ada",
      "lastName": "Lovelace",
      "email": "ada@analytical.example",
      "phone": "(555) 010-1234",
      "company": "Analytical Engines"
    },
    {
      "id": "c3",
      "firstName": "Grace",
      "lastName": "Hopper",
      "email": "grace@navy.example",
      "company": "Navy"
    }
  ],
  "facts": [
    {
      "match": "email",
      "value": "ada@analytical.example",
      "phone": "+44 20 7946 0991",
      "title": "Mathematician"
    },
    {
      "match": "email",
      "value": "grace@navy.example",
      "phone": "+1 555 010 9999",
      "title": "Rear Admiral"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T11:00:00.000Z",
  "crmModified": false,
  "detailsInvented": false,
  "status": "suggested",
  "recordCount": 2,
  "contacts": [
    {
      "id": "c1",
      "row": 1,
      "nameComposed": true,
      "original": {
        "firstName": "Ada",
        "lastName": "Lovelace",
        "fullName": "",
        "email": "ada@analytical.example",
        "phone": "(555) 010-1234",
        "company": "Analytical Engines",
        "title": "",
        "street": "",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": ""
      },
      "normalized": {
        "firstName": "Ada",
        "lastName": "Lovelace",
        "fullName": "Ada Lovelace",
        "email": "ada@analytical.example",
        "phone": "5550101234",
        "company": "Analytical Engines",
        "title": "",
        "street": "",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": ""
      },
      "emailStatus": "valid",
      "phoneDigits": "5550101234"
    },
    {
      "id": "c3",
      "row": 2,
      "nameComposed": true,
      "original": {
        "firstName": "Grace",
        "lastName": "Hopper",
        "fullName": "",
        "email": "grace@navy.example",
        "phone": "",
        "company": "Navy",
        "title": "",
        "street": "",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": ""
      },
      "normalized": {
        "firstName": "Grace",
        "lastName": "Hopper",
        "fullName": "Grace Hopper",
        "email": "grace@navy.example",
        "phone": "",
        "company": "Navy",
        "title": "",
        "street": "",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": ""
      },
      "emailStatus": "valid",
      "phoneDigits": ""
    }
  ],
  "suggestions": [
    {
      "id": "c1",
      "added": [
        {
          "field": "title",
          "value": "Mathematician",
          "source": "caller_fact"
        }
      ],
      "conflicts": [
        {
          "field": "phone",
          "current": "5550101234",
          "supplied": "+442079460991"
        }
      ]
    },
    {
      "id": "c3",
      "added": [
        {
          "field": "phone",
          "value": "+15550109999",
          "source": "caller_fact"
        },
        {
          "field": "title",
          "value": "Rear Admiral",
          "source": "caller_fact"
        }
      ],
      "conflicts": []
    }
  ],
  "issues": [],
  "limitations": [
    "No CRM system was contacted or changed.",
    "Contact details, company attributes, and relationships are not invented.",
    "Enrichment copies only caller-supplied facts into empty fields.",
    "A fuzzy match is a suggestion with a confidence level, not a completed merge.",
    "Records with different email addresses are not treated as the same person."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/crm-intelligence/record-enrichment-from-input" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "contacts": [
    {
      "id": "c1",
      "firstName": "Ada",
      "lastName": "Lovelace",
      "email": "ada@analytical.example",
      "phone": "(555) 010-1234",
      "company": "Analytical Engines"
    },
    {
      "id": "c3",
      "firstName": "Grace",
      "lastName": "Hopper",
      "email": "grace@navy.example",
      "company": "Navy"
    }
  ],
  "facts": [
    {
      "match": "email",
      "value": "ada@analytical.example",
      "phone": "+44 20 7946 0991",
      "title": "Mathematician"
    },
    {
      "match": "email",
      "value": "grace@navy.example",
      "phone": "+1 555 010 9999",
      "title": "Rear Admiral"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/crm-intelligence/data-quality-audit$0.04 USDC

Audit CRM data quality

Report missing names, invalid emails, short phone numbers, missing companies, and duplicate records. A company is not inferred from an email domain.

Body

FieldRequiredNotes
contactsNoarray; Array
csvNostring
jsonNostring
fileNoobject; Object
companiesNoarray; Array

Request exampleJSON

{
  "contacts": [
    {
      "id": "c1",
      "firstName": "Ada",
      "lastName": "Lovelace",
      "email": "ada@analytical.example",
      "company": "Analytical Engines"
    },
    {
      "id": "c2",
      "email": "ada@analytical.example",
      "company": "Analytical Engines"
    },
    {
      "id": "c4",
      "firstName": "No",
      "lastName": "Mail",
      "email": "not-an-email",
      "phone": "123"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T11:00:00.000Z",
  "crmModified": false,
  "detailsInvented": false,
  "status": "checked",
  "contactCount": 3,
  "companyCount": 0,
  "duplicateCount": 1,
  "issues": [
    {
      "kind": "missing",
      "code": "missing",
      "recordId": "c2",
      "field": "fullName",
      "detail": "The contact has no name."
    },
    {
      "kind": "conflict",
      "code": "invalid_email",
      "recordId": "c4",
      "field": "email",
      "detail": "The email could not be normalized. It was not corrected."
    },
    {
      "kind": "conflict",
      "code": "phone_short",
      "recordId": "c4",
      "field": "phone",
      "detail": "The phone number has fewer than 7 digits, so it was not used for matching."
    },
    {
      "kind": "missing",
      "code": "missing",
      "recordId": "c4",
      "field": "company",
      "detail": "The contact has no company. A company was not inferred from the email domain."
    },
    {
      "kind": "duplicate",
      "code": "email_exact",
      "recordId": "c1",
      "field": "c2",
      "detail": "Both emails normalize to ada@analytical.example."
    }
  ],
  "limitations": [
    "No CRM system was contacted or changed.",
    "Contact details, company attributes, and relationships are not invented.",
    "Enrichment copies only caller-supplied facts into empty fields.",
    "A fuzzy match is a suggestion with a confidence level, not a completed merge.",
    "Records with different email addresses are not treated as the same person."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/crm-intelligence/data-quality-audit" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "contacts": [
    {
      "id": "c1",
      "firstName": "Ada",
      "lastName": "Lovelace",
      "email": "ada@analytical.example",
      "company": "Analytical Engines"
    },
    {
      "id": "c2",
      "email": "ada@analytical.example",
      "company": "Analytical Engines"
    },
    {
      "id": "c4",
      "firstName": "No",
      "lastName": "Mail",
      "email": "not-an-email",
      "phone": "123"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/crm-intelligence/contact-relationship-match$0.05 USDC

Match contacts to companies

Link each contact to a company that was supplied in the same request, by company-name key or email domain. A company that was not supplied is not created.

Body

FieldRequiredNotes
contactsNoarray; Array
companiesNoarray; Array
csvNostring
jsonNostring
fileNoobject; Object

Request exampleJSON

{
  "contacts": [
    {
      "id": "c1",
      "firstName": "Ada",
      "lastName": "Lovelace",
      "email": "ada@analytical.example",
      "company": "Analytical Engines Inc."
    },
    {
      "id": "c3",
      "firstName": "Grace",
      "lastName": "Hopper",
      "email": "grace@navy.example",
      "company": "Navy"
    },
    {
      "id": "c5",
      "fullName": "Charles Babbage",
      "company": "Other Engines"
    }
  ],
  "companies": [
    {
      "id": "co1",
      "name": "Analytical Engines",
      "domain": "analytical.example"
    },
    {
      "id": "co2",
      "name": "Other Engines",
      "domain": "other.example"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T11:00:00.000Z",
  "crmModified": false,
  "detailsInvented": false,
  "status": "matched",
  "relationships": [
    {
      "contactId": "c1",
      "companyId": "co1",
      "rule": "email_domain",
      "confidence": 0.95,
      "level": "confirmed",
      "detail": "The email domain analytical.example matches the supplied company domain."
    },
    {
      "contactId": "c3",
      "companyId": "",
      "rule": "",
      "confidence": 0,
      "level": "unmatched",
      "detail": "No supplied company matches the contact name or email domain. A company was not created."
    },
    {
      "contactId": "c5",
      "companyId": "co2",
      "rule": "company_name",
      "confidence": 0.9,
      "level": "confirmed",
      "detail": "The contact company key matches the supplied company name key."
    }
  ],
  "issues": [],
  "limitations": [
    "No CRM system was contacted or changed.",
    "Contact details, company attributes, and relationships are not invented.",
    "Enrichment copies only caller-supplied facts into empty fields.",
    "A fuzzy match is a suggestion with a confidence level, not a completed merge.",
    "Records with different email addresses are not treated as the same person."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/crm-intelligence/contact-relationship-match" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "contacts": [
    {
      "id": "c1",
      "firstName": "Ada",
      "lastName": "Lovelace",
      "email": "ada@analytical.example",
      "company": "Analytical Engines Inc."
    },
    {
      "id": "c3",
      "firstName": "Grace",
      "lastName": "Hopper",
      "email": "grace@navy.example",
      "company": "Navy"
    },
    {
      "id": "c5",
      "fullName": "Charles Babbage",
      "company": "Other Engines"
    }
  ],
  "companies": [
    {
      "id": "co1",
      "name": "Analytical Engines",
      "domain": "analytical.example"
    },
    {
      "id": "co2",
      "name": "Other Engines",
      "domain": "other.example"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/crm-intelligence/database-cleanup-report$0.12 USDC

Report a CRM cleanup

Combine normalized records, duplicate pairs, safe merge suggestions, caller-fact enrichment, relationship matches, and quality issues. No external CRM is changed.

Body

FieldRequiredNotes
contactsNoarray; Array
csvNostring
jsonNostring
fileNoobject; Object
companiesNoarray; Array
factsNoarray; Array

Request exampleJSON

{
  "json": "{\"contacts\":[{\"id\":\"c1\",\"firstName\":\"Ada\",\"lastName\":\"Lovelace\",\"email\":\"Ada@Analytical.example\",\"phone\":\"(555) 010-1234\",\"company\":\"Analytical Engines Inc.\",\"street\":\"1 King St\"},{\"id\":\"c2\",\"fullName\":\"Ada Lovelace\",\"email\":\"ada@analytical.example\",\"phone\":\"5550101234\",\"company\":\"Analytical Engines\",\"street\":\"1 King Street\",\"title\":\"Engineer\"},{\"id\":\"c3\",\"firstName\":\"Grace\",\"lastName\":\"Hopper\",\"email\":\"grace@navy.example\",\"company\":\"Navy\"}],\"companies\":[{\"id\":\"co1\",\"name\":\"Analytical Engines Inc.\",\"domain\":\"https://www.Analytical.example\",\"street\":\"1 King St\"},{\"id\":\"co2\",\"name\":\"Analytical Engines\",\"domain\":\"analytical.example\",\"industry\":\"Software\"}]}",
  "facts": [
    {
      "match": "email",
      "value": "ada@analytical.example",
      "phone": "+44 20 7946 0991",
      "title": "Mathematician"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T11:00:00.000Z",
  "crmModified": false,
  "detailsInvented": false,
  "status": "suggested",
  "contactCount": 3,
  "companyCount": 2,
  "contacts": [
    {
      "id": "c1",
      "row": 1,
      "nameComposed": true,
      "original": {
        "firstName": "Ada",
        "lastName": "Lovelace",
        "fullName": "",
        "email": "Ada@Analytical.example",
        "phone": "(555) 010-1234",
        "company": "Analytical Engines Inc.",
        "title": "",
        "street": "1 King St",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": ""
      },
      "normalized": {
        "firstName": "Ada",
        "lastName": "Lovelace",
        "fullName": "Ada Lovelace",
        "email": "ada@analytical.example",
        "phone": "5550101234",
        "company": "Analytical Engines Inc.",
        "title": "",
        "street": "1 King Street",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": ""
      },
      "emailStatus": "valid",
      "phoneDigits": "5550101234"
    },
    {
      "id": "c2",
      "row": 2,
      "nameComposed": false,
      "original": {
        "firstName": "",
        "lastName": "",
        "fullName": "Ada Lovelace",
        "email": "ada@analytical.example",
        "phone": "5550101234",
        "company": "Analytical Engines",
        "title": "Engineer",
        "street": "1 King Street",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": ""
      },
      "normalized": {
        "firstName": "",
        "lastName": "",
        "fullName": "Ada Lovelace",
        "email": "ada@analytical.example",
        "phone": "5550101234",
        "company": "Analytical Engines",
        "title": "Engineer",
        "street": "1 King Street",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": ""
      },
      "emailStatus": "valid",
      "phoneDigits": "5550101234"
    },
    {
      "id": "c3",
      "row": 3,
      "nameComposed": true,
      "original": {
        "firstName": "Grace",
        "lastName": "Hopper",
        "fullName": "",
        "email": "grace@navy.example",
        "phone": "",
        "company": "Navy",
        "title": "",
        "street": "",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": ""
      },
      "normalized": {
        "firstName": "Grace",
        "lastName": "Hopper",
        "fullName": "Grace Hopper",
        "email": "grace@navy.example",
        "phone": "",
        "company": "Navy",
        "title": "",
        "street": "",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": ""
      },
      "emailStatus": "valid",
      "phoneDigits": ""
    }
  ],
  "companies": [
    {
      "id": "co1",
      "row": 1,
      "original": {
        "name": "Analytical Engines Inc.",
        "domain": "https://www.Analytical.example",
        "phone": "",
        "street": "1 King St",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": "",
        "industry": ""
      },
      "normalized": {
        "name": "Analytical Engines Inc.",
        "domain": "analytical.example",
        "phone": "",
        "street": "1 King Street",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": "",
        "industry": ""
      },
      "phoneDigits": ""
    },
    {
      "id": "co2",
      "row": 2,
      "original": {
        "name": "Analytical Engines",
        "domain": "analytical.example",
        "phone": "",
        "street": "",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": "",
        "industry": "Software"
      },
      "normalized": {
        "name": "Analytical Engines",
        "domain": "analytical.example",
        "phone": "",
        "street": "",
        "city": "",
        "region": "",
        "postalCode": "",
        "country": "",
        "industry": "Software"
      },
      "phoneDigits": ""
    }
  ],
  "contactPairs": [
    {
      "leftId": "c1",
      "leftRow": 1,
      "rightId": "c2",
      "rightRow": 2,
      "rule": "email_exact",
      "confidence": 0.99,
      "level": "confirmed",
      "detail": "Both emails normalize to ada@analytical.example."
    }
  ],
  "companyPairs": [
    {
      "leftId": "co1",
      "leftRow": 1,
      "rightId": "co2",
      "rightRow": 2,
      "rule": "domain_exact",
      "confidence": 0.99,
      "level": "confirmed",
      "detail": "Both domains normalize to analytical.example."
    }
  ],
  "merges": [
    {
      "survivorId": "c1",
      "duplicateId": "c2",
      "safe": true,
      "rule": "email_exact",
      "confidence": 0.99,
      "copies": [
        {
          "field": "title",
          "value": "Engineer"
        }
      ],
      "conflicts": [
        {
          "field": "company",
          "survivor": "Analytical Engines Inc.",
          "duplicate": "Analytical Engines"
        }
      ]
    },
    {
      "survivorId": "co1",
      "duplicateId": "co2",
      "safe": true,
      "rule": "domain_exact",
      "confidence": 0.99,
      "copies": [
        {
          "field": "industry",
          "value": "Software"
        }
      ],
      "conflicts": [
        {
          "field": "name",
          "survivor": "Analytical Engines Inc.",
          "duplicate": "Analytical Engines"
        }
      ]
    }
  ],
  "suggestions": [
    {
      "id": "c1",
      "added": [
        {
          "field": "title",
          "value": "Mathematician",
          "source": "caller_fact"
        }
      ],
      "conflicts": [
        {
          "field": "phone",
          "current": "5550101234",
          "supplied": "+442079460991"
        }
      ]
    },
    {
      "id": "c2",
      "added": [],
      "conflicts": [
        {
          "field": "phone",
          "current": "5550101234",
          "supplied": "+442079460991"
        },
        {
          "field": "title",
          "current": "Engineer",
          "supplied": "Mathematician"
        }
      ]
    },
    {
      "id": "c3",
      "added": [],
      "conflicts": []
    }
  ],
  "relationships": [
    {
      "contactId": "c1",
      "companyId": "co1",
      "rule": "email_domain",
      "confidence": 0.95,
      "level": "confirmed",
      "detail": "The email domain analytical.example matches the supplied company domain."
    },
    {
      "contactId": "c2",
      "companyId": "co1",
      "rule": "email_domain",
      "confidence": 0.95,
      "level": "confirmed",
      "detail": "The email domain analytical.example matches the supplied company domain."
    },
    {
      "contactId": "c3",
      "companyId": "",
      "rule": "",
      "confidence": 0,
      "level": "unmatched",
      "detail": "No supplied company matches the contact name or email domain. A company was not created."
    }
  ],
  "issues": [],
  "limitations": [
    "No CRM system was contacted or changed.",
    "Contact details, company attributes, and relationships are not invented.",
    "Enrichment copies only caller-supplied facts into empty fields.",
    "A fuzzy match is a suggestion with a confidence level, not a completed merge.",
    "Records with different email addresses are not treated as the same person."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/crm-intelligence/database-cleanup-report" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "json": "{\"contacts\":[{\"id\":\"c1\",\"firstName\":\"Ada\",\"lastName\":\"Lovelace\",\"email\":\"Ada@Analytical.example\",\"phone\":\"(555) 010-1234\",\"company\":\"Analytical Engines Inc.\",\"street\":\"1 King St\"},{\"id\":\"c2\",\"fullName\":\"Ada Lovelace\",\"email\":\"ada@analytical.example\",\"phone\":\"5550101234\",\"company\":\"Analytical Engines\",\"street\":\"1 King Street\",\"title\":\"Engineer\"},{\"id\":\"c3\",\"firstName\":\"Grace\",\"lastName\":\"Hopper\",\"email\":\"grace@navy.example\",\"company\":\"Navy\"}],\"companies\":[{\"id\":\"co1\",\"name\":\"Analytical Engines Inc.\",\"domain\":\"https://www.Analytical.example\",\"street\":\"1 King St\"},{\"id\":\"co2\",\"name\":\"Analytical Engines\",\"domain\":\"analytical.example\",\"industry\":\"Software\"}]}",
  "facts": [
    {
      "match": "email",
      "value": "ada@analytical.example",
      "phone": "+44 20 7946 0991",
      "title": "Mathematician"
    }
  ]
}
JSON