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

# Bulk post uploads

> How to schedule and publish batches of social media posts using CSV/JSON files, REST API, or MCP tools with unified schemas.

Posttu supports importing and scheduling posts in bulk. This allows content creators, social media managers, and developer integrations to schedule days or weeks of multi-platform content in a single operation.

The bulk upload system features:

1. **Interactive Dashboard**: Upload CSV or JSON files, inspect and edit rows inline, attach local media overrides, and configure platform-specific settings before submitting.
2. **Unified Canonical Schema**: Strict field naming with zero ambiguous aliases across CSV, JSON, API, and MCP tools.
3. **Platform-Specific Options (`other`)**: Deep configuration matching Posttu's unified platform schema for Twitter, Reddit, TikTok, YouTube, Instagram, Facebook, Pinterest, Threads, Mastodon, Fansly, OnlyFans, Fanvue, RedGifs, and Bluesky.
4. **Automated Media Transloading**: Include remote URLs under `mediaUrl`. Posttu automatically downloads, optimizes, and links media assets in the background.
5. **Developer REST API & MCP Tools**: Automate bulk operations programmatically with `POST /api/v1/posts/bulk` or AI agents using the `bulk_upload_posts` tool.

***

## Unified File & API Schema

To ensure consistency and eliminate validation errors, Posttu uses a unified schema with **no legacy aliases**. All posts require canonical field names.

### Core Fields

| Field | Type | Required | Description | Example |
| :- | :- | :- | :- | :- |
| **`platform`** | `string` | **Yes** | Target social media platform enum. Must match one of Posttu's supported platforms. | `"TWITTER"`, `"REDDIT"`, `"TIKTOK"` |
| **`channelId`** | `string` | **Yes** | Target channel connection ID. | `"ch_01h7x2abc..."` |
| **`text`** | `string` | Optional | Post body text content. Required if `mediaUrl` or `mediaId` is omitted. | `"Excited to announce our new update!"` |
| **`title`** | `string` | Optional | Post title (used by Reddit, YouTube, etc.). | `"Product Announcement"` |
| **`mediaUrl`** | `string` | Optional | Public URL of remote image/video to download and transload in the background. | `"https://example.com/promo.mp4"` |
| **`mediaId`** | `string` | Optional | ID of an already uploaded local media asset. | `"med_01h9y4xyz..."` |
| **`timestamp`** | `string` | **Yes** | ISO 8601 date-time string for scheduled publishing. Must be in the future unless `postImmediately` is `true`. | `"2026-08-01T15:30:00.000Z"` |
| **`postImmediately`** | `boolean` | Optional | If `true`, publishes the post immediately upon processing instead of scheduling. Defaults to `false`. | `false` |
| **`other`** | `object` | Optional | Platform-specific options matching Posttu's platform schema. | See Platform Options below |

> [!WARNING]
>
> **No Aliases Supported**
> Legacy field aliases such as `caption`, `message`, `content`, `body`, `channel`, `date`, `time`, `scheduled_at`, and `immediate` are not accepted. Use the exact canonical names listed above.

***

## Platform-Specific Options (`other`)

The `other` object allows you to customize platform settings. In JSON files or API requests, pass these as nested objects under the uppercase platform key. In CSV files, pass a stringified JSON object in the `other` column or use dot-notation headers (e.g. `REDDIT.subreddit`).

### 1. Twitter / X (`TWITTER`)

| Property | Type | Default | Description |
| :- | :- | :- | :- |
| `replySettings` | `string` | `"everyone"` | Who can reply: `"everyone"`, `"peopleYouFollow"`, `"onlyYourSubscribers"`, or `"onlyPeopleYouMention"`. |
| `audienceSettings` | `string` | `"public"` | Audience visibility: `"public"` or `"subscribers"`. |

### 2. Reddit (`REDDIT`)

| Property | Type | Default | Description |
| :- | :- | :- | :- |
| `subreddit` | `string` | **Required** | Target subreddit name (e.g. `"announcements"` or `"marketing"`). |
| `subredditType` | `string` | `undefined` | Subreddit classification (e.g. `"public"`, `"restricted"`). |
| `spoiler` | `boolean` | `false` | Marks the Reddit post as a spoiler. |
| `over18` | `boolean` | `false` | Marks the post as NSFW (18+). |
| `pinned` | `boolean` | `false` | Pins the post to your profile if permitted. |
| `postWithRedgifsLink` | `boolean` | `false` | Whether to embed via RedGifs video link. |
| `redgifsChannelId` | `string` | `undefined` | Connected RedGifs channel ID. |
| `redgifsLink` | `string` | `undefined` | Direct RedGifs video link URL. |

