ONE broadcast:update
← Receivers

broadcast:update

broadcast family

mcp

Update a broadcast draft — subject, body, audience, schedule

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
write
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.

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/broadcast:update \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "workspace": <string>, "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 required
  • broadcastId string required
  • subject string optional
  • body_md string optional
  • audience_tag string optional
  • scheduled_at number optional
  • campaignId string | null optional Join this email to a campaign of yours (its gid), or '' / null to take it out of one
  • preheader string optional The preview line inboxes show after the subject
  • data any optional The Puck editor document (JSON text or object with a content array); refused bad_request: invalid data otherwise
  • components any optional The block list (JSON text or array of newsletter blocks); refused bad_request: invalid components otherwise
  • version number optional The version you last read (broadcast:get). If the row moved on, nothing is written and the answer is conflict:true with current

Response

What comes back from the call.

  • ok boolean
  • conflict boolean Someone saved since your version: nothing was written
  • current number The row's version now, on a conflict

Traffic

Every call to broadcast:update, 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 broadcast:update, 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 3
  • one.ie/web/src/components/newsletter/NewsletterDesign.tsx:78
  • one.ie/web/src/components/newsletter/NewsletterList.tsx:99
  • one.ie/web/src/components/newsletter/NewsletterStudio.tsx:236
API route 2
  • one.ie/web/src/lib/news/issue.ts:707
  • one.ie/web/src/lib/receiver-index.generated.ts:101
Agent runtime 1
  • channels/src/tools/newsletter.ts:187
Workflow 1
  • one.ie/web/src/components/workflows/EmailStepEditor.tsx:125
MCP 1
  • newsletter_update · packages/mcp/src/tools/broadcast.ts:69
CLI 3
  • packages/cli/src/broadcast.ts:226
  • packages/cli/src/lib/receivers-index.generated.ts:99
  • packages/cli/src/lib/receivers.generated.ts:99
→

Answered by

broadcast:update one.ie/web/src/lib/resolvers/newsletter.ts:66 Dispatched through POST /api/ask/broadcast:update, 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"
    },
    "subject": {
      "type": "string"
    },
    "body_md": {
      "type": "string"
    },
    "audience_tag": {
      "type": "string"
    },
    "scheduled_at": {
      "type": "number"
    },
    "campaignId": {
      "description": "Join this email to a campaign of yours (its gid), or '' / null to take it out of one",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "preheader": {
      "description": "The preview line inboxes show after the subject",
      "type": "string"
    },
    "data": {
      "description": "The Puck editor document (JSON text or object with a content array); refused bad_request: invalid data otherwise"
    },
    "components": {
      "description": "The block list (JSON text or array of newsletter blocks); refused bad_request: invalid components otherwise"
    },
    "version": {
      "description": "The version you last read (broadcast:get). If the row moved on, nothing is written and the answer is conflict:true with current",
      "type": "number"
    }
  },
  "required": [
    "workspace",
    "broadcastId"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "conflict": {
      "description": "Someone saved since your version: nothing was written",
      "type": "boolean"
    },
    "current": {
      "description": "The row's version now, on a conflict",
      "type": "number"
    }
  },
  "required": [
    "ok"
  ]
}