Skip to main content

Start here

Use POST /v1/enrich to refresh a company record with structured data gathered from external web evidence. The endpoint is company-only in v1 and writes to built-in fields plus any explicitly mapped custom fields.

When to use it

Use enrichment when you want to:
  • fill in missing company profile fields
  • refresh stale company details from the web
  • collect field-level evidence before updating your CRM record
Required request fields:
  • object_type: must be company
  • record_id: the company record UUID

Send the request

curl -X POST "https://api.sanka.com/v1/enrich" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "object_type": "company",
    "record_id": "11111111-2222-3333-4444-555555555555",
    "custom_field_map": {
      "industry": "cf_12345",
      "employee_count": "cf_67890"
    }
  }'
Use the API playground in API Reference → Data Enrichment to test the same request interactively.

Review the response

The response includes:
  • updated_builtin_fields: built-in company fields written during the run
  • updated_custom_fields: mapped custom fields that were updated
  • proposed_fields: candidate values the pipeline found
  • field_evidence: source evidence for each accepted field
  • skipped_fields: fields that were rejected because confidence or overwrite rules did not pass
  • provider_meta: request metadata from the enrichment providers
The top-level response shape stays consistent with the rest of the API:
{
  "data": {
    "company_id": "<company_uuid>",
    "run_id": "<run_uuid>",
    "pipeline_version": "v1",
    "updated_builtin_fields": {},
    "updated_custom_fields": {},
    "proposed_fields": {},
    "field_evidence": {},
    "skipped_fields": {},
    "provider_meta": {}
  },
  "message": "ok",
  "ctx_id": "<ctx_id>"
}

Dry run and refresh

Use dry_run when you want proposals and evidence without writing data:
{
  "object_type": "company",
  "record_id": "11111111-2222-3333-4444-555555555555",
  "dry_run": true
}
Use force_refresh when you want the pipeline to overwrite existing values when the write policy allows it:
{
  "object_type": "company",
  "record_id": "11111111-2222-3333-4444-555555555555",
  "force_refresh": true
}