Managing posts from the command line
Creating, listing, changing status, deleting and finding a free slot, flag by flag.
posts:create
You will use this command most often. In its simplest form:
posty posts:create \
-c "Hello everyone!" \
-s "2026-12-31T12:00:00Z" \
-i "<channel-id>"| Flag | Short | What it does |
|---|---|---|
--content | -c | The post text. Repeat this flag to create a thread, as shown below. |
--integrations | -i | Comma-separated channel IDs. |
--date | -s | The publishing time, in ISO 8601 format with an offset or time zone. |
--type | -t | schedule (the default), draft, or now. |
--media | -m | Comma-separated media URLs for the preceding -c flag. |
--delay | -d | Delay between parts, in minutes. |
--timezone | IANA time zone name, for example Europe/Budapest. | |
--settings | Platform-specific settings as JSON text. | |
--json | -j | The full request from a JSON file. |
--shortLink | Whether to shorten links. Enabled by default. |
now does not need a date, and it cannot be undone: the post goes out to your real audience. When testing a script, use draft first.
Threads and media
The first -c is the post. Each subsequent one is a comment below it. The -m flag always applies to the preceding -c flag.
posty posts:create \
-c "Part one" -m "https://uploads.posty.hu/one.jpg" \
-c "Part two" -m "https://uploads.posty.hu/two.jpg" \
-c "Part three" \
-d 5 \
-s "2026-12-31T12:00:00Z" \
-i "<channel-id>"The media URLs are returned by the posty upload command. Other URLs will not work.
Full request from a file
For a complex post, such as one with multiple channels, different text for each channel, or platform-specific settings, it is easier to work from a file:
posty posts:create --json ./post.jsonThe file contents match the POST /posts request body. You will find complete examples on the Platform examples page.
posts:list
posty posts:list \
--startDate "2026-09-01T00:00:00Z" \
--endDate "2026-09-30T23:59:59Z"Use the --customer flag to filter by client. The output is JSON, so you can pipe it to other commands.
posts:status
posty posts:status <post-id> --status draft
posty posts:status <post-id> --status scheduleThis moves the post between draft and scheduled states. Changing its status to scheduled requires publishing permission, not draft permission.
posts:delete
posty posts:delete <post-id>
posty posts:delete-group <group-id>posts:delete deletes only this one post (one channel), with its thread. The other channels of the same group stay scheduled. posts:delete-group deletes the whole group from every channel; the group ID is the group field of posts:list.
This deletes the post from Postemi. It does not affect a post already published on the platform.
posts:find-slot
posty posts:find-slot <channel-id>It uses the channel's slot template and scheduled posts to find the next available slot. This is the most useful command for scripts: ask for a slot instead of making up a date.
Using them together
SLOT=$(posty posts:find-slot "<channel>" | jq -r '.date')
posty posts:create -c "Hello everyone!" -s "$SLOT" -i "<channel>"