ONE forms:push-unsubscribe
← Receivers

forms:push-unsubscribe

forms family

Turn off a group's push notifications for the address an email unsubscribe link was sent to: the 'Turn those off too' button on /unsubscribe. Takes the SAME signed unsubscribe token the email carried (ref unsubscribe, channel email) with channel 'push'; the group and address come from the verified token, never the body. Writes consent:push:unsubscribed through the consent door FIRST, even when no device is left, then removes every device tied to that address in that group. Only ever declines, so a replay is harmless. Email consent is a separate channel and is never touched.

Effect
signal
Fire-and-forget — the call returns once accepted, not once done.
Caller
public
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/forms:push-unsubscribe \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "token": <string>, "channel": <"push"> }}'

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.

  • token string required The email's signed unsubscribe token, from /unsubscribe.
  • channel "push" required

Response

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

  • ok boolean
  • removed number Devices taken off; 0 still records the decline
  • error string bad_request · invalid_token · no_db · write_failed

Traffic

Every call to forms:push-unsubscribe, 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 forms:push-unsubscribe, 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:227
  • one.ie/web/src/lib/resolvers/push-unsubscribe.ts:10
  • one.ie/web/src/lib/tenant/unsubscribe-push-post.ts:6
CLI 2
  • packages/cli/src/lib/receivers-index.generated.ts:229
  • packages/cli/src/lib/receivers.generated.ts:229
→

Answered by

forms:push-unsubscribe Resolved outside this repo — the pay, channels or api worker answers it. Dispatched through POST /api/signal/forms:push-unsubscribe, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "maxLength": 2000,
      "description": "The email's signed unsubscribe token, from /unsubscribe."
    },
    "channel": {
      "type": "string",
      "const": "push"
    }
  },
  "required": [
    "token",
    "channel"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "removed": {
      "description": "Devices taken off; 0 still records the decline",
      "type": "number"
    },
    "error": {
      "description": "bad_request · invalid_token · no_db · write_failed",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}