ONE email:subject-ideas
← Receivers

email:subject-ideas

email family

chatmcp

Five subject + preview-text pairs for a draft email, from its own words, the group's brand voice and its past winners (decided A/B winners, then best click rate with 20+ delivered over the last 14 days). Each pair passed deterministic checks: 60 characters or fewer, no !! or ALL CAPS the body does not write, no number, price, percent or offer word the body does not make. Metered like every model door (Haiku)

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
owner
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
variable
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
Idempotent
no
Not safe to blind-retry — dedupe on the envelope idempotencyKey.

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/email:subject-ideas \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "broadcastId": <string> }}'

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.

  • workspace string optional
  • broadcastId string required

Response

What comes back from the call.

  • ok boolean
  • broadcastId string
  • ideas object[]
  • rejected object[]
  • short boolean Fewer than five passed the checks
  • asked number
  • winners object[]
  • winners_window_days 14
  • brand_voice string[]
  • model string
  • refused no_db | forbidden | not_found | …

Traffic

Every call to email:subject-ideas, 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 email:subject-ideas, 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/newsletter/SubjectIdeas.tsx:51
API route 2
  • one.ie/web/src/lib/receiver-index.generated.ts:191
  • one.ie/web/src/lib/resolvers/email-ideas.ts:119
CLI 3
  • packages/cli/src/email.ts:18
  • packages/cli/src/lib/receivers-index.generated.ts:193
  • packages/cli/src/lib/receivers.generated.ts:193
→

Answered by

email:subject-ideas one.ie/web/src/lib/resolvers/email-ideas.ts:118 Dispatched through POST /api/ask/email:subject-ideas, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "type": "string"
    },
    "broadcastId": {
      "type": "string"
    }
  },
  "required": [
    "broadcastId"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "broadcastId": {
      "type": "string"
    },
    "ideas": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "preheader": {
            "type": "string"
          },
          "chars": {
            "type": "number"
          }
        },
        "required": [
          "subject",
          "preheader",
          "chars"
        ]
      }
    },
    "rejected": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "preheader": {
            "type": "string"
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "subject",
          "preheader",
          "reasons"
        ]
      }
    },
    "short": {
      "description": "Fewer than five passed the checks",
      "type": "boolean"
    },
    "asked": {
      "type": "number"
    },
    "winners": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "ab",
              "clicks"
            ]
          },
          "click_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "open_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivered": {
            "type": "number"
          }
        },
        "required": [
          "subject",
          "source",
          "click_rate",
          "open_rate",
          "delivered"
        ]
      }
    },
    "winners_window_days": {
      "type": "number",
      "const": 14
    },
    "brand_voice": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "model": {
      "type": "string"
    },
    "refused": {
      "type": "string",
      "enum": [
        "no_db",
        "forbidden",
        "not_found",
        "email_only",
        "empty_body",
        "no_model_key",
        "model_error",
        "model_unreadable"
      ]
    }
  },
  "required": [
    "ok"
  ]
}