### Install and Start Dev Container CLI Source: https://github.com/gitroomhq/postiz-docs/blob/main/installation/devcontainer.mdx Install the Dev Container CLI globally using npm and then start a dev container. ```bash npm install -g @devcontainers/cli devcontainer up ``` -------------------------------- ### Install Nginx and Start Service Source: https://github.com/gitroomhq/postiz-docs/blob/main/reverse-proxies/nginx.mdx Installs Nginx on Ubuntu/Debian systems and ensures the service is running and enabled on boot. ```bash sudo apt update && sudo apt install nginx -y sudo systemctl start nginx && sudo systemctl enable nginx ``` -------------------------------- ### Complete Example: Post with Image Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/skool.mdx An example of a Skool post that includes an image. ```APIDOC ### Post with Image ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-skool-integration-id" }, "value": [ { "content": "Here's my progress report for this month. Really happy with the results!\n\nKey metrics:\n- Revenue up 25%\n- New members: 150\n- Engagement rate: 45%", "image": [ { "id": "metrics-image-id", "path": "https://uploads.postiz.com/metrics.png" } ] } ], "settings": { "__type": "skool", "group": "your-group-id", "label": "your-label-id", "title": "Monthly Progress Report - December 2024" } } ] } ``` ``` -------------------------------- ### Install Dependencies and Run Server Source: https://github.com/gitroomhq/postiz-docs/blob/main/cli/authentication.mdx Install project dependencies and run the auth server in development or production mode. ```bash pnpm install # Development pnpm dev # Production pnpm build pnpm start:prod ``` -------------------------------- ### Complete Example: Quick Announcement Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/skool.mdx An example of a Skool post for a quick announcement, scheduled to post immediately. ```APIDOC ### Quick Announcement ```json { "type": "now", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-skool-integration-id" }, "value": [ { "content": "We're going live in 30 minutes! Join us for a Q&A session about scaling your business.\n\nDrop your questions below and we'll cover them live! 🎙️", "image": [] } ], "settings": { "__type": "skool", "group": "your-group-id", "label": "your-label-id", "title": "🔴 LIVE Q&A Starting Soon!" } } ] } ``` ``` -------------------------------- ### Start and Stop Docker Stack Source: https://github.com/gitroomhq/postiz-docs/blob/main/installation/migration.mdx Initiate the Docker stack to allow services to start, then stop it to prepare for data migration. Wait for the stack to fully start before stopping. ```bash docker compose up -d ``` ```bash docker compose down ``` -------------------------------- ### Find group ID and list its integrations Source: https://github.com/gitroomhq/postiz-docs/blob/main/cli/integrations.mdx This example first finds the ID of a group by its name using `jq`, then uses that ID to list all integrations within that specific group. It requires `jq` to be installed. ```bash # Find a group by name, then list its integrations GROUP_ID=$(postiz integrations:groups | jq -r '.[] | select(.name=="My Company") | .id') postiz integrations:list --group "$GROUP_ID" ``` -------------------------------- ### Complete Post Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/x.mdx An example of a complete schedule object including X (Twitter) settings. ```APIDOC ## Complete Example ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-x-integration-id" }, "value": [ { "content": "Hello from the Postiz API! 🚀", "image": [] } ], "settings": { "__type": "x", "who_can_reply_post": "everyone", "community": "", "made_with_ai": false, "paid_partnership": false } } ] } ``` ``` -------------------------------- ### Get Pinterest boards Source: https://github.com/gitroomhq/postiz-docs/blob/main/cli/integrations.mdx Example of triggering a tool to retrieve Pinterest boards. Requires a valid Pinterest integration ID and the `getBoards` method. ```bash postiz integrations:trigger pinterest-id getBoards ``` -------------------------------- ### Complete Example: Post with Image Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/telegram.mdx An example of a complete post configuration for scheduling a post with an image to Telegram. ```APIDOC ### Post with Image ```json { "type": "now", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-telegram-integration-id" }, "value": [ { "content": "Sharing today's launch screenshot", "image": [ { "id": "image-id", "path": "https://uploads.postiz.com/launch.png" } ] } ], "settings": { "__type": "telegram" } } ] } ``` ``` -------------------------------- ### Complete Example: Video with Custom Thumbnail Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/youtube.mdx Example of scheduling a YouTube video with a custom thumbnail. ```APIDOC ### Video with Custom Thumbnail ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-youtube-integration-id" }, "value": [ { "content": "Full video description here...", "image": [ { "id": "video-id", "path": "https://uploads.postiz.com/video.mp4" } ] } ], "settings": { "__type": "youtube", "title": "My Awesome Video", "type": "public", "selfDeclaredMadeForKids": "no", "thumbnail": { "id": "thumb-id", "path": "https://uploads.postiz.com/thumbnail.jpg" }, "tags": [] } } ] } ``` ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/gitroomhq/postiz-docs/blob/main/installation/development.mdx Run this command to install all necessary project dependencies using pnpm. ```bash pnpm install ``` -------------------------------- ### Install Postiz CLI Source: https://github.com/gitroomhq/postiz-docs/blob/main/cli/introduction.mdx Install the Postiz CLI globally using npm or pnpm. ```bash npm install -g postiz ``` ```bash pnpm install -g postiz ``` -------------------------------- ### Complete X Post Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/x.mdx An example of a complete schedule object for posting to X, including content and specific X settings. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-x-integration-id" }, "value": [ { "content": "Hello from the Postiz API! 🚀", "image": [] } ], "settings": { "__type": "x", "who_can_reply_post": "everyone", "community": "", "made_with_ai": false, "paid_partnership": false } } ] } ``` -------------------------------- ### Complete Example: Community Post Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/skool.mdx An example of a complete Skool post configuration for a community update. ```APIDOC ## Complete Example ### Community Post ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-skool-integration-id" }, "value": [ { "content": "Hey everyone! 👋\n\nI wanted to share some tips that helped me grow my community:\n\n1. Be consistent with posting\n2. Engage with every comment\n3. Create valuable content\n\nWhat strategies have worked for you?", "image": [] } ], "settings": { "__type": "skool", "group": "your-group-id", "label": "your-label-id", "title": "Community Growth Tips - What Worked For Me" } } ] } ``` ``` -------------------------------- ### Complete Example: Public Video with Tags Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/youtube.mdx Example of scheduling a public YouTube video with tags. ```APIDOC ## Complete Example ### Public Video with Tags ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-youtube-integration-id" }, "value": [ { "content": "In this video, I'll show you how to use the Postiz API to automate your social media workflow.\n\nTimestamps:\n0:00 Introduction\n1:30 Setup\n5:00 First API call\n10:00 Conclusion", "image": [ { "id": "video-id", "path": "https://uploads.postiz.com/tutorial.mp4" } ] } ], "settings": { "__type": "youtube", "title": "How to Use Postiz API - Complete Tutorial", "type": "public", "selfDeclaredMadeForKids": "no", "tags": [ { "value": "postiz", "label": "postiz" }, { "value": "api", "label": "api" }, { "value": "tutorial", "label": "tutorial" }, { "value": "social media automation", "label": "social media automation" } ] } } ] } ``` ``` -------------------------------- ### Pin Example with All Options Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/pinterest.mdx An example demonstrating a Pin with all available optional fields, including a title, link, and dominant color. This provides a richer Pin experience. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-pinterest-integration-id" }, "value": [ { "content": "Try this delicious recipe! Perfect for summer dinners. Full recipe on my blog 👇", "image": [ { "id": "recipe-image-id", "path": "https://uploads.postiz.com/recipe.jpg" } ] } ], "settings": { "__type": "pinterest", "board": "9876543210987654321", "title": "Easy Summer Pasta Recipe", "link": "https://myrecipes.com/summer-pasta", "dominant_color": "#E8B4B8" } } ] } ``` -------------------------------- ### Start Docker Stack Finally Source: https://github.com/gitroomhq/postiz-docs/blob/main/installation/migration.mdx Start the Docker stack to finalize the migration. Ensure you wait for it to start completely. ```bash docker compose up -d ``` -------------------------------- ### Skool Quick Announcement Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/skool.mdx Example for posting an announcement immediately to Skool. This uses the `now` type for instant publishing. ```json { "type": "now", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-skool-integration-id" }, "value": [ { "content": "We're going live in 30 minutes! Join us for a Q&A session about scaling your business.\n\nDrop your questions below and we'll cover them live! 🎙️", "image": [] } ], "settings": { "__type": "skool", "group": "your-group-id", "label": "your-label-id", "title": "🔴 LIVE Q&A Starting Soon!" } } ] } ``` -------------------------------- ### Complete Forum Post Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/whop.mdx A full example of scheduling a forum post with content and settings. The 'title' field is optional. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-whop-integration-id" }, "value": [ { "content": "# Weekly Update\n\nHere's what we shipped this week:\n\n- New dashboard redesign\n- Performance improvements\n- Bug fixes\n\nLet us know what you think!", "image": [] } ], "settings": { "__type": "whop", "company": "biz_xxxxxxxxxxxx", "experience": "exp_xxxxxxxxxxxx", "title": "Weekly Update - Dec 14" } } ] } ``` -------------------------------- ### Basic Pin Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/pinterest.mdx A basic example of scheduling a Pin with essential content and settings. Ensure the `integration.id` and `settings.board` are correctly set. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-pinterest-integration-id" }, "value": [ { "content": "Beautiful home decor inspiration for your living room! 🏠✨", "image": [ { "id": "pin-image-id", "path": "https://uploads.postiz.com/decor.jpg" } ] } ], "settings": { "__type": "pinterest", "board": "1234567890123456789", "title": "Living Room Decor Ideas", "link": "https://myblog.com/living-room-decor", "dominant_color": "" } } ] } ``` -------------------------------- ### Text Post Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/mastodon.mdx Example of creating a simple text post to Mastodon. ```APIDOC ## Complete Example ### Text Post ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-mastodon-integration-id" }, "value": [ { "content": "Hello from the Postiz API! 🐘", "image": [] } ], "settings": { "__type": "mastodon" } } ] } ``` ``` -------------------------------- ### Complete Example: Announcement Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/twitch.mdx Example of a scheduled post with a highlighted announcement message for Twitch. ```APIDOC ### Announcement ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-twitch-integration-id" }, "value": [ { "content": "🎉 HUGE NEWS! We just hit 10,000 followers! Thank you all so much for the support! Special stream tomorrow to celebrate!", "image": [] } ], "settings": { "__type": "twitch", "messageType": "announcement", "announcementColor": "purple" } } ] } ``` ``` -------------------------------- ### Verify Postiz CLI Installation Source: https://github.com/gitroomhq/postiz-docs/blob/main/cli/introduction.mdx Check if the Postiz CLI is installed correctly by running the help command. ```bash postiz --help ``` -------------------------------- ### Complete Post with Image Example for VK Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/vk.mdx This example shows how to schedule a post with an image to VK. The image is specified with an `id` and `path`. ```json { "type": "now", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-vk-integration-id" }, "value": [ { "content": "Sharing today's launch screenshot", "image": [ { "id": "image-id", "path": "https://uploads.postiz.com/launch.png" } ] } ], "settings": { "__type": "vk" } } ] } ``` -------------------------------- ### Complete Link Post Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/reddit.mdx An example of a complete schedule object for posting a link to Reddit. Includes integration ID, and subreddit settings with a URL. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-reddit-integration-id" }, "value": [ { "content": "", "image": [] } ], "settings": { "__type": "reddit", "subreddit": [ { "value": { "subreddit": "technology", "title": "Interesting article about AI developments", "type": "link", "url": "https://example.com/ai-article", "is_flair_required": false, "flair": null } } ] } } ] } ``` -------------------------------- ### Complete Example: Green Announcement Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/twitch.mdx Example of a 'now' post with a green announcement message for Twitch. ```APIDOC ### Green Announcement ```json { "type": "now", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-twitch-integration-id" }, "value": [ { "content": "✅ Giveaway winner announced! Congratulations to the lucky viewer! Check your DMs for prize details.", "image": [] } ], "settings": { "__type": "twitch", "messageType": "announcement", "announcementColor": "green" } } ] } ``` ``` -------------------------------- ### Complete Moltbook Post Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/moltbook.mdx This is a complete example of a scheduled post to a Moltbook submolt. Ensure the `integration.id` is correctly set and the `settings` object includes the `submolt` ID. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-moltbook-integration-id" }, "value": [ { "content": "Hello Moltbook!", "image": [] } ], "settings": { "__type": "moltbook", "submolt": "submolt-id" } } ] } ``` -------------------------------- ### Complete Example: Text Post Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/telegram.mdx An example of a complete post configuration for scheduling a text-only post to Telegram. ```APIDOC ### Text Post ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-telegram-integration-id" }, "value": [ { "content": "Hello from the Postiz API!", "image": [] } ], "settings": { "__type": "telegram" } } ] } ``` ``` -------------------------------- ### Thread Post Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/x.mdx An example demonstrating how to create a thread on X (Twitter) by adding multiple items to the `value` array. ```APIDOC ## Thread Example Create a thread by adding multiple items to the `value` array: ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-x-integration-id" }, "value": [ { "content": "1/ This is the first tweet in my thread", "image": [] }, { "content": "2/ This is the second tweet", "image": [] }, { "content": "3/ And this is the final tweet!", "image": [] } ], "settings": { "__type": "x", "who_can_reply_post": "everyone" } } ] } ``` ``` -------------------------------- ### API Key Authentication Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/introduction.mdx Example of how to authenticate with the Postiz API using an API Key in the Authorization header. ```APIDOC ## API Key Authentication ### Description Use your API key to authenticate requests by including it in the `Authorization` header. ### Method GET ### Endpoint https://api.postiz.com/public/v1/integrations ### Headers - `Authorization`: `your-api-key` ``` -------------------------------- ### Complete Text Post Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/mastodon.mdx Example of scheduling a simple text post to Mastodon. Ensure the integration ID is correct and the content is provided. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-mastodon-integration-id" }, "value": [ { "content": "Hello from the Postiz API! 🐘", "image": [] } ], "settings": { "__type": "mastodon" } } ] } ``` -------------------------------- ### Complete Text Post Example for VK Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/vk.mdx This example demonstrates how to schedule a text-only post to VK. Ensure the `integration.id` is set to your VK integration ID. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-vk-integration-id" }, "value": [ { "content": "Hello from the Postiz API!", "image": [] } ], "settings": { "__type": "vk" } } ] } ``` -------------------------------- ### Install Postiz Agent Skill Source: https://github.com/gitroomhq/postiz-docs/blob/main/cli/introduction.mdx Install the Postiz agent skill for enhanced AI agent functionality with Postiz. ```bash npx skills add gitroomhq/postiz-agent ``` -------------------------------- ### Skool Community Post Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/skool.mdx Complete example for scheduling a community post to Skool. This includes content and settings for group, label, and title. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-skool-integration-id" }, "value": [ { "content": "Hey everyone! 👋\n\nI wanted to share some tips that helped me grow my community:\n\n1. Be consistent with posting\n2. Engage with every comment\n3. Create valuable content\n\nWhat strategies have worked for you?", "image": [] } ], "settings": { "__type": "skool", "group": "your-group-id", "label": "your-label-id", "title": "Community Growth Tips - What Worked For Me" } } ] } ``` -------------------------------- ### Complete Example: Green Announcement Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/twitch.mdx This example demonstrates scheduling a Twitch announcement with a `green` announcement color. The `type` is set to `now`. ```json { "type": "now", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-twitch-integration-id" }, "value": [ { "content": "✅ Giveaway winner announced! Congratulations to the lucky viewer! Check your DMs for prize details.", "image": [] } ], "settings": { "__type": "twitch", "messageType": "announcement", "announcementColor": "green" } } ] } ``` -------------------------------- ### Team Announcement Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/slack.mdx An example of posting an immediate announcement to a Slack channel. This uses the 'now' type for instant delivery. ```json { "type": "now", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-slack-integration-id" }, "value": [ { "content": ":mega: *Team Update*\n\n> Reminder: All-hands meeting tomorrow at 2 PM\n\n*Agenda:*\n1. Q4 Review\n2. 2025 Planning\n3. Open Q&A\n\nSee you there! :wave:", "image": [] } ], "settings": { "__type": "slack", "channel": "C9876543210" } } ] } ``` -------------------------------- ### Complete LinkedIn Page Post Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/linkedin-page.mdx A full example of a post configuration for a LinkedIn company page, including content and settings. ```json { "type": "now", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-linkedin-page-integration-id" }, "value": [ { "content": "We're hiring! Join our team and help us build the future.", "image": [] } ], "settings": { "__type": "linkedin-page", "post_as_images_carousel": false } } ] } ``` -------------------------------- ### Complete Text Post Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/reddit.mdx An example of a complete schedule object for posting a text (self) post to Reddit. Includes content, integration ID, and detailed subreddit settings. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-reddit-integration-id" }, "value": [ { "content": "I've been working on this project for the past few months and wanted to share my experience.\n\n## What I learned\n\n1. Planning is crucial\n2. Start small\n3. Iterate quickly\n\nWhat are your thoughts?", "image": [] } ], "settings": { "__type": "reddit", "subreddit": [ { "value": { "subreddit": "programming", "title": "My journey building a side project - lessons learned", "type": "self", "url": "", "is_flair_required": false, "flair": null } } ] } } ] } ``` -------------------------------- ### Complete Example: Note with Image for Nostr Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/nostr.mdx Example of a complete JSON payload for scheduling a note with an image to Nostr. Include the image details with its ID and path. ```json { "type": "now", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-nostr-integration-id" }, "value": [ { "content": "Sharing today's launch screenshot", "image": [ { "id": "image-id", "path": "https://uploads.postiz.com/launch.png" } ] } ], "settings": { "__type": "nostr" } } ] } ``` -------------------------------- ### Complete Example: Text Note for Nostr Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/nostr.mdx Example of a complete JSON payload for scheduling a text-only note to Nostr. Ensure the integration ID and content are correctly set. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-nostr-integration-id" }, "value": [ { "content": "Hello from the Postiz API!", "image": [] } ], "settings": { "__type": "nostr" } } ] } ``` -------------------------------- ### Skool Post with Image Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/skool.mdx Example for scheduling a Skool post that includes an image. The image is specified with an ID and path within the `value` object. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-skool-integration-id" }, "value": [ { "content": "Here's my progress report for this month. Really happy with the results!\n\nKey metrics:\n- Revenue up 25%\n- New members: 150\n- Engagement rate: 45%", "image": [ { "id": "metrics-image-id", "path": "https://uploads.postiz.com/metrics.png" } ] } ], "settings": { "__type": "skool", "group": "your-group-id", "label": "your-label-id", "title": "Monthly Progress Report - December 2024" } } ] } ``` -------------------------------- ### Postiz CLI Quick Start Commands Source: https://github.com/gitroomhq/postiz-docs/blob/main/cli/introduction.mdx Perform common actions with the Postiz CLI: list integrations, create a scheduled post, and list scheduled posts. ```bash # 1. List your connected social media accounts postiz integrations:list ``` ```bash # 2. Create a scheduled post postiz posts:create \ -c "Hello from the Postiz CLI!" -s "2025-01-15T10:00:00Z" -i "your-integration-id" ``` ```bash # 3. List your scheduled posts postiz posts:list ``` -------------------------------- ### Get YouTube playlists Source: https://github.com/gitroomhq/postiz-docs/blob/main/cli/integrations.mdx Example of triggering a tool to retrieve YouTube playlists. Requires a valid YouTube integration ID and the `getPlaylists` method. ```bash postiz integrations:trigger youtube-id getPlaylists ``` -------------------------------- ### Get LinkedIn company pages Source: https://github.com/gitroomhq/postiz-docs/blob/main/cli/integrations.mdx Example of triggering a tool to retrieve LinkedIn company pages. Requires a valid LinkedIn integration ID and the `getCompanies` method. ```bash postiz integrations:trigger linkedin-id getCompanies ``` -------------------------------- ### Full Google My Business Offer Post Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/gmb.mdx A complete example demonstrating how to schedule a Google My Business offer post. This includes post content, image, and detailed offer settings with a call-to-action. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-gmb-integration-id" }, "value": [ { "content": "🎉 Big Holiday Sale! Get 20% off all products this weekend only. Visit us in-store or shop online!", "image": [ { "id": "img-id", "path": "https://uploads.postiz.com/sale-banner.jpg" } ] } ], "settings": { "__type": "gmb", "topicType": "OFFER", "callToActionType": "GET_OFFER", "callToActionUrl": "https://example.com/holiday-sale", "offerCouponCode": "HOLIDAY20", "offerTerms": "Valid December 14-15, 2024. In-store and online." } } ] } ``` -------------------------------- ### Get Reddit flairs for a subreddit Source: https://github.com/gitroomhq/postiz-docs/blob/main/cli/integrations.mdx Example of triggering a tool to fetch Reddit flairs for a specified subreddit. Requires a valid Reddit integration ID and the `getFlairs` method. ```bash postiz integrations:trigger reddit-id getFlairs -d '{"subreddit":"programming"}' ``` -------------------------------- ### Upload and Post Workflow Source: https://github.com/gitroomhq/postiz-docs/blob/main/cli/media-upload.mdx This example demonstrates a common workflow: first uploading a file, then extracting its URL using jq, and finally using that URL to create a post. ```bash # 1. Upload the file RESULT=$(postiz upload photo.jpg) FILE_URL=$(echo "$RESULT" | jq -r '.path') # 2. Use the URL in a post postiz posts:create \ -c "Check out this photo!" \ -m "$FILE_URL" \ -s "2025-01-15T10:00:00Z" \ -i "your-integration-id" ``` -------------------------------- ### Get X Platform Schema Source: https://github.com/gitroomhq/postiz-docs/blob/main/mcp/examples.mdx The agent calls `integrationSchema` with `platform: "x"` to retrieve the rules and settings for posting to X. This example shows a simplified schema output. ```json { "output": { "rules": "...", "maxLength": 280, "settings": { ... }, "tools": [] } } ``` -------------------------------- ### Extract Specific Metrics with jq Source: https://github.com/gitroomhq/postiz-docs/blob/main/cli/analytics.mdx Use `jq` to filter and extract specific data points from the analytics responses. These examples demonstrate how to get follower trends, percentage changes, and the latest total for post metrics. ```bash # Get just the follower count trend postiz analytics:platform integration-id -d 30 | jq '.[] | select(.label=="Followers")' ``` ```bash # Get percentage changes for all metrics postiz analytics:platform integration-id | jq '.[] | {label, percentageChange}' ``` ```bash # Get the latest total for each post metric postiz analytics:post post-id | jq '.[] | {label, latest: .data[-1].total}' ``` -------------------------------- ### Example Hashnode Article Configuration Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/hashnode.mdx An example demonstrating how to configure a Hashnode post within a schedule, including content, settings, and required properties like title, publication ID, and tags. Ensure the title is at least 6 characters and at least one tag is provided. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-hashnode-integration-id" }, "value": [ { "content": "# Introduction\n\nWelcome to this comprehensive guide...\n\n## Prerequisites\n\n- Node.js installed\n- Basic JavaScript knowledge\n\n## Getting Started\n\nLet's begin...", "image": [] } ], "settings": { "__type": "hashnode", "title": "Complete Guide to TypeScript", "subtitle": "From basics to advanced patterns", "publication": "your-publication-id", "tags": [ { "value": "typescript-id", "label": "TypeScript" }, { "value": "javascript-id", "label": "JavaScript" } ] } } ] } ``` -------------------------------- ### Run the Development Server Source: https://github.com/gitroomhq/postiz-docs/blob/main/installation/development.mdx Start the local development server with this command. Access the application at http://localhost:4200. ```bash pnpm run dev ``` -------------------------------- ### Post with Image Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/mastodon.mdx Example of posting content with an image to Mastodon. ```APIDOC ### Post with Image ```json { "type": "now", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-mastodon-integration-id" }, "value": [ { "content": "Sharing a launch screenshot", "image": [ { "id": "image-id", "path": "https://uploads.postiz.com/launch.png" } ] } ], "settings": { "__type": "mastodon" } } ] } ``` ``` -------------------------------- ### Complete Example: Mobile App Design Shot Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/dribbble.mdx Example of a complete schedule object for posting a mobile app design to Dribbble. This example includes multiple images for different screens. ```json { "type": "now", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-dribbble-integration-id" }, "value": [ { "content": "Fitness tracking app concept with focus on clean data visualization and motivational design elements.\n\nSwipe to see all screens →\n\n#mobileapp #fitness #appdesign #ios", "image": [ { "id": "app-screen-1", "path": "https://uploads.postiz.com/fitness-1.png" }, { "id": "app-screen-2", "path": "https://uploads.postiz.com/fitness-2.png" } ] } ], "settings": { "__type": "dribbble", "title": "Fitness App - UI/UX Design", "team": "" } } ] } ``` -------------------------------- ### Configure Environment Variables for Postiz Source: https://github.com/gitroomhq/postiz-docs/blob/main/installation/development.mdx Copy the `.env.example` file to `.env` and populate it with your local development settings. This includes database URLs, JWT secrets, and frontend/backend URLs. ```dotenv # Required Settings DATABASE_URL="postgresql://postiz-user:postiz-password@localhost:5432/postiz-db-local" REDIS_URL="redis://localhost:6379" JWT_SECRET="random string for your JWT secret, make it long" FRONTEND_URL="http://localhost:4200" NEXT_PUBLIC_BACKEND_URL="http://localhost:3000" BACKEND_INTERNAL_URL="http://localhost:3000" TEMPORAL_ADDRESS="localhost:7233" # Optional. Your upload directory path if you host your files locally. UPLOAD_DIRECTORY="/opt/postiz/uploads/" # Optional: your upload directory slug if you host your files locally. NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY="" # Your email provider, optional EMAIL_PROVIDER="resend|nodemailer" RESEND_API_KEY="re_1234567890" # api key if you choose resend EMAIL_HOST="smtp.gmail.com" # smtp host if you choose nodemailer EMAIL_PORT="465" # smtp port if you choose nodemailer EMAIL_SECURE="true" # smtp secure if you choose nodemailer EMAIL_USER="user" # smtp user if you choose nodemailer EMAIL_PASS="pass" # smtp pass if you choose nodemailer ## These are dummy values, you must create your own from Cloudflare. ``` -------------------------------- ### Generate Prisma Client and Run Migrations Source: https://github.com/gitroomhq/postiz-docs/blob/main/installation/development.mdx Execute this command to generate the Prisma client and apply database migrations. ```bash pnpm run prisma-db-push ``` -------------------------------- ### Create a Post with Media Source: https://github.com/gitroomhq/postiz-docs/blob/main/cli/managing-posts.mdx Include media in your post by referencing uploaded media URLs. Upload media first using the `upload` command. ```bash postiz posts:create \ -c "Check out this photo!" \ -m "https://uploads.postiz.com/your-image.jpg" \ -s "2025-01-15T10:00:00Z" \ -i "your-integration-id" ``` -------------------------------- ### Thread Post Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/mastodon.mdx Example of creating a thread (multiple chained toots) on Mastodon. ```APIDOC ### Thread Post Create a thread by adding multiple items to the `value` array. Each entry becomes a reply chained to the previous toot: ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-mastodon-integration-id" }, "value": [ { "content": "1/ Starting a thread on Mastodon from the API", "image": [] }, { "content": "2/ Each value entry becomes a reply in the thread", "image": [] } ], "settings": { "__type": "mastodon" } } ] } ``` ``` -------------------------------- ### Complete Example: Private/Unlisted Video Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/youtube.mdx Example of scheduling a private or unlisted YouTube video. ```APIDOC ### Private/Unlisted Video ```json { "settings": { "__type": "youtube", "title": "Private Team Update", "type": "unlisted", "selfDeclaredMadeForKids": "no", "tags": [] } } ``` ``` -------------------------------- ### Dev.to Posting Example Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/devto.mdx An example of a complete post object including Dev.to settings. This demonstrates how to include article content, metadata, and specific Dev.to configurations like tags and title. ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-devto-integration-id" }, "value": [ { "content": "# Getting Started\n\nIn this tutorial, we'll explore...\n\n```javascript\nconst hello = 'world';\nconsole.log(hello);\n```\n\n## Conclusion\n\nThanks for reading!", "image": [] } ], "settings": { "__type": "devto", "title": "10 JavaScript Tips for Better Code", "tags": [ { "value": "javascript", "label": "javascript" }, { "value": "webdev", "label": "webdev" }, { "value": "tutorial", "label": "tutorial" }, { "value": "beginners", "label": "beginners" } ] } } ] } ``` -------------------------------- ### Example Post with Attachment Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/whop.mdx An example of a scheduled forum post to Whop that includes an image attachment. ```APIDOC ### Post with Attachment ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-whop-integration-id" }, "value": [ { "content": "Check out our new feature preview! 👀", "image": [ { "id": "preview-image-id", "path": "https://uploads.postiz.com/preview.png" } ] } ], "settings": { "__type": "whop", "company": "biz_xxxxxxxxxxxx", "experience": "exp_xxxxxxxxxxxx" } } ] } ``` ``` -------------------------------- ### Example Forum Post Source: https://github.com/gitroomhq/postiz-docs/blob/main/public-api/providers/whop.mdx A complete example of a scheduled forum post to Whop, including content and settings. ```APIDOC ## Complete Example ### Forum Post ```json { "type": "schedule", "date": "2024-12-14T10:00:00.000Z", "shortLink": false, "tags": [], "posts": [ { "integration": { "id": "your-whop-integration-id" }, "value": [ { "content": "# Weekly Update\n\nHere's what we shipped this week:\n\n- New dashboard redesign\n- Performance improvements\n- Bug fixes\n\nLet us know what you think!", "image": [] } ], "settings": { "__type": "whop", "company": "biz_xxxxxxxxxxxx", "experience": "exp_xxxxxxxxxxxx", "title": "Weekly Update - Dec 14" } } ] } ``` ```