### 3. TikTok (`TIKTOK`)

| Property | Type | Default | Description |
| :- | :- | :- | :- |
| `allowComments` | `boolean` | `true` | Allows viewer comments on the published video. |
| `allowDuet` | `boolean` | `true` | Allows other creators to Duet with this video. |
| `allowStitch` | `boolean` | `true` | Allows other creators to Stitch this video. |
| `isDirectPost` | `boolean` | `true` | Publish directly to feed without inbox staging. |
| `isAigc` | `boolean` | `false` | Discloses that content is AI-generated (AIGC). |
| `brandOrganicToggle` | `boolean` | `false` | Marks video as promotional brand content. |
| `brandContentToggle` | `boolean` | `false` | Discloses paid commercial partnership. |
| `coverTimestampMs` | `number` | `1000` | Video frame timestamp (in milliseconds) used as cover thumbnail. |
| `audienceSettings` | `string` | `"PUBLIC_TO_EVERYONE"` | Visibility: `"PUBLIC_TO_EVERYONE"`, `"MUTUAL_FOLLOW_FRIENDS"`, `"FOLLOWER_OF_CREATOR"`, or `"SELF_ONLY"`. |

### 4. YouTube (`YOUTUBE`)

| Property | Type | Default | Description |
| :- | :- | :- | :- |
| `visibility` | `string` | `"public"` | Video visibility: `"public"`, `"unlisted"`, or `"private"`. |
| `category` | `string` | `undefined` | YouTube category numerical ID (e.g. `"22"` for People & Blogs, `"28"` for Science & Tech). |
| `madeForKids` | `boolean` | `false` | COPPA compliance declaration: whether content is made for children. |
| `notifySubscribers` | `boolean` | `true` | Whether to send subscriber feed notifications. |
| `tags` | `string[]` | `[]` | Array of search keyword tags. |
| `containsSyntheticMedia` | `boolean` | `false` | Discloses realistic altered or synthetic content. |

### 5. Instagram (`INSTAGRAM`)

| Property | Type | Default | Description |
| :- | :- | :- | :- |
| `shareToFeed` | `boolean` | `true` | When uploading a Reel or video, shares to main profile grid as well. |
| `locationId` | `string` | `undefined` | Facebook / Instagram location tag identifier. |
| `coverTimestampMs` | `number` | `0` | Video thumbnail frame offset in milliseconds. |
| `userTags` | `object[]` | `[]` | Array of user tags: `[{ "username": "posttu", "x": 0.5, "y": 0.5 }]`. |

### 6. Pinterest (`PINTEREST`)

| Property | Type | Default | Description |
| :- | :- | :- | :- |
| `boardId` | `string` | **Required** | Target Pinterest board ID where the Pin will be placed. |
| `boardSectionId` | `string` | `undefined` | Optional section ID within the board. |
| `linkTo` | `string` | `undefined` | Destination click-through URL for the Pin. |
| `altText` | `string` | `undefined` | Accessibility description for the image. |
| `aiDisclosures` | `string[]` | `[]` | Array containing `"AI_MODIFIED"` or `"SYNTHETIC_PERFORMER"`. |

### 7. Fansly (`FANSLY`)

Fansly supports paywalls and granular access rules via the **simple Permission Builder**:

| Property | Type | Default | Description |
| :- | :- | :- | :- |
| `price` | `number` | `0` | Post unlock price in USD (e.g. `5` for \$5.00). |
| `subscriptionTier` | `string` | `undefined` | Name or ID of subscription tier required to view. |
| `postToFyp` | `boolean` | `false` | Publishes post to the For You Page (FYP). |
| `postToWalls` | `string[]` | Default wall | Array of wall IDs to publish to. |
| `pinToWalls` | `string[]` | `[]` | Array of wall IDs to pin the post to. |
| `expiration` | `number` | `undefined` | Number of days until post access expires. |
| `replyPermissions` | `object[]` | `[]` | Permission builder array: `[{ "following": true, "subscribed": true, "tipped": 1.0 }]`. |
| `pollPermissions` | `object[]` | `[]` | Permission builder array: `[{ "following": true, "subscribed": true }]`. |
| `lockedText` | `object[]` | `[]` | Array of locked snippets: `[{ "text": "Secret info", "permissions": [{ "price": 5 }] }]`. |

