ONE lead:reply
← Receivers

lead:reply

lead family

Sends a new lead the first reply from the caller's own workspace, at once: one transactional email through message:send, with the workspace's booking link when it has a bookable service, and records the seconds from the capture to the reply on the lead (meta.lead.firstReply) for the monthly report. One reply per address per workspace in 14 days (the reservation row rides agent_events_warm's 14-day purge); at most 100 first replies a UTC day per workspace and 3 a UTC day per address across every workspace — every bound keys on the inbox (lower-cased, +tag dropped, gmail dots folded); the email says a stranger can ignore it and carries an unsubscribe link signed for the inbox, so following it blocks every spelling; a canary lead, a suppressed or a declined address gets nothing and nothing is recorded

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
no
This cannot be undone. Dry-run it first where the contract allows.
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:reply \
  -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 address the lead typed — the lead-follow-up path passes $trigger.email. It must be a plain addr-spec (no display name, angle brackets, quotes, lists or IP literal; broadcast/address.ts strictAddress), and the reply goes to that address as typed (domain lower-cased), while every bound, the stop link and consent key on its canonical form (lower-cased, +tag dropped, gmail dots folded). Anything else answers {ok:true, sent:false, reason:'no_email'}
  • personId string | null optional The lead's contact id from lead:capture ($trigger.personId). Used only to read the capture time and write the minutes, and only when it is a contact of the caller's own workspace; otherwise the reply still goes, unrecorded

Response

What comes back from the call.

  • ok boolean
  • sent boolean true = the email left through message:send
  • reason string Why nothing was sent, when ok is true and sent is false: no_email | already_replied | daily_cap (this workspace's 100 a day) | address_daily_cap (this inbox's 3 a day across every workspace) | cap_unreadable | canary (a readiness walk's test lead) | canary_unreadable | suppressed (the typed address or its inbox unsubscribed from this workspace) | suppression_unreadable | a message:send refusal
  • bookingUrl string | null The booking link the reply carried; null when the workspace has no active bookable service
  • seconds number | null Capture to reply; null when the capture time could not be read, and then nothing is recorded
  • minutes number | null
  • withinTarget boolean | null seconds <= 300, the five-minute speed-to-lead target
  • error string unauthenticated | no_db | send_failed (the send threw; nothing recorded, a later run may try again)

Traffic

Every call to lead:reply, 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:reply, 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:214
  • one.ie/web/src/lib/reports/install.ts:55
Workflow 1
  • one.ie/web/src/lib/workflow-templates.ts:516
→

Answered by

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

lead family · 1 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "The address the lead typed — the lead-follow-up path passes $trigger.email. It must be a plain addr-spec (no display name, angle brackets, quotes, lists or IP literal; broadcast/address.ts strictAddress), and the reply goes to that address as typed (domain lower-cased), while every bound, the stop link and consent key on its canonical form (lower-cased, +tag dropped, gmail dots folded). Anything else answers {ok:true, sent:false, reason:'no_email'}"
    },
    "personId": {
      "description": "The lead's contact id from lead:capture ($trigger.personId). Used only to read the capture time and write the minutes, and only when it is a contact of the caller's own workspace; otherwise the reply still goes, unrecorded",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "email"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "sent": {
      "description": "true = the email left through message:send",
      "type": "boolean"
    },
    "reason": {
      "description": "Why nothing was sent, when ok is true and sent is false: no_email | already_replied | daily_cap (this workspace's 100 a day) | address_daily_cap (this inbox's 3 a day across every workspace) | cap_unreadable | canary (a readiness walk's test lead) | canary_unreadable | suppressed (the typed address or its inbox unsubscribed from this workspace) | suppression_unreadable | a message:send refusal",
      "type": "string"
    },
    "bookingUrl": {
      "description": "The booking link the reply carried; null when the workspace has no active bookable service",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "seconds": {
      "description": "Capture to reply; null when the capture time could not be read, and then nothing is recorded",
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "minutes": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "withinTarget": {
      "description": "seconds <= 300, the five-minute speed-to-lead target",
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "description": "unauthenticated | no_db | send_failed (the send threw; nothing recorded, a later run may try again)",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}