Enrich a record
Looks up missing information for a record from Lightfield’s enrichment providers and writes it back to it. Accepts contacts and accounts.
Enrichment runs in the background: this returns as soon as the run is created. Poll GET /v1/enrichmentRun/{runId} for its status. A record can only have one enrichment run at a time — if one is already in flight, this returns that run rather than starting a second. A 409 means another request claimed the record at the same moment; retry after a short wait.
Which fields are enriched, and whether a provider answer overwrites an existing value or is raised as a suggestion, come from the workspace’s enrichment settings. Naming fields explicitly also reaches fields set to enrich only on request, under the suggestion write policy; it never reaches a field turned off.
Required scopes: contacts:update to enrich a contact, accounts:update to enrich an account
Rate limit category: Write
Parameters
Body param: Fields to enrich, e.g. ["email", "title"]. Named fields are refreshed even when they already hold a value, so this is how a stale value is replaced. Omit to fill only the fields the record is missing; if any of those the workspace enriches only on request, no run starts and the response names them (manual_fields_unconfirmed). Naming a field the workspace’s settings enrich only on request enriches it, and its answer is raised as a suggestion rather than written over a value the record already holds. Naming a field the settings turn off is rejected with 400 enrichment_field_disabled. A named field is not used to look the record up — the run derives it fresh from the record’s other identifiers — so naming every identifier (a contact’s name and email together) leaves nothing to search by and is rejected with 400 enrichment_fields_not_enrichable, creating no run; refresh them one at a time. phone is turned off unless the workspace opts into it, so naming it is rejected with 400 enrichment_field_disabled; where it is turned on, it is filled only when another field’s lookup happens to return it, so requesting it on its own is rejected with 400 enrichment_fields_not_enrichable.
Enrich a record
lightfield enrichment-run enrich \
--api-key 'My API Key' \
--entity-slug contacts \
--entity-id entityId{
"enrichmentRun": {
"id": "id",
"completedAt": "completedAt",
"createdAt": "createdAt",
"entityId": "entityId",
"entityType": "contact",
"startedAt": "startedAt",
"status": "queued",
"targetFields": [
"string"
],
"trigger": "creation",
"updatedAt": "updatedAt"
},
"manualFields": [
"string"
],
"plannedFields": [
"string"
],
"reason": "no_targets",
"status": "started"
}Returns Examples
{
"enrichmentRun": {
"id": "id",
"completedAt": "completedAt",
"createdAt": "createdAt",
"entityId": "entityId",
"entityType": "contact",
"startedAt": "startedAt",
"status": "queued",
"targetFields": [
"string"
],
"trigger": "creation",
"updatedAt": "updatedAt"
},
"manualFields": [
"string"
],
"plannedFields": [
"string"
],
"reason": "no_targets",
"status": "started"
}