#### Fansly Permission Builder Example

```json theme={null}
{
  "FANSLY": {
    "subscriptionTier": "VIP",
    "price": 10,
    "postToFyp": true,
    "replyPermissions": [
      { "following": true, "subscribed": true }
    ]
  }
}
```

### 8. Threads (`THREADS`)

| Property | Type | Default | Description |
| :- | :- | :- | :- |
| `reply_control` | `string` | `"everyone"` | Who can reply: `"everyone"`, `"accounts_you_follow"`, or `"mentioned_only"`. |
| `topic_tag` | `string` | `undefined` | Topic hashtag without '#' (cannot contain '.' or '&'). |
| `is_spoiler_media` | `boolean` | `false` | Blurs attached media with a spoiler overlay. |
| `enable_reply_approvals` | `boolean` | `false` | Manually review replies before they appear publicly. |
| `crossreshare_to_ig` | `boolean` | `false` | Cross-shares the post to connected Instagram account as a Story. |

### 9. Mastodon (`MASTODON`)

| Property | Type | Default | Description |
| :- | :- | :- | :- |
| `visibility` | `string` | `"public"` | Post visibility: `"public"`, `"unlisted"`, `"private"`, or `"direct"`. |
| `sensitive` | `boolean` | `false` | Marks media as sensitive / NSFW. |
| `spoilerText` | `string` | `undefined` | Content warning header displayed before hidden text. |
| `language` | `string` | `undefined` | ISO 639 language code for the post (e.g. `"en"`). |

### 10. Bluesky (`BLUESKY`)

| Property | Type | Default | Description |
| :- | :- | :- | :- |
| `langs` | `string[]` | `["en-US"]` | BCP 47 language codes for content indexing (up to 3). |
| `labels` | `string[]` | `[]` | Self-applied content warning labels. |
| `replySettings` | `object[]` | `[]` | Threadgate reply rules (list, mentions, following). |

### 11. RedGifs (`REDGIFS`)

| Property | Type | Default | Description |
| :- | :- | :- | :- |
| `tags` | `string[]` | **Required** | Search tags for the clip. |
| `private` | `boolean` | `false` | Keep video unlisted on profile. |
| `keepAudio` | `boolean` | `false` | Preserve audio track in upload. |

### 12. OnlyFans (`ONLYFANS`)

| Property | Type | Default | Description |
| :- | :- | :- | :- |
| `price` | `number` | `0` | Pay-to-view media unlock price in USD. |
| `expiration` | `number` | `undefined` | Duration in days before the post expires. |

***

## CSV File Structuring

Posttu supports two clean methods to format platform settings in CSV files without arbitrary aliases:

### Option A: JSON String in `other` Column (Recommended)

Add an `other` column containing valid JSON string representations. Remember that in CSV, inner double quotes must be escaped with `""`:

```csv theme={null}
platform,channelId,text,title,mediaUrl,timestamp,postImmediately,other
TWITTER,ch_twitter_main,"Excited to launch our new product!","","https://example.com/promo.mp4",2026-08-01T12:00:00.000Z,false,"{""TWITTER"":{""replySettings"":""everyone""}}"
REDDIT,ch_reddit_main,"Comprehensive update on our platform","Major Release","","2026-08-02T14:00:00.000Z,false,"{""REDDIT"":{""subreddit"":""announcements"",""spoiler"":false}}"
PINTEREST,ch_pin_main,"Creative Inspiration","Inspo Board","https://example.com/art.jpg",2026-08-03T16:00:00.000Z,false,"{""PINTEREST"":{""boardId"":""board_123""}}"
```

### Option B: Exact Dot-Notation Columns

You can also use dot-notation headers matching the exact uppercase platform name and property:

```csv theme={null}
platform,channelId,text,timestamp,REDDIT.subreddit,REDDIT.spoiler,TWITTER.replySettings
REDDIT,ch_reddit_main,"Our new feature announcement",2026-08-01T12:00:00.000Z,announcements,false,
TWITTER,ch_twitter_main,"Check out our latest release!",2026-08-01T14:00:00.000Z,,,everyone
```

***

## Developer REST API `/api/v1/posts/bulk`

### Authentication & Headers

* **Authorization**: `Bearer <API_KEY>`
* **Scope**: `posts:write`
* **Content-Type**: `application/json` or `multipart/form-data`

