Skip to content

API reference

API: Data hygiene

Markdown version

MethodPathWhat it doesScope
POST/v1/hygiene/auditRun the hygiene agent now: it inspects the CRM and lists issues ranked by pipeline affected, each with a proposed fix (nothing changes until a person approves)settings:write
GET/v1/hygiene/issuesIssues the hygiene agent found, highest impact firstrecords:read
POST/v1/hygiene/issues/:id/applyApprove and apply an issue's fix as you (merges, reassignments, field fixes, follow-up tasks, archiving an unused field). The result is re-read to verify, and can be reverted except merges. (web app only)records:write
POST/v1/hygiene/issues/:id/dismissDismiss an issue (not a problem, or handled by hand) (web app only)records:write
POST/v1/hygiene/issues/:id/revertUndo an applied fix (values changed since are left alone and listed) (web app only)records:write
GET/v1/hygiene/rulesMonitoring rules: checks re-run nightly; the chosen person gets an email when new issues appearrecords:read
PUT/v1/hygiene/rulesChoose which checks run nightly and who's told (owner)settings:write

Examples

POST /v1/hygiene/audit

Run the hygiene agent now: it inspects the CRM and lists issues ranked by pipeline affected, each with a proposed fix (nothing changes until a person approves)

curl -s -X POST "https://api.closefinch.com/v1/hygiene/audit" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/hygiene/audit`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/hygiene/issues

Issues the hygiene agent found, highest impact first

curl -s "https://api.closefinch.com/v1/hygiene/issues" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/hygiene/issues`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

GET /v1/hygiene/rules

Monitoring rules: checks re-run nightly; the chosen person gets an email when new issues appear

curl -s "https://api.closefinch.com/v1/hygiene/rules" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/hygiene/rules`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

PUT /v1/hygiene/rules

Choose which checks run nightly and who's told (owner)

curl -s -X PUT "https://api.closefinch.com/v1/hygiene/rules" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/hygiene/rules`, {
  method: "PUT",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

Request and response schemas: https://www.closefinch.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.

Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.