ONE gmail:receive
← Receivers

gmail:receive

gmail family

Pulls what is new in the caller's own paired Gmail into their /messages, read-only and tainted as gmail:<address>; on the person's own key or passkey session only (never a cron); one pull a minute, up to 25 new and 25 from a backlog a pull, 500 a day. Nothing a sender writes makes mail vanish: no message date moves the cursor, a full page opens a backlog drained by Gmail's paging (backlog_pending until done), over 50 a day from one address lands marked capped, a sender with no plain address lands under gmail:unaddressed, and a message with no usable id is counted (gmail:get notShown)

Effect
signal
Fire-and-forget — the call returns once accepted, not once done.
Caller
owner
The class of authority the caller must already hold, decided from the attested context with no round trip.
Reversible
no
This cannot be undone. Dry-run it first where the contract allows.

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/signal/gmail:receive \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": {}}'

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.

Takes no arguments.

Response

The acknowledgement shape — the work itself completes after the call returns.

  • ok boolean
  • landed number
  • more boolean A backlog is still open: older new mail is still to come in on later pulls
  • backlog_pending number Messages in the open backlog not settled yet; exact up to 500 (then backlog_pending_capped), read in batches. 0 when no backlog. A sustained flood of new mail delays the backlog; this count stays visible meanwhile
  • backlog_pending_capped boolean The backlog count stopped at 500: at least that many
  • backlog_abandoned boolean Gmail refused to page the backlog 4 times running: the gap was settled and what it still held was counted into not_shown (with why)
  • capped number Landed this pull from an address over 50 today, marked capped (the From: is unauthenticated)
  • budget_held number Not landed this pull because the day's 500 is spent; they come in tomorrow (a delay, never a loss)
  • not_shown number Settled this pull without being shown: no usable message id (counted once), or refused by the inbox 3 times; added to gmail:get notShown
  • skipped "too_soon" Pulled less than a minute ago; nothing was asked of Gmail
  • error string sign_in | forbidden | session_required | key_required | not_paired | gmail_unreadable | no_db

Traffic

Every call to gmail:receive, 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 gmail:receive, 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

UI 1
  • one.ie/web/src/components/in/Inbox.tsx:220
API route 3
  • one.ie/web/src/lib/act-as.ts:225
  • one.ie/web/src/lib/receiver-index.generated.ts:206
  • one.ie/web/src/lib/resolvers/gmail.ts:108
→

Answered by

gmail:receive one.ie/web/src/lib/resolvers/gmail.ts:106 Dispatched through POST /api/signal/gmail:receive, after the envelope validates the payload.

gmail family · 2 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {}
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "landed": {
      "type": "number"
    },
    "more": {
      "description": "A backlog is still open: older new mail is still to come in on later pulls",
      "type": "boolean"
    },
    "backlog_pending": {
      "description": "Messages in the open backlog not settled yet; exact up to 500 (then backlog_pending_capped), read in batches. 0 when no backlog. A sustained flood of new mail delays the backlog; this count stays visible meanwhile",
      "type": "number"
    },
    "backlog_pending_capped": {
      "description": "The backlog count stopped at 500: at least that many",
      "type": "boolean"
    },
    "backlog_abandoned": {
      "description": "Gmail refused to page the backlog 4 times running: the gap was settled and what it still held was counted into not_shown (with why)",
      "type": "boolean"
    },
    "capped": {
      "description": "Landed this pull from an address over 50 today, marked capped (the From: is unauthenticated)",
      "type": "number"
    },
    "budget_held": {
      "description": "Not landed this pull because the day's 500 is spent; they come in tomorrow (a delay, never a loss)",
      "type": "number"
    },
    "not_shown": {
      "description": "Settled this pull without being shown: no usable message id (counted once), or refused by the inbox 3 times; added to gmail:get notShown",
      "type": "number"
    },
    "skipped": {
      "description": "Pulled less than a minute ago; nothing was asked of Gmail",
      "type": "string",
      "const": "too_soon"
    },
    "error": {
      "description": "sign_in | forbidden | session_required | key_required | not_paired | gmail_unreadable | no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}