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

# Posts

> Create, inspect, and edit Mallary posts, with media and platform options.

## Flag Mode

```bash theme={null}
mallary posts create \
  --message "Hello from Mallary CLI" \
  --platform facebook \
  --platform linkedin \
  --profile-id AbC123xYz90 \
  --media ./launch-video.mp4 \
  --thumbnail ./launch-cover.jpg \
  --comment "Follow-up comment 1" \
  --comment "Follow-up comment 2" \
  --auto-reply-enabled \
  --scheduled-at 2026-03-30T15:00:00Z
```

Schedule a local wall-clock time in a specific timezone:

```bash theme={null}
mallary posts create \
  --message "Timezone-aware launch" \
  --platform threads \
  --scheduled-at 2026-04-06T09:30 \
  --scheduled-timezone America/Los_Angeles
```

Choose one post type for every compatible destination in flag mode:

```bash theme={null}
mallary posts create \
  --message "A new Story" \
  --platform facebook \
  --platform instagram \
  --post-type story \
  --media ./story.mp4
```

Mallary checks the type before it uploads media or sends the post. If one selected platform cannot use that type, the command stops and lists that platform's supported types. Use file mode when different platforms need different types.

## File Mode

```bash theme={null}
mallary posts create --file ./post.json
```

Example:

```json theme={null}
{
  "message": "Launch update",
  "profile_id": "AbC123xYz90",
  "platforms": ["youtube", "facebook"],
  "media": [{ "url": "./launch.mp4", "thumbnail_url": "./launch-cover.jpg" }],
  "platform_options": {
    "youtube": {
      "message": "YouTube description for the launch video",
      "title": "Launch update",
      "tags": ["product launch", "creator tools"]
    },
    "facebook": {
      "message": "Facebook caption for this launch"
    }
  }
}
```

Omit `--profile-id` or `profile_id` to use your default Mallary profile. Run `mallary profiles list` to find the random public ID for each profile.

`posts create` returns Mallary job IDs immediately. Once each job finishes publishing, `mallary jobs get <id>` and `mallary posts list --json` include `platform_post_id` and `platform_post_url` when the platform returns or exposes them.

## Edit a Scheduled Post

Read the saved post and its revision:

```bash theme={null}
mallary posts get 123 --profile-id AbC123xYz90 --json
```

Change its text or time:

```bash theme={null}
mallary posts edit 123 --message "Updated launch text" --scheduled-at 2026-10-15T15:00:00Z
```

Move the whole post group to another connection profile and replace its platform list:

```bash theme={null}
mallary posts edit 123 --target-profile-id NewProfile123 --platform instagram --platform linkedin
```

Each `--platform` names part of the **complete final destination list**. If you change only the profile, Mallary keeps the current platforms. If you change only the platforms, it keeps the current profile. Use `--profile-id` when reading a post in a non-default current profile. The CLI checks that the target profile has ready connections, and the API stops the edit if any destination has started publishing.

For automation, use `--expected-revision <n>` with the revision from `posts get --json`. A stale revision stops the edit. `--media` and `--comment` replace the complete saved lists. Use `--file` for platform options, multiple fields, or an empty list to clear media or comments:

```json theme={null}
{
  "expected_revision": 2,
  "destinations": {
    "profile_id": "NewProfile123",
    "platforms": ["instagram", "linkedin"]
  },
  "media": [{ "url": "./new-photo.jpg" }],
  "platform_options": {
    "instagram": { "post_type": "feed" },
    "linkedin": { "message": "Updated LinkedIn caption" }
  }
}
```

Run `mallary posts edit 123 --file ./post-changes.json`. When `destinations` is present, include both fields and the complete final platform list. Omit it to keep current destinations. `platform_options` replaces the complete saved options map when present. The CLI uploads local replacement media before the edit request; if the post changes during upload, the API returns a conflict and leaves the post unchanged.

## File Mode Rules

* `--file` is mutually exclusive with payload-building flags
* `--post-type` works in flag mode when every selected destination should use the same supported type
* use `platform_options` in file mode when destinations need different post types
* Mallary uploads local `media[].url` file paths to the Mallary CDN first
* Mallary uploads local `media[].thumbnail_url` file paths to the Mallary CDN first
* existing remote media URLs must already point to `https://files.mallary.ai/...`
* Mallary rejects external remote media URLs
* Mallary passes platform-specific payloads through to the API
* use `platform_options.<platform>.message` for a platform-specific message or caption

## Video Thumbnails

In flag mode, use `--thumbnail` with exactly one `--media` item:

```bash theme={null}
mallary posts create \
  --message "Launch walkthrough" \
  --platform youtube \
  --media ./launch.mp4 \
  --thumbnail ./launch-cover.jpg
```

In file mode, put `thumbnail_url` on the media item. Mallary uploads local thumbnail paths automatically. Existing remote thumbnail URLs must already point to `https://files.mallary.ai/...`.

To add a YouTube video to an existing playlist, set `platform_options.youtube.playlist_id` in file mode. The playlist must belong to the connected channel.

To add YouTube video tags, set `platform_options.youtube.tags` to a list of text values in file mode. Each tag can use up to 100 characters. The full list can use up to 500 characters after YouTube counts separators.

To disclose realistic AI-generated or altered content, set `platform_options.youtube.containsSyntheticMedia` to `true` in file mode. YouTube may show a disclosure label on the video.

To add an AI label in file mode, send a JSON boolean (`true` or `false`) in the matching platform options:

* Instagram, including Reels: `platform_options.instagram.is_ai_generated`
* Facebook Reels: `platform_options.facebook.is_ai_generated`, with `platform_options.facebook.post_type` set to `reel`
* X: `platform_options.x.made_with_ai`; `platform_options.twitter.made_with_ai` also works

