ONE whatsapp:templates-sync
← Receivers

whatsapp:templates-sync

whatsapp family

Read your group's WhatsApp message templates from Meta (through channels, on the group's own number) into ONE's registry: name, language, category, status, body and its {{n}} count. Only an APPROVED MARKETING template can be sent by message:send. truncated says Meta had more than one read returns

Effect
signal
Fire-and-forget — the call returns once accepted, not once done.
Caller
manage_integrations
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/signal/whatsapp:templates-sync \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "workspace": <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

Response

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

  • ok boolean
  • workspace string
  • total number
  • skipped number Templates Meta returned that could not be stored (no name or language)
  • approvedMarketing number
  • truncated boolean
  • error string forbidden · no_db · whatsapp_no_group_sender (with missing) · whatsapp_waba_unknown · whatsapp_unreachable (with cannot_run) · not_saved · a name passed through from channels
  • missing string[]
  • cannot_run boolean
  • detail string

Traffic

Every call to whatsapp:templates-sync, 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 whatsapp:templates-sync, 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:635
  • one.ie/web/src/lib/resolvers/whatsapp-marketing.ts:104
CLI 3
  • packages/cli/src/lib/receivers-index.generated.ts:661
  • packages/cli/src/lib/receivers.generated.ts:661
  • packages/cli/src/whatsapp.ts:119
→

Answered by

whatsapp:templates-sync one.ie/web/src/lib/resolvers/whatsapp-marketing.ts:103 Dispatched through POST /api/signal/whatsapp:templates-sync, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "type": "string"
    }
  }
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "workspace": {
      "type": "string"
    },
    "total": {
      "type": "number"
    },
    "skipped": {
      "description": "Templates Meta returned that could not be stored (no name or language)",
      "type": "number"
    },
    "approvedMarketing": {
      "type": "number"
    },
    "truncated": {
      "type": "boolean"
    },
    "error": {
      "description": "forbidden · no_db · whatsapp_no_group_sender (with missing) · whatsapp_waba_unknown · whatsapp_unreachable (with cannot_run) · not_saved · a name passed through from channels",
      "type": "string"
    },
    "missing": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "cannot_run": {
      "type": "boolean"
    },
    "detail": {
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}