> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postqueen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Managing Posts

> Create, list, and delete social media posts from the command line

One command puts a post on her calendar. From there she runs on your terms: a scheduled post goes out on time without another word from you, and `-t draft` saves the post without scheduling it, so it stays put until you promote it.

## Creating Posts

Use `posts:create` to schedule or draft posts to one or more platforms.

### Simple Post

```bash theme={"system"}
postqueen posts:create \
  -c "Hello world!" \
  -s "2026-08-01T09:00:00Z" \
  -i "your-integration-id"
```

### Options

| Flag                 | Description                                            |
| -------------------- | ------------------------------------------------------ |
| `-c, --content`      | Post content. Use multiple times for threads/comments. |
| `-s, --date`         | Schedule date in ISO 8601 format (required)            |
| `-t, --type`         | `schedule` (default) or `draft`                        |
| `-m, --media`        | Comma-separated media URLs (use after uploading)       |
| `-i, --integrations` | Comma-separated integration IDs (required)             |
| `-d, --delay`        | Delay between comments in minutes (default: 0)         |
| `--shortLink`        | Use short links (default: true)                        |
| `--settings`         | Platform-specific settings as JSON                     |
| `-j, --json`         | Path to a JSON file for complex posts                  |

### Draft Post

```bash theme={"system"}
postqueen posts:create \
  -c "Review this before publishing" \
  -s "2026-08-01T09:00:00Z" \
  -t draft \
  -i "your-integration-id"
```

### Post with Media

Upload your media first with the [`upload`](/cli/media-upload) command, then reference the returned URL:

```bash theme={"system"}
postqueen posts:create \
  -c "Check out this photo!" \
  -m "https://uploads.postqueen.ai/your-image.jpg" \
  -s "2026-08-01T09:00:00Z" \
  -i "your-integration-id"
```

### Threads and Comments

Pass `-c` multiple times to create a thread. Comments are automatically converted to threads or replies based on the platform:

* **Twitter/X**: Thread of tweets
* **Reddit**: Comment replies
* **LinkedIn**: Comment on post
* **Instagram**: First comment

Each comment can have its own media with a corresponding `-m` flag. They pair by index, so leaving one out in the middle shifts every later media value onto the wrong item:

```bash theme={"system"}
postqueen posts:create \
  -c "Thread 1/3" -m "https://uploads.postqueen.ai/image1.jpg" \
  -c "Thread 2/3" -m "https://uploads.postqueen.ai/image2.jpg" \
  -c "Thread 3/3" \
  -s "2026-08-01T09:00:00Z" \
  -i "twitter-integration-id"
```

Use `-d` to control the delay between comments (in minutes):

```bash theme={"system"}
postqueen posts:create \
  -c "First tweet" \
  -c "Second tweet" \
  -c "Third tweet" \
  -s "2026-08-01T09:00:00Z" \
  -d 5 \
  -i "twitter-integration-id"
```

### Multi-Platform Post

Send the same content to multiple platforms by passing comma-separated integration IDs:

```bash theme={"system"}
postqueen posts:create \
  -c "Posting everywhere!" \
  -s "2026-08-01T09:00:00Z" \
  -i "twitter-id,linkedin-id,facebook-id"
```

### Platform-Specific Settings

Some platforms require additional settings. Pass them as JSON with `--settings`:

```bash theme={"system"}
postqueen posts:create \
  -c "Check out this discussion" \
  -s "2026-08-01T09:00:00Z" \
  --settings '{"subreddit":[{"value":{"subreddit":"programming","title":"My Post","type":"text","url":"","is_flair_required":false}}]}' \
  -i "reddit-integration-id"
```

<Tip>
  Use `postqueen integrations:settings <id>` to discover what settings are available for each platform. Full walkthrough: [Integrations](/cli/integrations).
</Tip>

### Complex Posts with JSON

For campaigns with per-platform content and settings, use a JSON file instead of flags:

```bash theme={"system"}
postqueen posts:create --json campaign.json
```

The file is the request body her API receives. It carries the top-level `type`, `date`, `shortLink` and `tags`, then one `posts` entry per channel. Each entry has its own `integration.id`, a `value` array (the first item is the main post, additional items become comments or thread items) and an optional `settings` object.

Example `campaign.json`:

