ONE message:send
← Receivers

message:send

message family

Send a message to one address via channel — suppression- and consent-checked; sms goes through sms:send (SMS consent only, never a STOP, from the workspace's own number); push reaches only devices the person tied to their confirmed email from the confirm page (forms:push-link) and needs consent:push:subscribed and the frequency cap; whatsapp sends from the group's own number to a person who sent JOIN, an approved MARKETING template outside the 24-hour window, under the frequency cap, every refusal by name; any other channel refuses unknown_channel

Effect
signal
Fire-and-forget — the call returns once accepted, not once done.
Caller
write
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
no
This cannot be undone. Dry-run it first where the contract allows.
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/signal/message:send \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "workspace": <string>, "channel": <email | sms | whatsapp | push>, "to": <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
  • channel email | sms | whatsapp | push required
  • to string required
  • subject string optional Email subject; on push, the notification title
  • body string optional The words; whatsapp may name a template instead. The resolver needs a body, an email_ref or a template
  • template string optional whatsapp: an APPROVED MARKETING template name from whatsapp:templates; required outside the 24-hour window
  • language string optional whatsapp: the template's language, e.g. en_GB; needed when the name exists in more than one
  • params string[] optional whatsapp: the template body's {{1}}..{{n}} in order
  • url string optional push only: a same-origin path the notification opens (default /); anything else is dropped
  • campaign string optional

Response

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

  • ok boolean
  • channel string
  • sent number push: devices that accepted
  • devices number
  • refused string whatsapp_marketing_off · whatsapp_no_group_sender · whatsapp_not_opted_in · whatsapp_optin_pending · consent_declined · whatsapp_template_not_found · whatsapp_template_not_approved · whatsapp_template_not_marketing · whatsapp_template_unsupported · whatsapp_template_params · whatsapp_template_language_required · whatsapp_window_closed · whatsapp_marketing_limited · capped · bad_address · consent_unreadable · channels' own: whatsapp_declined · whatsapp_not_configured · whatsapp_unusable_credential · whatsapp_graph_refused · whatsapp_graph_unreachable · unknown_channel
  • missing string[]
  • mode text | template whatsapp: how it went, free text inside the 24-hour window or a template
  • id string whatsapp: Meta's message id
  • error string
  • sunset boolean email: true with ok:false when a marketing email was not sent because the address is sunset under the group's sunset rule

Traffic

Every call to message:send, 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 message:send, 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 6
  • one.ie/web/src/lib/broadcast/sms-send.ts:1
  • one.ie/web/src/lib/newsletter/email-home.ts:144
  • one.ie/web/src/lib/receiver-index.generated.ts:326
  • one.ie/web/src/lib/resolvers/lead-reply.ts:331
  • one.ie/web/src/lib/resolvers/newsletter.ts:416
  • one.ie/web/src/lib/whatsapp-marketing/send.ts:56
Workflow 5
  • one.ie/web/src/components/workflows/nodes/ToolNode.tsx:41
  • one.ie/web/src/components/workflows/StepDetailPanel.tsx:393
  • one.ie/web/src/lib/workflow-send-hold.ts:10
  • one.ie/web/src/lib/workflow-templates.ts:513
  • one.ie/web/src/lib/workflows/campaign-ads-social.tql.ts:28
CLI 3
  • packages/cli/src/lib/money-receivers.ts:45
  • packages/cli/src/lib/receivers-index.generated.ts:333
  • packages/cli/src/lib/receivers.generated.ts:333
→

Answered by

message:send one.ie/web/src/lib/resolvers/newsletter.ts:428 Dispatched through POST /api/signal/message:send, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "type": "string"
    },
    "channel": {
      "type": "string",
      "enum": [
        "email",
        "sms",
        "whatsapp",
        "push"
      ]
    },
    "to": {
      "type": "string"
    },
    "subject": {
      "description": "Email subject; on push, the notification title",
      "type": "string"
    },
    "body": {
      "default": "",
      "description": "The words; whatsapp may name a template instead. The resolver needs a body, an email_ref or a template",
      "type": "string"
    },
    "template": {
      "description": "whatsapp: an APPROVED MARKETING template name from whatsapp:templates; required outside the 24-hour window",
      "type": "string"
    },
    "language": {
      "description": "whatsapp: the template's language, e.g. en_GB; needed when the name exists in more than one",
      "type": "string"
    },
    "params": {
      "description": "whatsapp: the template body's {{1}}..{{n}} in order",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "url": {
      "description": "push only: a same-origin path the notification opens (default /); anything else is dropped",
      "type": "string"
    },
    "campaign": {
      "type": "string"
    }
  },
  "required": [
    "workspace",
    "channel",
    "to"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "channel": {
      "type": "string"
    },
    "sent": {
      "description": "push: devices that accepted",
      "type": "number"
    },
    "devices": {
      "type": "number"
    },
    "refused": {
      "description": "whatsapp_marketing_off · whatsapp_no_group_sender · whatsapp_not_opted_in · whatsapp_optin_pending · consent_declined · whatsapp_template_not_found · whatsapp_template_not_approved · whatsapp_template_not_marketing · whatsapp_template_unsupported · whatsapp_template_params · whatsapp_template_language_required · whatsapp_window_closed · whatsapp_marketing_limited · capped · bad_address · consent_unreadable · channels' own: whatsapp_declined · whatsapp_not_configured · whatsapp_unusable_credential · whatsapp_graph_refused · whatsapp_graph_unreachable · unknown_channel",
      "type": "string"
    },
    "missing": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "mode": {
      "description": "whatsapp: how it went, free text inside the 24-hour window or a template",
      "type": "string",
      "enum": [
        "text",
        "template"
      ]
    },
    "id": {
      "description": "whatsapp: Meta's message id",
      "type": "string"
    },
    "error": {
      "type": "string"
    },
    "sunset": {
      "description": "email: true with ok:false when a marketing email was not sent because the address is sunset under the group's sunset rule",
      "type": "boolean"
    }
  },
  "required": [
    "ok"
  ]
}