ONE sms:receive
← Receivers

sms:receive

sms family

Record one Twilio-signed inbound text against the consent of the workspace whose number was texted, and say whether the front desk answers it. A text is consent for conversational replies only; JOIN, or YES to an invitation, adds marketing (any other yes is conversation); STOP and its family end both; START gives back replies only. Every change writes an sms-consent evidence row. Only the channels sms door, carrying its HMAC over the text; a message id is acted on once.

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.
Version
1.0.0
Pin this to keep a contract stable; additive bumps never break callers.

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/sms:receive \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "from": <string>, "to": <string>, "body": <string>, "messageSid": <string>, "attest": <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.

  • from string required The texter's number (Twilio From)
  • to string required The workspace's number that was texted (Twilio To) — the workspace is read from it, never from the caller
  • body string required The text as received
  • messageSid string required Twilio's MessageSid: the evidence key, and acted on once — a replay changes nothing
  • attest string required The text door's HMAC-SHA256 (SERVER_SECRET) over from, to, body and messageSid; without it nothing is recorded

Response

What comes back from the call.

  • ok boolean
  • workspace string
  • keyword stop | start | join | … | null
  • answer boolean false: a keyword, a replay, or a number that said STOP — the desk does not answer
  • duplicate boolean true: this message id was already recorded; nothing changed
  • error string forbidden (not a service caller) · unattested (no or wrong door HMAC) · unknown_number · no_db

Traffic

Every call to sms: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 sms: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 3
  • one.ie/web/src/lib/receiver-index.generated.ts:372
  • one.ie/web/src/lib/resolvers/sms.ts:151
  • one.ie/web/src/lib/sms/sms.ts:3
Agent runtime 1
  • channels/src/channels/sms.ts:11
→

Answered by

sms:receive one.ie/web/src/lib/resolvers/sms.ts:149 Dispatched through POST /api/ask/sms:receive, after the envelope validates the payload.

sms family · 1 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "description": "The texter's number (Twilio From)"
    },
    "to": {
      "type": "string",
      "description": "The workspace's number that was texted (Twilio To) — the workspace is read from it, never from the caller"
    },
    "body": {
      "type": "string",
      "description": "The text as received"
    },
    "messageSid": {
      "type": "string",
      "description": "Twilio's MessageSid: the evidence key, and acted on once — a replay changes nothing"
    },
    "attest": {
      "type": "string",
      "description": "The text door's HMAC-SHA256 (SERVER_SECRET) over from, to, body and messageSid; without it nothing is recorded"
    }
  },
  "required": [
    "from",
    "to",
    "body",
    "messageSid",
    "attest"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "workspace": {
      "type": "string"
    },
    "keyword": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "stop",
            "start",
            "join",
            "yes",
            "help"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "answer": {
      "description": "false: a keyword, a replay, or a number that said STOP — the desk does not answer",
      "type": "boolean"
    },
    "duplicate": {
      "description": "true: this message id was already recorded; nothing changed",
      "type": "boolean"
    },
    "error": {
      "description": "forbidden (not a service caller) · unattested (no or wrong door HMAC) · unknown_number · no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}