---
title: "Schedule a post"
method: POST
path: "/api/posts/schedule"
tags: ["Posts"]
---

# Schedule a post

`POST /api/posts/schedule`

## Request

- Base URL: `https://api.dunsocial.com`
- URL: `https://api.dunsocial.com/api/posts/schedule`
- Auth: HTTP bearer

Validation is all-or-nothing. Returns one post per social account. Facebook Pages are text, link, and photos — no metadata.facebook.

## Headers

- `X-Workspace-Id` string, required

## Request body

- SchedulePostRequest
  - `socialAccountIds` string[], required
  - `content` string, required: Post body. Facebook Pages allow up to 63,206 characters.
  - `metadata` PostMetadata
    - `reddit` RedditPostOptions
      - `subreddit` string, required
      - `title` string, required
      - `kind` 'self' | 'link' | 'image' | 'video', required
      - `body` string
      - `url` string
      - `flairId` string
      - `flairText` string
      - `posterMediaAssetId` string
      - `nsfw` boolean
      - `spoiler` boolean
      - `sendReplies` boolean
      - `resubmit` boolean
    - `instagram` InstagramPostOptions
      - `format` 'feed_image' | 'carousel' | 'reel' | 'story', required
      - `caption` string
      - `altText` string
      - `shareToFeed` boolean
      - `coverMediaAssetId` string
      - `thumbOffset` number
      - `audioName` string
      - `collaborators` string[]
    - `pinterest` PinterestPostOptions
      - `boardId` string, required
      - `boardName` string
      - `title` string, required
      - `description` string, required
      - `link` string
    - `tiktok` TikTokPostOptions
      - `title` string
      - `privacyLevel` 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | 'SELF_ONLY', required
      - `disableComment` boolean
      - `disableDuet` boolean
      - `disableStitch` boolean
      - `videoCoverTimestampMs` number
    - `discord` DiscordPostOptions
      - `channelId` string, required: Discord channel snowflake
      - `channelName` string
    - `slack` SlackPostOptions
      - `channelId` string, required: Slack channel id (C… or G…)
      - `channelName` string
  - `mediaUrls` string[]: Asset IDs, preview URLs, or storage keys. Facebook Pages are images only (no video).
  - `scheduledAt` string, date-time, required

## Response `201`

Created posts

- object
  - `success` true, required
  - `data` Post[]
    - `id` string, required
    - `status` 'draft' | 'scheduled' | 'published' | 'failed' | 'cancelled'
    - `content` string
    - `scheduledAt` string, nullable
    - `publishedPostUrl` string, nullable
    - `error` string, nullable
    - `groupId` string, nullable
    - `socialAccountId` string
    - `mediaUrls` string[]

## Other responses

- `400`: Validation or business rule failed
- `401`: Missing or invalid bearer token
- `402`: Workspace is not on a paid plan
- `403`: Wrong workspace, missing scope, or role
- `429`: Rate limited or X monthly posting cap

---

[API](https://skmtc.dev/dunsocial/apis/dunsocial-api.md) · [All operations](https://skmtc.dev/dunsocial/apis/dunsocial-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dunsocial/apis/dunsocial-api/revisions/3c586d59e76f?raw)