### 1. JSON Array Request

Send a structured payload with a `posts` array:

```bash theme={null}
curl -X POST "https://posttu.com/api/v1/posts/bulk" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "isDraft": false,
    "posts": [
      {
        "platform": "TWITTER",
        "channelId": "ch_twitter_main",
        "text": "Hello world from Posttu bulk API!",
        "mediaUrl": "https://example.com/promo.mp4",
        "timestamp": "2026-08-01T12:00:00.000Z",
        "postImmediately": false,
        "other": {
          "TWITTER": {
            "replySettings": "everyone",
            "audienceSettings": "public"
          }
        }
      },
      {
        "platform": "REDDIT",
        "channelId": "ch_reddit_main",
        "title": "New Community Announcement",
        "text": "Detailed writeup of our technical roadmap.",
        "timestamp": "2026-08-02T15:00:00.000Z",
        "other": {
          "REDDIT": {
            "subreddit": "announcements",
            "spoiler": false
          }
        }
      }
    ]
  }'
```

### 2. Multipart CSV Upload Request

Upload a CSV or JSON file directly:

```bash theme={null}
curl -X POST "https://posttu.com/api/v1/posts/bulk" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@/path/to/schedule.csv" \
  -F "isDraft=false"
```

### Response

```json theme={null}
{
  "success": true,
  "bulkUploadGroupId": "bulk-1700000000-a1b2c3d",
  "postIds": ["post_01h7x3...", "post_01h7x4..."],
  "count": 2
}
```

***

## Tracking Batch Status (`GET /api/v1/posts/bulk/status`)

When remote media URLs (`mediaUrl`) are included, Posttu downloads and transloads assets asynchronously. You can poll the batch's live progress using:

```bash theme={null}
curl -X GET "https://posttu.com/api/v1/posts/bulk/status?groupId=bulk-1700000000-a1b2c3d" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Response

```json theme={null}
{
  "success": true,
  "data": {
    "posts": [
      {
        "id": "post_01h7x3...",
        "text": "Hello world from Posttu bulk API!",
        "title": null,
        "platform": "TWITTER",
        "postStatus": "SCHEDULED",
        "scheduledFor": "2026-08-01T12:00:00.000Z",
        "failureReason": null,
        "media": [
          { "id": "med_123", "storageId": "org/123/med_123.mp4" }
        ]
      }
    ],
    "summary": {
      "total": 2,
      "completed": 2,
      "processing": 0,
      "failed": 0,
      "isFinished": true
    }
  }
}
```

### Post States

* `PROCESSING`: Remote media is downloading and transloading.
* `SCHEDULED`: Transloading complete; post is scheduled for publishing.
* `DRAFT`: Saved as a draft.
* `PENDING`: Awaiting organization team approval before scheduling.
* `FAILED`: Media download failed or scheduling slot error (detailed in `failureReason`).

***

## Model Context Protocol (MCP)

AI agents can schedule batches using the `bulk_upload_posts` tool:

```json theme={null}
{
  "name": "bulk_upload_posts",
  "arguments": {
    "isDraft": false,
    "posts": [
      {
        "platform": "REDDIT",
        "channelId": "ch_reddit_main",
        "title": "AI Roadmap Update",
        "text": "Overview of new model integrations.",
        "timestamp": "2026-08-01T18:00:00Z",
        "other": {
          "REDDIT": {
            "subreddit": "artificial"
          }
        }
      }
    ]
  }
}
```

Use `get_bulk_upload_status` with `{ "groupId": "bulk-..." }` to monitor transloading progress.

***

## Error Handling & Status Codes

| Code | Error | Resolution |
| :- | :- | :- |
| `400` | `Validation failed for bulk post items` | One or more items violate the schema (e.g. missing `REDDIT.subreddit`, missing `timestamp`, or invalid channel). Review `details` in response. |
| `401` | `Unauthorized` | Missing or invalid API key. Ensure `Authorization: Bearer <API_KEY>` is sent. |
| `429` | `DAILY_LIMIT_EXCEEDED` | The batch exceeds the channel's daily publishing limit. Review `details.nextAvailableSlot` in the error response. |
| `429` | `Rate limit exceeded` | Too many API requests within 60 seconds. Observe the `Retry-After` header. |
| `500` | `Internal Server Error` | Unexpected processing failure. Contact support if the issue persists. |


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