> ## 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.

# Creating threads

> How to publish multi-post threaded sequences on X, Bluesky, Threads, and Mastodon using the Posttu API.

Threads allow you to publish connected sequences of posts where each subsequent post is chained as a native reply to the previous one. This is ideal for long-form storytelling, multi-part tutorials, product launch breakdowns, and rich media galleries.

## Supported platforms

Thread sequences are supported on the following social networks:

| Platform | Post limit (per item) | Media limit (per item) |
| - | - | - |
| **X (Twitter)** | 280 characters | Up to 4 images, or 1 video/GIF |
| **Bluesky** | 300 characters | Up to 4 images, or 1 video |
| **Threads** | 500 characters | Up to 10 images/videos (carousel) |
| **Mastodon** | 500 characters (default) | Up to 4 media attachments |

When cross-posting to a combination of thread-capable platforms (e.g. X and Bluesky) and single-post platforms (e.g. LinkedIn or Instagram), the root post publishes across all channels, while the `thread` items publish exclusively to thread-capable channels.

***

## Thread structure

In the Posttu API, a thread consists of:

1. **Root post**: Defined by the top-level `base` content (`text`, `media`, `timestamp`, `poll`, etc.).
2. **Thread items (`thread`)**: An ordered array of subsequent posts to append under the root post.

Each item inside `thread` supports:

* `text` (string, optional): The text content of the thread post.
* `media` (string\[], optional): An array of finalized media asset IDs attached specifically to that thread post.

***

## Create a thread

To schedule a thread, provide the root post in `base` and the follow-up posts in `base.thread`:

```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": "1/ Here is how we scaled our application to 1M users with zero downtime 🧵",
        "timestamp": "2026-11-15T15:00:00Z",
        "media": ["med_diagram_architecture"],
        "thread": [
          {
            "text": "2/ First, we decoupled our ingestion pipeline so spikes never impact active API traffic.",
            "media": ["med_ingestion_chart"]
          },
          {
            "text": "3/ Second, we implemented multi-region edge caching with automated cache invalidation."
          },
          {
            "text": "4/ Finally, we set up real-time observability. Read our full engineering blog post at https://posttu.com/blog!"
          }
        ]
      },
      "channels": ["ch_twitter_1", "ch_bluesky_1"]
    },
    "isDraft": false
  }'
```

***

## Automated thread numbering

Instead of numbering your posts manually, you can enable Posttu's built-in **Thread Counter** using `other.threadCounter`. The counter dynamically calculates the total number of posts and appends the proper index tag to each post in the thread.

```json theme={null}
{
  "postDetails": {
    "base": {
      "text": "Announcing our new open-source developer toolkit!",
      "thread": [
        { "text": "Feature 1: Instant local sandbox provisioning." },
        { "text": "Feature 2: Real-time collaborative state synchronization." },
        { "text": "Get started today on GitHub." }
      ]
    },
    "channels": {
      "ch_twitter_1": {
        "other": {
          "threadCounter": {
            "enabled": true,
            "format": "1/N",
            "placement": "bottom"
          }
        }
      }
    }
  }
}
```

### Counter formats

| Format | Output (Post 1 of 4) | Output (Post 4 of 4) |
| - | - | - |
| `"(1/N)"` | `(1/4)` | `(4/4)` |
| `"1/N"` | `1/4` | `4/4` |
| `"[1/N]"` | `[1/4]` | `[4/4]` |
| `"1/"` | `1/` | `4/` |
| `"🧵 1/"` | `🧵 1/` | `🧵 4/` |
| `"custom"` | Uses `customTemplate` (e.g. `Part {i} of {n}`) | `Part 4 of 4` |
| `"none"` | No counter appended | No counter appended |

### Counter placement

* `"bottom"`: Appends the counter at the bottom of the post text, preceded by a newline.
* `"top"`: Prepends the counter at the top of the post text.
* `"inline"`: Appends the counter directly at the end of the text with a space.

***

## Updating an existing thread

You can update scheduled or draft threads before they are published using either `PATCH /api/v1/posts/{id}` or `POST /api/v1/posts/update`.

When updating, you can:

* Edit the text or media of any post in the thread sequence.
* Add new posts to the end of the thread.
* Remove posts from the thread (excess posts are safely pruned).

```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": "1/ Updated introduction for our architectural deep dive 🧵",
    "thread": [
      {
        "text": "2/ Revised explanation of our message queue reliability guarantees.",
        "media": ["med_updated_diagram"]
      },
      {
        "text": "3/ Concluding thoughts and link to repo."
      }
    ]
  }'
```

***

## Publishing behavior

1. **Sequential publishing**: When the scheduled time arrives, Posttu publishes the root post first. Once the platform confirms publication and returns the root post ID, the system sequentially publishes each subsequent child post as an in-reply-to chain.
2. **Media processing**: Any media attached to thread items must be uploaded and finalized before scheduling, or the post can be created with `isDraft: true` while media processing completes.
3. **Atomic status**: The root post and all child posts share a common schedule lifecycle. If a thread is moved to draft or deleted, all child posts are synchronized accordingly.


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