ONE social:rules
← Receivers

social:rules

social family

mcp

Read or set a workspace's auto-post rules: which networks may post without a tap, the most posts a day per network, words that always ask a person (names, products), whether a price or a discount always asks (on by default), quiet hours and the time zone they count in. With no rules every post waits for a person. Setting them needs the owner or admin seat and is a person's act (a rule lets a post go with no tap): an agent, a bare key or a workflow step is ASKED, not refused: fingerprint_required with approve.url, then call again with fingerprint_code; the approval binds these exact rules. Every publish door asks mayAutoPost (lib/social-rules.ts), which fails closed.

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
update_group
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/social:rules \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "action": <get | set>, "workspace": <string>, "rules": <object> }}'

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.

  • action get | set optional Default get unless rules are given.
  • workspace string optional Defaults to the caller's own; the caller is walked to it.
  • rules object optional set: the whole rule set (fields left out take their defaults).

Response

What comes back from the call.

  • ask any error fingerprint_required: the ask the person answers (action, what, challenge, expiresAt, methods)
  • approve object error fingerprint_required: the link the person opens to approve, and the code to retry with (fingerprint_code)
  • approver string error fingerprint_required: the workspace's person the ask is for
  • next string error fingerprint_required: what to tell the person and how to call again
  • reason string Why, in plain words, when the answer is a fingerprint ask or a refusal
  • closed string dissolve on a fingerprint ask (nothing changed), warn on a refusal
  • ok boolean
  • error string forbidden: … · bad_rules: …
  • workspace string
  • set boolean False when the workspace has no rules yet (the defaults are shown).
  • rules object

Traffic

Every call to social:rules, 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 social:rules, 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 4
  • one.ie/web/src/lib/auth-plugins/fingerprint-ask.ts:309
  • one.ie/web/src/lib/oauth-connector-gate.ts:56
  • one.ie/web/src/lib/receiver-index.generated.ts:475
  • one.ie/web/src/lib/resolvers/social.ts:296
CLI 3
  • packages/cli/src/lib/receivers-index.generated.ts:499
  • packages/cli/src/lib/receivers.generated.ts:499
  • packages/cli/src/social.ts:495
SDK 1
  • packages/sdk/src/social.ts:46
→
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "action": {
      "description": "Default get unless rules are given.",
      "type": "string",
      "enum": [
        "get",
        "set"
      ]
    },
    "workspace": {
      "description": "Defaults to the caller's own; the caller is walked to it.",
      "type": "string"
    },
    "rules": {
      "description": "set: the whole rule set (fields left out take their defaults).",
      "type": "object",
      "properties": {
        "autoNetworks": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "dailyCap": {
          "description": "{ network: posts a day }, 0 to 50. Default 3.",
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "number"
          }
        },
        "askWords": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "askOnPrices": {
          "type": "boolean"
        },
        "askOnDiscounts": {
          "type": "boolean"
        },
        "quietHours": {
          "description": "Local hours 0–23; start > end wraps past midnight.",
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "start": {
                  "type": "number"
                },
                "end": {
                  "type": "number"
                }
              },
              "required": [
                "start",
                "end"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "timezone": {
          "description": "IANA zone, e.g. Asia/Bangkok. Default UTC.",
          "type": "string"
        }
      }
    }
  }
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ask": {
      "description": "error fingerprint_required: the ask the person answers (action, what, challenge, expiresAt, methods)"
    },
    "approve": {
      "description": "error fingerprint_required: the link the person opens to approve, and the code to retry with (fingerprint_code)",
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "expiresAt": {
          "type": "number"
        }
      },
      "required": [
        "url",
        "code",
        "expiresAt"
      ]
    },
    "approver": {
      "description": "error fingerprint_required: the workspace's person the ask is for",
      "type": "string"
    },
    "next": {
      "description": "error fingerprint_required: what to tell the person and how to call again",
      "type": "string"
    },
    "reason": {
      "description": "Why, in plain words, when the answer is a fingerprint ask or a refusal",
      "type": "string"
    },
    "closed": {
      "description": "dissolve on a fingerprint ask (nothing changed), warn on a refusal",
      "type": "string"
    },
    "ok": {
      "type": "boolean"
    },
    "error": {
      "description": "forbidden: … · bad_rules: …",
      "type": "string"
    },
    "workspace": {
      "type": "string"
    },
    "set": {
      "description": "False when the workspace has no rules yet (the defaults are shown).",
      "type": "boolean"
    },
    "rules": {
      "type": "object",
      "properties": {
        "version": {
          "type": "number"
        },
        "autoNetworks": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "dailyCap": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "number"
          }
        },
        "askWords": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "askOnPrices": {
          "type": "boolean"
        },
        "askOnDiscounts": {
          "type": "boolean"
        },
        "quietHours": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "start": {
                  "type": "number"
                },
                "end": {
                  "type": "number"
                }
              },
              "required": [
                "start",
                "end"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "timezone": {
          "type": "string"
        },
        "updatedBy": {
          "type": "string"
        },
        "updatedAt": {
          "type": "number"
        }
      },
      "required": [
        "version",
        "autoNetworks",
        "dailyCap",
        "askWords",
        "askOnPrices",
        "askOnDiscounts",
        "quietHours",
        "timezone"
      ]
    }
  },
  "required": [
    "ok"
  ]
}