X (Twitter)
Simple Post
Copy
postiz posts:create \
-c "Hello Twitter!" \
-s "2025-01-15T10:00:00Z" \
-i "twitter-id"
Thread
Copy
postiz posts:create \
-c "Thread 1/3: Introduction" \
-c "Thread 2/3: Main point" \
-c "Thread 3/3: Conclusion" \
-s "2025-01-15T10:00:00Z" \
-d 2000 \
-i "twitter-id"
With Reply Controls
Copy
postiz posts:create \
-c "Only followers can reply to this" \
-s "2025-01-15T10:00:00Z" \
--settings '{"who_can_reply_post":"followers"}' \
-i "twitter-id"
Post with Flair
Copy
# 1. Get available flairs
postiz integrations:trigger reddit-id getFlairs -d '{"subreddit":"programming"}'
# 2. Post with a flair
postiz posts:create \
-c "My post content" \
-s "2025-01-15T10:00:00Z" \
--settings '{"subreddit":[{"value":{"subreddit":"programming","title":"Post Title","type":"text","flair":{"id":"flair-id","name":"Discussion"}}}]}' \
-i "reddit-id"
Scripted Workflow
Copy
#!/bin/bash
REDDIT_ID=$(postiz integrations:list | jq -r '.[] | select(.identifier=="reddit") | .id')
FLAIRS=$(postiz integrations:trigger "$REDDIT_ID" getFlairs -d '{"subreddit":"programming"}')
FLAIR_ID=$(echo "$FLAIRS" | jq -r '.output[0].id')
postiz posts:create \
-c "Automated Reddit post" \
-s "2025-01-15T10:00:00Z" \
--settings "{\"subreddit\":[{\"value\":{\"subreddit\":\"programming\",\"title\":\"Post Title\",\"type\":\"text\",\"flair\":{\"id\":\"$FLAIR_ID\"}}}]}" \
-i "$REDDIT_ID"
YouTube
Copy
# Upload video first
VIDEO=$(postiz upload video.mp4)
VIDEO_URL=$(echo "$VIDEO" | jq -r '.path')
postiz posts:create \
-c "Video description here" \
-m "$VIDEO_URL" \
-s "2025-01-15T10:00:00Z" \
--settings '{"title":"My Video Title","type":"public","tags":[{"value":"tech","label":"Tech"}]}' \
-i "youtube-id"
TikTok
Copy
# Upload video first
VIDEO=$(postiz upload video.mp4)
VIDEO_URL=$(echo "$VIDEO" | jq -r '.path')
postiz posts:create \
-c "Check this out! #fyp" \
-m "$VIDEO_URL" \
-s "2025-01-15T10:00:00Z" \
--settings '{"privacy_level":"PUBLIC_TO_EVERYONE","duet":true,"stitch":true}' \
-i "tiktok-id"
Copy
# Upload image first
IMAGE=$(postiz upload photo.jpg)
IMAGE_URL=$(echo "$IMAGE" | jq -r '.path')
# Regular post
postiz posts:create \
-c "Beautiful day! #photography" \
-m "$IMAGE_URL" \
-s "2025-01-15T10:00:00Z" \
--settings '{"post_type":"post"}' \
-i "instagram-id"
Story
Copy
postiz posts:create \
-c "Story content" \
-m "$IMAGE_URL" \
-s "2025-01-15T10:00:00Z" \
--settings '{"post_type":"story"}' \
-i "instagram-id"
Reel
Copy
postiz posts:create \
-c "Reel caption" \
-m "$VIDEO_URL" \
-s "2025-01-15T10:00:00Z" \
--settings '{"post_type":"reel"}' \
-i "instagram-id"
Copy
postiz posts:create \
-c "Professional update on LinkedIn" \
-s "2025-01-15T10:00:00Z" \
-i "linkedin-id"
Image Carousel
Copy
postiz posts:create \
-c "Check out these slides!" \
-m "image1.jpg,image2.jpg,image3.jpg" \
-s "2025-01-15T10:00:00Z" \
--settings '{"post_as_images_carousel":true}' \
-i "linkedin-id"
Copy
postiz posts:create \
-c "Pin description" \
-m "$IMAGE_URL" \
-s "2025-01-15T10:00:00Z" \
--settings '{"board":"board-id","title":"Pin Title","link":"https://example.com"}' \
-i "pinterest-id"
Discord
Copy
postiz posts:create \
-c "Message to Discord" \
-s "2025-01-15T10:00:00Z" \
--settings '{"channel":"channel-id"}' \
-i "discord-id"
Batch Scheduling
Schedule multiple posts across different dates:Copy
#!/bin/bash
DATES=("2025-01-14T09:00:00Z" "2025-01-15T09:00:00Z" "2025-01-16T09:00:00Z")
CONTENT=("Monday motivation" "Tuesday tips" "Wednesday wisdom")
for i in "${!DATES[@]}"; do
postiz posts:create \
-c "${CONTENT[$i]}" \
-s "${DATES[$i]}" \
-i "twitter-id"
done
Multi-Platform Campaign
Post different content per platform in one command using a JSON file:Copy
postiz posts:create --json campaign.json
campaign.json:
Copy
{
"integrations": ["twitter-123", "linkedin-456", "reddit-789"],
"posts": [
{
"provider": "twitter",
"post": [{ "content": "Short tweet version", "image": [] }]
},
{
"provider": "linkedin",
"post": [{ "content": "More detailed LinkedIn post with professional tone", "image": [] }]
},
{
"provider": "reddit",
"post": [{ "content": "Reddit post body", "image": [] }],
"settings": {
"__type": "reddit",
"subreddit": [{ "value": { "subreddit": "programming", "title": "Post Title", "type": "text" } }]
}
}
]
}

