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

# OnlyFans API Integration & Automation

> How to programmatically schedule posts, dispatch paywalled Mass DMs, and automate creator CRM workflows using Posttu's REST API and Model Context Protocol (MCP) tools.

This guide walks through automating OnlyFans creator operations using Posttu's unified REST endpoints and first-party MCP tools.

***

## 1. Prerequisites & Scopes

Before invoking OnlyFans endpoints, ensure:

1. An OnlyFans creator account is connected to your Posttu workspace (**Dashboard → Channels → Connect OnlyFans**).
2. You have generated a Developer API Key with `onlyfans:read` and `onlyfans:write` scopes (or full access).

Pass your API key in the `Authorization` header:

```http theme={null}
Authorization: Bearer YOUR_POSTTU_API_KEY
```

***

## 2. Schedule a Timeline Feed Post

Publish or schedule media-rich posts to your OnlyFans feed using Posttu's unified publishing endpoint `POST /api/v1/posts/create`:

```bash theme={null}
curl -X POST "https://posttu.com/api/v1/posts/create" \
  -H "Authorization: Bearer YOUR_POSTTU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "postDetails": {
      "base": {
        "text": "Golden hour in Tokyo ✨ New exclusive photoshoot is live on the feed!",
        "media": ["med_tokyo_01", "med_tokyo_02"],
        "postType": "post"
      },
      "channels": ["chn_of_main"]
    }
  }'
```

To inspect, update, or delete an existing OnlyFans post, use the platform-specific endpoints:

* `POST /api/v1/onlyfans/posts/get` — Query post details and statistics.
* `POST /api/v1/onlyfans/posts/update` — Modify caption, pricing, or media.
* `POST /api/v1/onlyfans/posts/delete` — Delete a post from the channel.

***

## 3. Dispatch a Paywalled Mass DM Campaign

Mass message broadcasts allow creators and agencies to reach active subscribers simultaneously with paywall unlock prices and media attachments via `POST /api/v1/onlyfans/broadcasts`:

```bash theme={null}
curl -X POST "https://posttu.com/api/v1/onlyfans/broadcasts" \
  -H "Authorization: Bearer YOUR_POSTTU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channelId": "chn_of_main",
    "text": "Late night acoustic voice memo and unreleased polaroids from today shoot ✨",
    "price": 15,
    "mediaIds": ["med_voice_memo_01", "med_polaroid_set"],
    "previewMediaIds": ["med_polaroid_preview"],
    "user_lists": ["fans"],
    "online_only": false
  }'
```

### Parameters

| Field | Type | Description |
| :- | :- | :- |
| `channelId` | `string` | Connected OnlyFans channel ID. |
| `text` | `string` | Broadcast message caption. |
| `price` | `number` | Pay-to-view unlock fee in USD (`0` for free messages). |
| `mediaIds` | `string[]` | Array of media IDs locked behind the paywall. |
| `previewMediaIds` | `string[]` | Array of media IDs shown for free as preview thumbnails. |
| `user_lists` | `string[]` | Recipient lists (default: `["fans"]`). |
| `online_only` | `boolean` | When `true`, limits delivery to currently active subscribers. |

***

## 4. Send 1-on-1 Direct Messages

Send direct messages to individual fans via `POST /api/v1/onlyfans/conversations/message/send`:

```bash theme={null}
curl -X POST "https://posttu.com/api/v1/onlyfans/conversations/message/send" \
  -H "Authorization: Bearer YOUR_POSTTU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channelId": "chn_of_main",
    "chatId": "chat_user_123",
    "platform": "ONLYFANS",
    "messageData": {
      "message": "Thanks for being one of my top supporters this month!",
      "price": 5
    }
  }'
```

***

## 5. Agentic Automation via MCP

You can delegate OnlyFans broadcast scheduling and conversation triage directly to autonomous AI agents via Posttu's Model Context Protocol (MCP) server:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "onlyfans_broadcasts",
    "arguments": {
      "channelId": "chn_of_main",
      "text": "Thank you for the support on the latest shoot ✨",
      "price": 12,
      "mediaIds": ["med_exclusive_01"],
      "user_lists": ["fans"]
    }
  }
}
```

Learn more in the [OnlyFans API Reference](https://docs.posttu.com/api-reference/onlyfans/overview.md) and the [MCP Guide](https://docs.posttu.com/mcp-server.md).


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