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

# Scheduling posts

> How to create, schedule, and manage posts across platforms using the API.

This guide walks through the post lifecycle — from creating a draft to scheduling, approving, and handling failures.

## Create a scheduled post

A single API call can target multiple platforms and channels — or schedule **multiple posts to the same channel** at different times. `postDetails` contains a shared `base` configuration and target `channels` (an array of channel IDs, an object map with per-channel overrides, or an array of `{ channelId, ...override }` entries):

```bash theme={null}
curl -X POST "https://posttu.com/api/v1/posts/create" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "postDetails": {
      "base": {
        "text": "Launching our new feature today!",
        "timestamp": "2025-02-01T14:00:00Z"
      },
      "channels": {
        "ch_twitter_main": {
          "text": "Launching our new feature today! Read the thread 🧵",
          "richText": "𝗟𝗮𝘂𝗻𝗰𝗵𝗶𝗻𝗴 𝗼𝘂𝗿 𝗻𝗲𝘄 𝗳𝗲𝗮𝘁𝘂𝗿𝗲 𝘁𝗼𝗱𝗮𝘆! Read the thread 🧵"
        },
        "ch_ig_brand": {
          "text": "Launching our new feature today! 🚀",
          "media": ["media_abc123"]
        }
      }
    },
    "isDraft": false
  }'
```

Setting `isDraft: true` saves the post without scheduling it. For platform-specific `richText` formatting rules (Reddit Snoomark, X/Twitter Unicode, Fansly custom markup, and OnlyFans HTML), see [Rich text formatting](https://docs.posttu.com/guides/rich-text-formatting.md).

## Schedule multiple posts to the same channel

To queue multiple posts for the same account in a single request (for example, when planning an Instagram profile grid), pass `channels` as an array of objects with repeated `channelId` values and independent timestamps or media:

```bash theme={null}
curl -X POST "https://posttu.com/api/v1/posts/create" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "postDetails": {
      "base": {
        "text": "Spring lookbook drop"
      },
      "channels": [
        {
          "channelId": "ch_ig_brand",
          "text": "Look #1 from the spring drop",
          "media": ["media_slot_1"],
          "timestamp": "2025-02-01T14:00:00Z"
        },
        {
          "channelId": "ch_ig_brand",
          "text": "Look #2 from the spring drop",
          "media": ["media_slot_2"],
          "timestamp": "2025-02-02T14:00:00Z"
        }
      ]
    },
    "isDraft": false
  }'
```

## Attach media

Images and videos are uploaded separately and attached by reference. See [Uploading media](https://docs.posttu.com/guides/media-uploads.md) for the full upload lifecycle:

```bash theme={null}
# 1. Get a presigned upload URL
curl -X POST "https://posttu.com/api/media/upload" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "launch-banner.jpg",
    "contentType": "image/jpeg",
    "extension": "jpg",
    "sessionId": "sess_v0Kps9Bgnk2",
    "bytes": 248320
  }'

# 2. PUT the file bytes to the returned URL, then finalize:
curl -X POST "https://posttu.com/api/v1/media/finalize" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "mediaIds": ["md_v0Kps9Bgnk2"] }'

# 3. Reference the media ID when creating the post
curl -X POST "https://posttu.com/api/v1/posts/create" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "postDetails": {
      "base": {
        "text": "Launching today!",
        "timestamp": "2025-02-01T14:00:00Z",
        "media": ["md_v0Kps9Bgnk2"]
      },
      "channels": ["ch_ig_brand"]
    },
    "isDraft": false
  }'
```

Media must be `LIVE` before the post is created. For files hosted at public URLs, the [bulk upload](https://docs.posttu.com/guides/bulk-uploads.md) endpoint can transload them in the background instead.

## Check the calendar

View all scheduled posts for a date range:

```bash theme={null}
curl -X POST "https://posttu.com/api/v1/calendar" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "2025-02-01",
    "to": "2025-02-28"
  }'
```

The response groups posts by date, making it straightforward to render a calendar view.

## Approval workflow

If your organization requires post approval:

**1. Post is created with PENDING status**

When approvers are configured, new posts start in `PENDING` status instead of `SCHEDULED`.

**2. Approvers review the post**

Approvers see the post in their review queue and can approve or reject it.

**3. Approve or reject via API**

```bash theme={null}
# Approve
curl -X POST "https://posttu.com/api/v1/posts/approve" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "postIds": ["post_abc123"] }'

# Reject with reason
curl -X POST "https://posttu.com/api/v1/posts/reject" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "postIds": ["post_abc123"], "reason": "Missing hashtags" }'
```

## Move back to draft

Reschedule a post by moving it back to draft:

```bash theme={null}
curl -X PATCH "https://posttu.com/api/v1/posts/draft" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "postId": "post_abc123" }'
```

## Update a scheduled post

Update a post's text, title, first comment, media, schedule time, or platform settings directly using either `PATCH /api/v1/posts/{id}` or `POST /api/v1/posts/update`:

```bash theme={null}
curl -X PATCH "https://posttu.com/api/v1/posts/post_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Updated launch copy with fresh details!",
    "timestamp": "2025-02-02T16:00:00Z",
    "media": ["md_v0Kps9Bgnk2"]
  }'
```

Alternatively, pass the post ID in the request body to `POST /api/v1/posts/update`:

```bash theme={null}
curl -X POST "https://posttu.com/api/v1/posts/update" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "post_abc123",
    "text": "Updated launch copy with fresh details!"
  }'
```

To update media on an existing post, ensure the new media asset is first [uploaded and finalized](https://docs.posttu.com/guides/media-uploads.md), then supply the new media ID array in the `media` field. If you prefer to unpublish a post and work on it without an active schedule, you can also move it back to draft status using `PATCH /api/v1/posts/draft`.


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