```json theme={"system"}
{
  "type": "schedule",
  "date": "2026-08-01T09:00:00.000Z",
  "shortLink": true,
  "tags": [],
  "posts": [
    {
      "integration": { "id": "twitter-123" },
      "value": [
        {
          "content": "Tweet version",
          "image": [
            { "id": "img-1", "path": "https://uploads.postqueen.ai/twitter-image.jpg" }
          ]
        }
      ],
      "settings": { "who_can_reply_post": "everyone" }
    },
    {
      "integration": { "id": "linkedin-456" },
      "value": [
        {
          "content": "LinkedIn version with more context...",
          "image": [
            { "id": "img-2", "path": "https://uploads.postqueen.ai/linkedin-image.jpg" }
          ]
        }
      ],
      "settings": { "post_as_images_carousel": false }
    },
    {
      "integration": { "id": "reddit-789" },
      "value": [
        {
          "content": "Reddit version",
          "image": []
        }
      ],
      "settings": {
        "subreddit": [{
          "value": {
            "subreddit": "programming",
            "title": "Post Title",
            "type": "text",
            "url": "",
            "is_flair_required": false
          }
        }]
      }
    }
  ]
}
```

<Note>
  You can omit `__type` in both cases. The backend adds it from each post's integration ID, whether the settings came from `--settings` or from a `--json` file.

  `image` is required on every entry, so pass `[]` when there is no media, and each item is an object with an `id` and a `path` returned by `postqueen upload`. Run `postqueen integrations:settings <id>` to see the real settings schema for a channel.
</Note>

## Listing Posts

```bash theme={"system"}
postqueen posts:list
```

### Filter by Date Range

```bash theme={"system"}
postqueen posts:list \
  --startDate "2026-07-01T00:00:00Z" \
  --endDate "2026-07-31T23:59:59Z"
```

### Filter by Customer

```bash theme={"system"}
postqueen posts:list --customer "customer-id"
```

## Connecting Missing Posts

Some platforms do not return a post ID immediately after publishing (the `releaseId` is set to `"missing"`). When this happens, you can fetch recent content from the provider and connect the correct one to your post. This is what makes analytics work for that post.

### List Available Content

```bash theme={"system"}
postqueen posts:missing <post-id>
```

Returns an array of recent content items from the provider with their ID and thumbnail URL:

```json theme={"system"}
[
  {
    "id": "7321456789012345678",
    "url": "https://p16-sign.tiktokcdn-us.com/obj/cover-image.jpeg"
  },
  {
    "id": "7321456789012345679",
    "url": "https://p16-sign.tiktokcdn-us.com/obj/cover-image2.jpeg"
  }
]
```

<Note>
  This only works for posts where the `releaseId` is `"missing"`. Returns an empty array if the provider does not support this feature.
</Note>

### Connect a Post

Once you have identified the correct content, update the release ID:

```bash theme={"system"}
postqueen posts:connect <post-id> --release-id "7321456789012345678"
```

After connecting, the post will support full analytics via `postqueen analytics:post`.

### Full Workflow

```bash theme={"system"}
# 1. Find posts with missing release IDs (tail -n +2 drops the header line)
postqueen posts:list | tail -n +2 | jq '.posts[] | select(.releaseId == "missing") | {id, content}'

# 2. Get available content from the provider
postqueen posts:missing <post-id>

# 3. Connect the correct content
postqueen posts:connect <post-id> --release-id "7321456789012345678"

# 4. Verify analytics now work
postqueen analytics:post <post-id>
```

## Changing Post Status

Move a post between `draft` and `schedule` without changing its date.

```bash theme={"system"}
postqueen posts:status <post-id> --status draft
postqueen posts:status <post-id> --status schedule
```

* `--status schedule` promotes a draft into the publishing queue and (re)starts the workflow so it will publish at its stored date.
* `--status draft` moves a scheduled post back to draft **and terminates any running publishing workflow**, so it will not publish.

<Note>
  Use this when you want to pause a scheduled post without deleting it, or hand a draft off to the scheduler once it is ready.
</Note>

## Deleting Posts

```bash theme={"system"}
postqueen posts:delete <post-id>
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Command Reference" icon="terminal" href="/cli/command-reference">
    Every command and flag on one page
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/cli/troubleshooting">
    Fixes for common CLI errors
  </Card>
</CardGroup>
