ONE social:import
← Receivers

social:import

social family

mcp

Turn a CSV of posts into draft posts with one variant per network, the same rows the composer writes, each waiting for a person's approval. Columns: date (YYYY-MM-DD), time (HH:MM, in the workspace's timezone), networks, text, media_url, link, first_comment; a header row; up to 500 rows (more refuses the whole file). Every row is checked before any is written; a bad row comes back by row number with its reason and writes nothing, and the good rows land. dryRun checks without writing.

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
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:import \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "csv": <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.

  • csv string required The CSV text, header row first. Quoted fields may hold commas, "" and new lines.
  • workspace string optional The workspace to draft into; defaults to the caller's own. The caller is walked to it, never trusted.
  • timezone string optional IANA timezone the date and time columns are read in; default the workspace's own (UTC until one is set).
  • dryRun boolean optional

Response

What comes back from the call.

  • ok boolean
  • error string Whole-file refusal: empty_file · too_large · bad_csv · missing_columns · too_many_rows · forbidden: …
  • workspace string
  • rows number Data rows read; the header is not one.
  • valid number
  • drafted number
  • failed number
  • errors object[]
  • posts object[]
  • timezone string
  • ignoredColumns string[]
  • dryRun boolean

Traffic

Every call to social:import, 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:import, 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:457
CLI 1
  • packages/cli/src/social.ts:365
SDK 1
  • packages/sdk/src/social.ts:36
→
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "csv": {
      "type": "string",
      "description": "The CSV text, header row first. Quoted fields may hold commas, \"\" and new lines."
    },
    "workspace": {
      "description": "The workspace to draft into; defaults to the caller's own. The caller is walked to it, never trusted.",
      "type": "string"
    },
    "timezone": {
      "description": "IANA timezone the date and time columns are read in; default the workspace's own (UTC until one is set).",
      "type": "string"
    },
    "dryRun": {
      "type": "boolean"
    }
  },
  "required": [
    "csv"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "error": {
      "description": "Whole-file refusal: empty_file · too_large · bad_csv · missing_columns · too_many_rows · forbidden: …",
      "type": "string"
    },
    "workspace": {
      "type": "string"
    },
    "rows": {
      "description": "Data rows read; the header is not one.",
      "type": "number"
    },
    "valid": {
      "type": "number"
    },
    "drafted": {
      "type": "number"
    },
    "failed": {
      "type": "number"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "row": {
            "type": "number",
            "description": "1 = the first row under the header"
          },
          "line": {
            "type": "number"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "row",
          "line",
          "reason"
        ]
      }
    },
    "posts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "row": {
            "type": "number"
          },
          "postId": {
            "type": "string"
          },
          "variants": {
            "type": "number"
          },
          "scheduledAt": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "row",
          "postId",
          "variants",
          "scheduledAt"
        ]
      }
    },
    "timezone": {
      "type": "string"
    },
    "ignoredColumns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "dryRun": {
      "type": "boolean"
    }
  },
  "required": [
    "ok"
  ]
}