ONE mail:receive
← Receivers

mail:receive

mail family

Delivers one inbound email from the mail-in Worker into the mailbox holder's inbox, read-only and tainted with the sender address; service caller with the Worker's signature over the whole delivery (MAIL_ATTEST_SECRET, no fallback) inside 15 minutes, acted on once per Message-ID

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/mail:receive \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "to": <string>, "from": <string>, "messageId": <string>, "rawKey": <string>, "attest": <string>, "ts": <number> }}'

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.

  • to string required
  • from string required
  • messageId string required
  • rawKey string required
  • attest string required
  • ts number required Unix seconds the Worker signed at; refused outside 15 minutes
  • workspace string optional The platform workspace the mail-in Worker nominates on the service lane; it names no mailbox (the address does) and authorises nothing
  • subject string optional
  • headerFrom string optional
  • text string optional
  • truncated boolean optional
  • auth object optional

Response

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

  • ok boolean
  • actor string
  • inboxId string | null
  • duplicate boolean
  • error string forbidden | not_configured | unattested | stale | bad_sender | unknown_mailbox | daily_cap | sender_cap | inbox_write_failed | no_db

Traffic

Every call to mail: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 mail: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

API route 2
  • one.ie/web/src/lib/receiver-index.generated.ts:239
  • one.ie/web/src/lib/resolvers/mail.ts:280
→

Answered by

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

mail family · 3 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "to": {
      "type": "string"
    },
    "from": {
      "type": "string"
    },
    "messageId": {
      "type": "string"
    },
    "rawKey": {
      "type": "string"
    },
    "attest": {
      "type": "string"
    },
    "ts": {
      "type": "number",
      "description": "Unix seconds the Worker signed at; refused outside 15 minutes"
    },
    "workspace": {
      "description": "The platform workspace the mail-in Worker nominates on the service lane; it names no mailbox (the address does) and authorises nothing",
      "type": "string"
    },
    "subject": {
      "type": "string"
    },
    "headerFrom": {
      "type": "string"
    },
    "text": {
      "type": "string"
    },
    "truncated": {
      "type": "boolean"
    },
    "auth": {
      "type": "object",
      "properties": {
        "spf": {
          "type": "string"
        },
        "dkim": {
          "type": "string"
        },
        "dmarc": {
          "type": "string"
        }
      },
      "required": [
        "spf",
        "dkim",
        "dmarc"
      ]
    }
  },
  "required": [
    "to",
    "from",
    "messageId",
    "rawKey",
    "attest",
    "ts"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "actor": {
      "type": "string"
    },
    "inboxId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "duplicate": {
      "type": "boolean"
    },
    "error": {
      "description": "forbidden | not_configured | unattested | stale | bad_sender | unknown_mailbox | daily_cap | sender_cap | inbox_write_failed | no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}