---
name: social-scheduler
description: Schedule finished short videos (Reels, Shorts, TikToks) and posts to Instagram, TikTok, Facebook, YouTube, LinkedIn, X, Threads and more through Postiz, the open-source social media scheduler (self-hosted or Postiz cloud), using its public API or MCP server. Lists connected channels, uploads media, converts the user's local posting times to UTC, builds a weekly posting calendar that rotates videos, and always confirms with the user before anything is posted or scheduled. Use when someone wants to schedule, queue, post or plan social media content, set up a posting calendar, or check or remove what is already scheduled.
---
# Social scheduler (Postiz)
Schedule finished videos and posts across social platforms with [Postiz](https://github.com/gitroomhq/postiz-app), an open-source scheduler (AGPL-3.0) that you can self-host or use as a hosted cloud service. Connecting social accounts happens in the Postiz web UI; this skill talks to Postiz through its public API (or its MCP server) to upload media, schedule, list and delete posts.
Postiz changes quickly. Everything marked **(check against your Postiz version)** could not be confirmed in the docs when this skill was written. When in doubt, read the current docs at https://docs.postiz.com/public-api/introduction (the OpenAPI spec is at https://docs.postiz.com/public-api/openapi.json).
## Hard rules
1. **Never post or schedule without an explicit yes from the user.** Show the full plan first (channel, local time and UTC time, video, caption, settings). Posting is public and cannot be fully undone.
2. **Never print, echo, log or write the API key** to any file, commit, or chat. Read it only from the `POSTIZ_API_KEY` environment variable (loaded from the user's shell or secret manager). If it is missing, ask the user to set it; don't ask them to paste it into the chat.
3. **Store times in UTC, talk in the user's timezone.** Ask for their timezone once (IANA name, e.g. `America/New_York`, `Europe/London`) and convert every slot. Watch daylight saving changes: the same local time maps to a different UTC hour after the switch.
4. **Respect rate limits.** Batch channels into one request, space calls, and stop on HTTP 429 (see Rate limits).
5. **Deleting a post deletes its whole group** (every channel created in the same request). Warn the user before deleting, and recreate the posts for the channels they want to keep.
## Setup
### Option A: Postiz cloud
Sign up at https://postiz.com (the user does this themselves), connect accounts in the UI, then create an API key in **Settings > Developers > Public API**.
- `POSTIZ_URL` = `https://api.postiz.com/public/v1` (the default in the helper script)
### Option B: self-host with Docker
Follow the official guides: https://docs.postiz.com/self-host/installation/docker-compose (uses the `gitroomhq/postiz-docker-compose` repo and `docker compose up`; the frontend defaults to port 4007). Configuration reference: https://docs.postiz.com/self-host/configuration/reference
- `POSTIZ_URL` = `https://<your-postiz-domain>/api/public/v1`. If your backend runs on its own domain, it is `<backend URL>/public/v1` **(check against your Postiz version)**.
- Instagram, TikTok and others fetch media by URL, so uploaded files must be reachable over public HTTPS. A self-hosted instance with local storage behind a private network will not work for those platforms; use public HTTPS and/or an object storage provider **(check your storage settings)**.
- Self-hosters can raise the post-creation rate limit with the `API_LIMIT` environment variable.
- Each platform needs its own developer app credentials on a self-hosted instance (see the provider pages in the docs). On cloud, this is handled for you.
### Connect accounts
Done in the Postiz UI (Add Channel). Instagram goes through a Facebook Business-linked account (`instagram`) or a standalone login (`instagram-standalone`). The API also has endpoints to generate connect links, but the UI is simpler.
### Environment
```bash
export POSTIZ_URL="https://api.postiz.com/public/v1" # or your self-hosted base
export POSTIZ_API_KEY="..." # set from your secret manager; never commit
scripts/postiz.sh check
```
### MCP server (optional alternative to the script)
Postiz has an MCP server (https://docs.postiz.com/mcp/introduction). Cloud endpoint `https://mcp.postiz.com/mcp` with `Authorization: Bearer <key>`, or "Sign in with Postiz" OAuth at `https://mcp.postiz.com/mcp-oauth-dynamic`. Self-hosted: same paths on your own Postiz server (your reverse proxy must pass streaming HTTP). Claude Code:
```bash
claude mcp add postiz --transport http --url https://mcp.postiz.com/mcp \
--header "Authorization: Bearer $POSTIZ_API_KEY"
```
Prefer the Bearer header or OAuth over the documented "key in the URL" form, which leaks the key into config files and logs. Useful tools: `integrationList`, `integrationSchema`, `uploadFromUrlTool`, `mediaStatusTool`, `integrationSchedulePostTool`, `postsListTool`, `deletePostTool`. The same confirmation rules apply.
## Procedure
### 1. Check setup
`scripts/postiz.sh check` confirms the base URL is reachable and the key works (one API call). If it fails: 401 means a wrong key or base URL; 404 usually means the base URL is missing `/public/v1` (or `/api/public/v1` on self-hosted).
### 2. List channels
`scripts/postiz.sh channels` prints each channel's `ID`, `IDENTIFIER` (`instagram`, `tiktok`, `facebook`, `youtube`, `linkedin`, `linkedin-page`, `threads`, `x`, ...), name and handle. Skip `disabled: true` channels and tell the user to reconnect them in the UI. Note the IDs for this session so you don't call the endpoint again (it counts toward the hourly limit).
### 3. Gather the plan
Ask (or read from the user's notes): which videos, which channels, timezone, cadence and times, caption per video (hook line, call to action, a few hashtags), and a title where needed (YouTube requires one; TikTok and Facebook video titles are optional).
Check each video before upload: MP4 (H.264 + AAC), 9:16 (1080x1920), under each platform's length limit (Instagram Reels and Facebook Reels are commonly capped at 90 s for full Reels features; YouTube Shorts and TikTok allow longer, but confirm current limits). Captions and important text should stay out of the platform UI zones (top ~250 px, bottom ~450 px, right edge).
### 4. Build the calendar (pattern)
Default pattern, adjust to the user:
- **2 posts a day** at fixed local times (e.g. 10:00 and 15:00), Monday to Saturday, nothing on Sunday. Fixed times help the audience and make the calendar easy to read.
- **Rotate videos**: consecutive posts come from different source videos (or topics). Never the same idea twice on one day or in one week.
- **New content first**: a new video's strongest clip goes out on its launch day; older clips fill the remaining slots. Vary which slot gets new vs older content.
- **One video, many channels, one request**: the same video to Instagram + TikTok + Facebook is one create-post request with three entries, all at the same time.
- Every post should point somewhere (profile link, lead magnet, newsletter) so views turn into followers or customers.
- Don't build a growing queue. Schedule one to two weeks ahead and refill.
Show the calendar as a table: day, local time, UTC time, video, channels, first line of the caption. Get an explicit yes before step 5.
### 5. Upload media
Two ways (each returns `{id, path, status}`; keep both `id` and `path`):
```bash
scripts/postiz.sh upload clip-01.mp4 > clip-01.media.json # local file (multipart)
scripts/postiz.sh upload-url "https://cdn.example.com/clip-01.mp4" > clip-01.media.json # public HTTPS URL
```
- Accepted types (checked by content): JPEG, PNG, GIF, WebP, AVIF, BMP, TIFF, MP4. No PDF.
- `--adjust` asks Postiz to fit the file to platform limits in the background (video becomes H.264/AAC MP4, 1080 px short side). Status is then `processing`; poll `scripts/postiz.sh media-status <id>` until `ready` (or `failed`).
- `upload-url` needs a public HTTPS link that stays valid while Postiz fetches it (avoid short-lived signed URLs). Private IPs and localhost are refused.
- Uploads count toward the limits too: upload each video once and reuse its `id`/`path` for every channel.
### 6. Schedule (after the user says yes)
Convert each local slot to UTC, then send one request per slot:
```bash
AT=$(scripts/postiz.sh when "2026-12-01 10:00" America/New_York) # -> 2026-12-01T15:00:00.000Z
scripts/postiz.sh schedule --at "$AT" \
--media-json clip-01.media.json \
--text-file clip-01.caption.txt \
--channel <instagram-id>=instagram --channel <tiktok-id>=tiktok --channel <facebook-id>=facebook \
--dry-run # show the exact body to the user; remove --dry-run to send
```
- `--now` publishes immediately, `--draft` saves a draft without scheduling.
- `--title "..."` is required for YouTube and used for TikTok/Facebook video titles.
- `--settings <channel-id>='{"privacy_level":"SELF_ONLY"}'` overrides defaults for one channel (good for a private test post).
- The response is a list of `{postId, integration}`. Keep it: you need the IDs to delete or reschedule.
- Wait between requests (see Rate limits). On HTTP 429, stop, tell the user how far you got, and continue later.
To reschedule: delete (remembering the whole group goes) and create again.
### 7. Show what was scheduled
`scripts/postiz.sh list` (default: now to +14 days; `--from` / `--to` take UTC ISO) prints publish time (UTC), state (`QUEUE`, `PUBLISHED`, `ERROR`, `DRAFT`), channel, post ID and caption start. Report back to the user in their timezone: a table of what is queued, plus anything in `ERROR` with its message. After the first posts go out, check `list` again for `ERROR` states (expired tokens, media rejected).
## API reference (Postiz public API)
Base URL: cloud `https://api.postiz.com/public/v1`; self-hosted `https://<your-domain>/api/public/v1`.
Auth: header `Authorization: <api-key>` (no `Bearer` prefix on the REST API). OAuth app tokens start with `pos_` and go in the same header.
| Action | Request |
|---|---|
| List channels | `GET /integrations` (optional `?group=<customer-id>`) |
| Channel settings schema | `GET /integration-settings/{id}` (rules, maxLength, settings schema) |
| Upload file | `POST /upload` multipart, field `file`, optional `adjust` = `true`/`false` |
| Upload from URL | `POST /upload-from-url` JSON `{url, adjust}` |
| Media status | `GET /media/{id}/status` |
| Create post | `POST /posts` JSON (below) |
| List posts | `GET /posts?startDate=<UTC ISO>&endDate=<UTC ISO>` (optional `customer`) |
| Delete post | `DELETE /posts/{id}` (deletes the whole group) |
Also available (not wrapped by the script): find an available slot, post analytics, platform analytics, change post status, connect-channel links, notifications. See the docs index at https://docs.postiz.com/llms.txt.
Create-post body:
```json
{
"type": "schedule",
"date": "2026-12-01T15:00:00.000Z",
"shortLink": false,
"tags": [],
"posts": [
{
"integration": { "id": "<channel-id>" },
"value": [ { "content": "Caption text", "image": [ { "id": "<media-id>", "path": "<media-path>" } ] } ],
"settings": { "__type": "instagram", "post_type": "post" }
}
]
}
```
`type` is `schedule`, `now` (date ignored) or `draft`. `date` is UTC ISO 8601. Videos also go in the `image` array. Media items accept optional `alt` (images) and `thumbnailTimestamp` (video cover frame, in ms). More than one item in `value` makes a thread/comments on platforms that support it.
### Per-platform settings (the `settings` object)
| Platform | `__type` | Settings for a short vertical video |
|---|---|---|
| Instagram | `instagram` (Business via Facebook) or `instagram-standalone` | `post_type: "post"`; a single video posted as `post` publishes as a Reel. `story` for Stories. Optional: `collaborators: [{label: "username"}]`, `is_trial_reel`, `made_with_ai`. There is no separate `reel` value. |
| TikTok | `tiktok` | Required: `privacy_level` (`PUBLIC_TO_EVERYONE`, `MUTUAL_FOLLOW_FRIENDS`, `FOLLOWER_OF_CREATOR`, `SELF_ONLY`), `duet`, `stitch`, `comment`, `autoAddMusic` (`"yes"`/`"no"`), `brand_content_toggle`, `brand_organic_toggle`, `content_posting_method` (`DIRECT_POST` publishes; `UPLOAD` sends to the TikTok inbox to finish in the app within 24 h). Optional: `title` (max 90), `video_made_with_ai`. |
| Facebook | `facebook` | Only `__type` is required. `post_type`: `post` (default) or `story`; optional `title` for a video post. The docs list no Reel option, so whether a vertical video appears as a Reel or a regular Page video is up to Postiz/Facebook **(check against your Postiz version)**. |
| YouTube | `youtube` | Required: `title` (2 to 100 chars), `type` (`public`, `unlisted`, `private`). Optional: `selfDeclaredMadeForKids` (`"yes"`/`"no"`), `tags: [{value, label}]`, `thumbnail: {id, path}`, `made_with_ai`. The docs have no Shorts-specific setting; YouTube classifies vertical short uploads as Shorts itself **(check against your Postiz version)**. |
| LinkedIn | `linkedin` (profile) or `linkedin-page` (company page) | No required fields. Optional `post_as_images_carousel`, `carousel_name`. |
| X | `x` | `who_can_reply_post` required for normal posts (`everyone`, `following`, `mentionedUsers`, `subscribers`, `verified`). Optional `community` (URL), `made_with_ai`, `paid_partnership`. |
| Threads | `threads` | No required fields. Optional `made_with_ai`. |
Others (Bluesky, Mastodon, Pinterest, Reddit, Telegram, Discord, Google Business Profile, and more) have their own pages under https://docs.postiz.com/public-api/providers/. For any platform you are unsure about, `GET /integration-settings/{channel-id}` (or the MCP tool `integrationSchema`) returns that channel's live settings schema, posting rules and max length.
The helper script fills safe defaults per platform (Instagram `post`, TikTok public + direct post with duet/stitch off, Facebook `post`, YouTube `public` and not for kids, X replies from everyone). Show them to the user in the plan; change them with `--settings`.
## Rate limits
The docs are not consistent, so plan for the stricter number:
- The API overview says the limit applies only to creating posts: **90 requests per hour on self-hosted, 100 on cloud**, one global value per instance, not tied to your plan, configurable on self-hosted with `API_LIMIT`.
- The individual endpoint pages (list channels, upload, create, list, delete) each state **30 requests per hour**.
- Treat it as **about 30 calls an hour in total** unless your own instance shows otherwise: one create-post request per time slot covering all channels, upload each file once, cache the channel list, and space calls at least a few seconds apart (10 s or more for a big batch). A week of 2 posts a day is 12 create calls plus 12 uploads, which fits in one hour; a month does not, so spread it out or schedule a week or two at a time.
- On HTTP 429, stop and resume later. Don't retry in a loop.
## What was confirmed, and what wasn't
Confirmed from docs.postiz.com (Nov 2026): base URLs, `Authorization` header without `Bearer`, endpoints and fields above, `type` values `schedule`/`now`/`draft`, upload types and the `adjust` flag, media status values, list-post states, group deletion, per-platform settings for Instagram, TikTok, Facebook, YouTube, LinkedIn, X and Threads, the MCP endpoints and tools, AGPL-3.0 licence (GitHub repo).
Not confirmed **(check against your Postiz version)**:
- Which rate-limit figure your instance enforces (30/hour per endpoint vs 90 or 100/hour on create-post only).
- Whether Facebook vertical videos publish as Reels.
- Whether YouTube uploads through Postiz are always classified as Shorts (depends on YouTube: vertical and short).
- Upload size limits for `/upload` (only the 50 MB JSON body limit on `/posts` is documented).
- The self-hosted base path when frontend and backend run on separate domains.
- Exact per-platform video length limits (they change; check each platform).
## Troubleshooting
- **401**: wrong key, or the key was regenerated (old clients stop working).
- **404 on every call**: base URL path is wrong (`/public/v1` cloud, `/api/public/v1` self-hosted).
- **400 on create**: a required provider setting is missing (TikTok has many; YouTube needs `title`; X needs `who_can_reply_post`) or `__type` doesn't match the channel's identifier.
- **Post in `ERROR`**: read the `error` field from `list`; common causes are expired channel tokens (reconnect in the UI), media the platform can't fetch (not public HTTPS), or a video over the platform's length limit.
- **TikTok post never appears**: with `UPLOAD`, it waits in the TikTok app inbox; use `DIRECT_POST` to publish.