← Receivers

enrich:run

enrich family

Fill an actor's profile gaps from one source, keeping the source on every field: each value lands as appended.<source>.<field>. Never writes over a manual value — source `manual` is refused, and a field that already has appended.manual.<field> is kept, not written. Two sources that disagree are both kept.

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_actors
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
Idempotent
yes
Safe to retry as-is.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/enrich:run \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "aid": "person:anna", "source": "clearbit", "fields": { "company": "Byrne Dental", "role": "Dentist", "location": "Dublin" } }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • aid string required The actor to enrich. Must belong to the caller's group (the tenant wall is walked from the attested caller, never from this body).
  • source string required Where the values came from — one of: email · clearbit · apollo · linkedin · stripe · hubspot · salesforce · ghl · klaviyo · shopify · csv · telegram · agent. `manual` is refused (manual_is_human); anything else is refused (unknown_source). `email` derives name/company/website from the actor's email and ignores `fields`.
  • fields object optional The values this source supplies, by field — one of: name · company · role · location · website · linkedin · twitter · github · instagram · facebook · tiktok · youtube. An unknown field refuses the whole call (unknown_field, named). Required unless source is `email`.
  • email string optional source `email` only: the address to derive from. Defaults to the actor's own stored email.

Response

What comes back from the call.

  • ok boolean
  • aid string
  • source string
  • written object[] Every row written this call. Present only on ok:true, never empty — nothing to write answers ok:false nothing_to_fill.
  • kept string[] Fields NOT written because a manual value already holds them.
  • error string unauthenticated · aid_required · manual_is_human · unknown_source · unknown_field · no_db · not_your_contact · no_email · fields_required · store_unavailable · nothing_to_fill
  • field string With unknown_field: the field that was refused.

Traffic

Every call to enrich:run, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names enrich:run, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 2
  • one.ie/web/src/lib/receiver-index.generated.ts:125
  • one.ie/web/src/lib/resolvers/enrich.ts:33
→

Answered by

enrich:run one.ie/web/src/lib/resolvers/enrich.ts:143 Dispatched through POST /api/ask/enrich:run, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "aid": {
      "type": "string",
      "description": "The actor to enrich. Must belong to the caller's group (the tenant wall is walked from the attested caller, never from this body)."
    },
    "source": {
      "type": "string",
      "description": "Where the values came from — one of: email · clearbit · apollo · linkedin · stripe · hubspot · salesforce · ghl · klaviyo · shopify · csv · telegram · agent. `manual` is refused (manual_is_human); anything else is refused (unknown_source). `email` derives name/company/website from the actor's email and ignores `fields`."
    },
    "fields": {
      "description": "The values this source supplies, by field — one of: name · company · role · location · website · linkedin · twitter · github · instagram · facebook · tiktok · youtube. An unknown field refuses the whole call (unknown_field, named). Required unless source is `email`.",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "email": {
      "description": "source `email` only: the address to derive from. Defaults to the actor's own stored email.",
      "type": "string"
    }
  },
  "required": [
    "aid",
    "source"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "aid": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "written": {
      "description": "Every row written this call. Present only on ok:true, never empty — nothing to write answers ok:false nothing_to_fill.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "appended.<source>.<field>"
          },
          "field": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "field",
          "value"
        ]
      }
    },
    "kept": {
      "description": "Fields NOT written because a manual value already holds them.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "error": {
      "description": "unauthenticated · aid_required · manual_is_human · unknown_source · unknown_field · no_db · not_your_contact · no_email · fields_required · store_unavailable · nothing_to_fill",
      "type": "string"
    },
    "field": {
      "description": "With unknown_field: the field that was refused.",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}