Skip to content
Command line (CLI)

CLI examples by platform

Ready-made commands for X, YouTube, TikTok, Instagram and multi-channel posts.

Simple scheduling

posty posts:create \
  -c "Hello everyone! We shipped a new feature today." \
  -s "2026-12-31T12:00:00Z" \
  -i "<channel-id>"

Add the -t draft flag for a draft, or -t now to publish immediately. You don't need a date to publish immediately.

X: thread and reply settings

posty posts:create \
  -c "1/3 Let's start with a short thread." \
  -c "2/3 The second part." \
  -c "3/3 And the wrap-up." \
  -d 2 \
  -s "2026-12-31T12:00:00Z" \
  --settings '{"who_can_reply_post":"everyone"}' \
  -i "<x-channel-id>"

X requires who_can_reply_post. The allowed values are listed on the X platform page.

YouTube: video

VIDEO=$(posty upload ./video.mp4 | jq -r '.path')

posty posts:create \
  -c "The video description." \
  -m "$VIDEO" \
  -s "2026-12-31T12:00:00Z" \
  --settings '{"title":"The video title","type":"public"}' \
  -i "<youtube-channel-id>"
Title and visibility are required

On YouTube, a post cannot be scheduled without title (2 to 100 characters) and type (public, unlisted or private). Neither has a default value, by design.

TikTok: video

VIDEO=$(posty upload ./video.mp4 | jq -r '.path')

posty posts:create \
  -c "The video description." \
  -m "$VIDEO" \
  -s "2026-12-31T12:00:00Z" \
  --settings '{
    "content_posting_method": "DIRECT_POST",
    "privacy_level": "PUBLIC_TO_EVERYONE",
    "title": "The video title",
    "duet": true,
    "stitch": true,
    "comment": true,
    "autoAddMusic": "no",
    "brand_content_toggle": false,
    "brand_organic_toggle": false
  }' \
  -i "<tiktok-channel-id>"

DIRECT_POST actually publishes the video. UPLOAD only sends it to the user's TikTok inbox, where they must finish it manually within 24 hours. TikTok discards every setting except the title. See the TikTok platform page for details.

Pinterest: board

# the board IDs
posty integrations:trigger <pinterest-channel> boards

IMAGE=$(posty upload ./image.png | jq -r '.path')

posty posts:create \
  -c "The pin description." \
  -m "$IMAGE" \
  -s "2026-12-31T12:00:00Z" \
  --settings '{"board":"<board-id>","title":"The pin title"}' \
  -i "<pinterest-channel>"

Pinterest is a beta channel. Until Pinterest approves Postemi, your pins are visible only to you. board expects an ID, not a board name. The same is true for the Discord and Slack channel field.

Multiple channels with different text

If the text or settings differ by channel, provide the request in a file. The file contents match the POST /posts request body.

{
  "type": "schedule",
  "date": "2026-12-31T12:00:00Z",
  "shortLink": false,
  "posts": [
    {
      "integration": { "id": "<x-channel>" },
      "value": [{ "content": "<p>Short version for X.</p>", "image": [] }],
      "settings": { "__type": "x", "who_can_reply_post": "everyone" }
    },
    {
      "integration": { "id": "<linkedin-channel>" },
      "value": [{ "content": "<p>Longer version for LinkedIn.</p>", "image": [] }],
      "settings": { "__type": "linkedin" }
    }
  ]
}
posty posts:create --json ./post.json
Is something missing from this page? Email [email protected] or use the form on the Help page.