ONE social:plan
← Receivers

social:plan

social family

mcp

Draft next week's posts for a workspace from its feeds and due evergreen posts, in its brand voice, spread over its time slots in its timezone. Every post lands as a draft for a person to approve. action settings reads or sets the weekly plan (enabled, posts a week, networks); the Monday cron runs every workspace that turned it on (scope workspaces, the platform only, capped per tick). A run that drafts nothing says why (not_opted_in · already_planned · nothing_to_draft · no_credits).

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
variable
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
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/ask/social:plan \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "action": <run | settings>, "enabled": <boolean>, "perWeek": <number>, "networks": <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.

  • action run | settings optional Default run.
  • enabled boolean optional settings: turn the weekly plan on or off.
  • perWeek number optional settings: posts a week; default 5.
  • networks string[] optional settings: networks to draft for; default linkedin and facebook.
  • workspace string optional
  • scope "workspaces" optional The weekly tick: every opted-in workspace. Platform caller only.
  • trigger string optional

Response

What comes back from the call.

  • ok boolean
  • error string
  • workspace string
  • drafted number
  • fromFeeds number
  • fromEvergreen number
  • week string | null The day (YYYY-MM-DD) the planned week starts.
  • timezone string
  • slots number[] The proposed times, unix seconds.
  • postIds string[]
  • reason string not_opted_in · already_planned · nothing_to_draft · no_credits · partial
  • note string
  • errors string[]
  • plan object
  • scope string
  • workspaces number
  • capped boolean
  • results object[]

Traffic

Every call to social:plan, 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:plan, 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 1
  • one.ie/web/src/lib/receiver-index.generated.ts:463
Agent runtime 1
  • channels/src/cron.ts:41
CLI 1
  • packages/cli/src/social.ts:398
SDK 1
  • packages/sdk/src/social.ts:39
→
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "action": {
      "description": "Default run.",
      "type": "string",
      "enum": [
        "run",
        "settings"
      ]
    },
    "enabled": {
      "description": "settings: turn the weekly plan on or off.",
      "type": "boolean"
    },
    "perWeek": {
      "description": "settings: posts a week; default 5.",
      "type": "integer",
      "minimum": 1,
      "maximum": 21
    },
    "networks": {
      "description": "settings: networks to draft for; default linkedin and facebook.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "workspace": {
      "type": "string"
    },
    "scope": {
      "description": "The weekly tick: every opted-in workspace. Platform caller only.",
      "type": "string",
      "const": "workspaces"
    },
    "trigger": {
      "type": "string"
    }
  }
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "error": {
      "type": "string"
    },
    "workspace": {
      "type": "string"
    },
    "drafted": {
      "type": "number"
    },
    "fromFeeds": {
      "type": "number"
    },
    "fromEvergreen": {
      "type": "number"
    },
    "week": {
      "description": "The day (YYYY-MM-DD) the planned week starts.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "slots": {
      "description": "The proposed times, unix seconds.",
      "type": "array",
      "items": {
        "type": "number"
      }
    },
    "postIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "reason": {
      "description": "not_opted_in · already_planned · nothing_to_draft · no_credits · partial",
      "type": "string"
    },
    "note": {
      "type": "string"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "plan": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "perWeek": {
          "type": "number"
        },
        "networks": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "lastWeek": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "lastRunAt": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "lastDrafted": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "lastNote": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "enabled",
        "perWeek",
        "networks",
        "lastWeek",
        "lastRunAt",
        "lastDrafted",
        "lastNote"
      ]
    },
    "scope": {
      "type": "string"
    },
    "workspaces": {
      "type": "number"
    },
    "capped": {
      "type": "boolean"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string"
          },
          "drafted": {
            "type": "number"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "groupId",
          "drafted",
          "reason",
          "note"
        ]
      }
    }
  },
  "required": [
    "ok"
  ]
}