ONE lead:get
← Receivers

lead:get

lead family

Answers whether a lead has booked with the caller's own workspace since they were captured, or been moved on (a person or agent tagged them booked, replied, customer, won or lost), so a follow-up sequence stops instead of nudging them. A read that fails answers engaged:true with why 'unreadable': a sequence stops rather than nudge on a guess. An inbound email reply is not read by any door yet; a reply counts once the contact is tagged replied

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_workflows
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.
Version
1.0.0
Pin this to keep a contract stable; additive bumps never break callers.

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/lead:get \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "email": "sam@example.com", "personId": "p_123" }}'

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.

  • email string required The lead's address ($trigger.email); a booking matches it as typed or by its canonical inbox
  • personId string | null optional The lead's contact id ($trigger.personId). Its capture time bounds the booking search and its tags are read, only when it is a contact of the caller's own workspace

Response

What comes back from the call.

  • ok boolean
  • engaged boolean true = stop the sequence
  • why string | null booked | replied | moved_on | unreadable; null when not engaged
  • error string unauthenticated | no_db

Traffic

Every call to lead:get, 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 lead:get, 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 1
  • one.ie/web/src/lib/receiver-index.generated.ts:214
Workflow 1
  • one.ie/web/src/lib/workflow-templates.ts:819
→

Answered by

lead:get one.ie/web/src/lib/resolvers/lead-reply.ts:53 Dispatched through POST /api/ask/lead:get, after the envelope validates the payload.

lead family · 2 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "The lead's address ($trigger.email); a booking matches it as typed or by its canonical inbox"
    },
    "personId": {
      "description": "The lead's contact id ($trigger.personId). Its capture time bounds the booking search and its tags are read, only when it is a contact of the caller's own workspace",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "email"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "engaged": {
      "description": "true = stop the sequence",
      "type": "boolean"
    },
    "why": {
      "description": "booked | replied | moved_on | unreadable; null when not engaged",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "description": "unauthenticated | no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}