Set a field to `true` to disclose AI-made content. Leave it out to send no AI label choice. The fields stay with drafts and scheduled posts. They do not change posts that are already live. X first replies do not inherit the label.

Current thumbnail support:

* YouTube regular videos: use a `jpg`, `jpeg`, or `png` thumbnail up to 50 MB. Use 16:9.
* YouTube Shorts: YouTube may store the image but show a video frame instead. Mallary returns a warning because the YouTube API cannot confirm the cover viewers will see.
* Facebook feed videos: supported with `jpg`, `jpeg`, or `png` up to 10 MB.
* Instagram videos/Reels: supported with a Mallary-hosted cover URL. Use an image that matches the video placement.
* TikTok video posts: Mallary does not send arbitrary thumbnail images to TikTok. If you supply `thumbnail_url`, Mallary skips its `video_cover_timestamp_ms` behavior, and TikTok uses its default cover.
* TikTok photo posts: `thumbnail_url` selects the cover only when it exactly matches one of the image URLs in the same `media[]` array.

## Scheduling Rules

* use `--scheduled-at 2026-04-06T18:30:00Z` when you already know the absolute publish timestamp
* use `--scheduled-at 2026-04-06T14:30 --scheduled-timezone America/New_York` when you want a local wall-clock time in a specific timezone
* in file mode, send `scheduled_at` and optional `scheduled_timezone`
* `scheduled_timezone` must be an IANA timezone such as `America/New_York`

## Supported Platform-Specific Payload Areas

Mallary CLI README currently documents platform-specific payload examples for:

* Facebook
* Instagram
* LinkedIn
* YouTube
* TikTok
* Pinterest
* Reddit
* Threads
* Bluesky
* X

For the exact `platform_options` fields currently supported by the posting API, see:

[Platform options reference](https://docs.mallary.ai/api-reference/endpoint/create.md#body-platform-options)

Every publishing platform accepts `platform_options.<platform>.message` as an optional platform-specific message. Leave it blank or omit it to use the top-level `message`.

## Threads Notes

* `platform_options.threads.post_type` can be `text`, `image`, `video`, or `carousel`.
* If you omit `platform_options.threads.post_type`, Mallary chooses from the media payload:
  no media = `text`,
  one image = `image`,
  one video = `video`,
  multiple supported media items = `carousel`.
* Threads media constraints are:
  `text` = no media,
  `image` = 1 image,
  `video` = 1 video,
  `carousel` = 2 to 20 media items.
* Threads-supported media formats are `jpg`, `jpeg`, `png`, `webp`, `mp4`, and `mov`.

## Platform-Specific Media Rules

Mallary CLI uses the same platform media validation as the Mallary API.

Important current rules:

* Threads supports text-only posts, one image, one video, or a 2 to 20 item carousel.
* YouTube requires exactly one video.
* Facebook supports `feed`, `story`, and `reel` through `platform_options.facebook.post_type`. Reels use one 9:16 MP4 or MOV video that is 3 to 90 seconds long.
* Instagram supports `feed`, `story`, `reel`, and `carousel` through `platform_options.instagram.post_type`. Stories use one image or video, Reels use one video, and carousels use 2 to 10 mixed items. For a Reel, use `shareToFeed` for profile feed placement. Add `trialParams.graduationStrategy` in file mode to publish a Trial Reel. With a Facebook Login connection, file mode also supports `isPaidPartnership` and up to two `brandedContentSponsors` on feed posts, Reels, and carousels. Stories support captions through `--message` or `platform_options.instagram.message` in file mode. To place styled text on the image or video, add it to the media before upload. Stories do not support follow-up comments.
* LinkedIn supports text-only posts, one image or GIF, or one MP4 video. Videos can be up to 1 GB (1,073,741,824 bytes) and 3 seconds to 30 minutes long. Do not mix images and video.
* TikTok video posts require one video, and TikTok photo posts support up to 35 JPEG/WebP images.
* TikTok defaults to `DIRECT_POST`, which publishes through Mallary. Set `platform_options.tiktok.post_mode = MEDIA_UPLOAD` only when you want to finish the post in the TikTok app. Inbox uploads stay `action_required` until you add the final TikTok post URL.
* Pinterest requires exactly one image or GIF, or exactly one video, plus `boardId`. Mallary shortens Pin descriptions longer than 800 characters so they can publish.
* Reddit image posts require one image or GIF. The current public API path does not support Reddit video upload.
* X allows up to 4 images, or 1 video, or 1 GIF.
* Bluesky supports text-only posts, up to four JPG, PNG, or WEBP images, or one MP4 video. Add `alt_text` to a media item when it needs an accessible description.

For the full per-platform matrix and current runtime caveats, see:

[Platform-specific media rules](https://docs.mallary.ai/api-reference/endpoint/create.md#platform-specific-media-rules)

## Comments Under Post

* use repeatable `--comment` flags in flag mode
* in file mode, send `comments_under_post` as an array
* the current limit is 3 items
* TikTok does not currently support `comments_under_post`

Example:

```json theme={null}
{
  "message": "New launch today",
  "platforms": ["facebook"],
  "media": [{ "url": "./launch.png" }],
  "comments_under_post": [
    { "content": "What do you think?" },
    { "content": "Questions? Ask below." }
  ]
}
```

## AI Auto Reply

* you can enable it account-wide with `mallary settings update`
* you can enable it per post with `--auto-reply-enabled`
* it depends on saved account settings, not just the current payload

To enable it, you must set these fields:

* `business_name`
* `website_url`
* `business_description`
* `services`
* `contact_info`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.