Skip to main content

Posting model

Every SimplePost interface eventually creates the same kind of post: content, target accounts or platforms, optional media, and optional provider-specific settings.

SDK shape

{
content: {
text: "Launch day",
media: [{ type: "image", url: "https://cdn.example.com/image.jpg" }],
},
platforms: ["x", "instagram", "linkedin"],
options: {
common: { logLevel: "info" },
x: { replyToId: "1234567890" },
},
}

Use this shape when you call @simple-post/sdk directly or when you provide --post-json to the CLI for local account posting.

Scheduler and API shape

Scheduler and the self-hosted REST server target concrete account IDs:

{
"message": "Launch day",
"accountIds": ["x-main", "linkedin-main"],
"media": [
{
"type": "image",
"url": "https://cdn.example.com/image.jpg"
}
],
"postingMode": "schedule",
"scheduledFor": "2030-05-01T14:30:00Z"
}

The self-hosted REST server supports only postingMode: "now". Scheduler supports now, schedule, and draft.

Fields

FieldMeaning
content.text / messageRoot post text or caption.
content.media / mediaImages or videos from local paths where supported, uploaded media references, or public URLs.
platformsSDK platform keys such as x, telegram, or youtube.
accountIdsScheduler or REST server account IDs.
optionsSDK platform options and credentials.
accountOptionsPer-account API options, usually merged with stored account defaults.
accountOverridesPer-account message or media overrides for API posting.
postingModenow, schedule, or draft in Scheduler. The self-hosted REST server accepts only now.
scheduledForFuture ISO 8601 datetime with timezone offset or Z; required when scheduling.

Results

SimplePost returns results per platform or per account. Multi-platform posting can partially fail.

The Scheduler and REST server response includes:

  • post: the SimplePost post record or response object.
  • postingResults: one result per account.
  • summary: success count, failure count, and overall success.

Scheduler post records can be draft, scheduled, pending, published, or failed. Drafts are stored without platform validation blocking the save; validation still runs before publishing or scheduling.

Inspect per-account results whenever the post targets more than one account.