POST
/
v1
/
teams
/
{teamId}
/
posts
/
{postId}
/
schedule
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.social.schedulePost({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  postId: process.env.OCTOSPARK_POST_ID ?? "postId",
  body: {},
})
{
  "data": [
    {
      "socialAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "scheduledPost": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "contentItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "socialAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "scheduledAt": "<string>",
        "timezone": "Europe/London",
        "platformPostId": "<string>",
        "platformSettings": {},
        "publishResults": {},
        "providerPublishState": {
          "requiresPolling": true,
          "publishId": "<string>",
          "platformPostId": "<string>",
          "providerStatus": "<string>",
          "pollingReason": "<string>",
          "uploadProgress": {
            "nextByteStart": 123,
            "uploadSize": 123
          },
          "failureCode": "<string>"
        },
        "errorCode": "<string>",
        "errorMessage": "<string>",
        "workflowId": "<string>",
        "workflowRunId": "<string>",
        "createdAt": "<string>",
        "updatedAt": "<string>"
      },
      "error": {
        "message": "<string>",
        "code": "<string>"
      }
    }
  ],
  "outcome": {
    "totalCount": 123,
    "successCount": 123,
    "failureCount": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

teamId
string
required

Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.

postId
string
required

Post id (UUID), as returned by the create post and list posts endpoints.

Body

application/json
socialAccountIds
string<uuid>[]
required

UUIDs of the connected social accounts the post fans out to; at least one is required, duplicates are rejected, and each account gets its own per-account result.

Minimum array length: 1

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Example:
["0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"]
expectedContentPayloadId
string<uuid>

Optimistic concurrency pin for the exact saved content payload this terminal delivery intent validated. The composer always supplies it.

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
preserveExistingTimes
boolean

When true, retained active destination accounts keep their existing scheduled instants while new accounts use the requested timing and removed accounts are cancelled.

scheduledAt
string

ISO 8601 timestamp to publish at; must be at least 60 seconds in the future and within 90 days. Provide EXACTLY ONE of scheduledAt or useNextSlot=true (supplying both, or neither, is rejected with 400).

Example:

"2026-06-15T09:00:00Z"

useNextSlot
boolean

When true, the server resolves the next unfilled scheduling slot for the target account(s) inside the insert transaction and uses it as scheduledAt. Provide EXACTLY ONE of scheduledAt or useNextSlot=true (supplying both, or neither, is rejected with 400).

Example:

true

timezone
string | null

IANA timezone name the schedule was chosen in, used for calendar display and (with useNextSlot) slot resolution; scheduledAt itself is absolute.

Example:

"Europe/London"

platformSettings
object

Provider-specific publish settings. Each field applies to one provider (named in its description) and is ignored by accounts on other providers, so a single object can carry settings for every account the post targets. Unknown keys are rejected.

Example:
{ "replySettings": "following" }
platformSettingsBySocialAccountId
object

Per-account overrides of the shared platform settings, keyed by social account UUID; values merge over platformSettings for that account.

overrideApproval
boolean

When the workspace postApprovalMode is required, bypasses the client-approval gate for this call. Requires team admin permission (manage-level); the override is audited as an internal approval decision.

Example:

true

textBySocialAccountId
object

Per-account body-text overrides, keyed by social account UUID. An entry replaces the post's shared text for that account's leg only; accounts without an entry publish the shared text. Text-only: media attachments and platform settings are unaffected, and thread posts reject overrides. Entries must be non-blank.

firstComment
object

Comment to post on the published post immediately after it goes live.

engagementCommentTrigger
object

Comment to post once the published post reaches likeThreshold likes within windowHours (1 to 720 hours).

repostAfter
object

Repost the published post offsetDays (1 to 30) after publish, either as a plain retweet or a quote (text required for quote mode).

recurrenceIntervalDays
integer

Republish the post every N days (1 to 365) until recurrenceEndsAt.

Required range: 1 <= x <= 365
Example:

7

recurrenceEndsAt
string | null

ISO 8601 timestamp after which the recurrence stops; null means no end date.

Example:

"2026-09-01T00:00:00Z"

Response

Success

data
object[]
required

One result entry per requested social account, in request order.

outcome
object
required