Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ofauth.com/llms.txt

Use this file to discover all available pages before exploring further.

What You Can Build

  • Content Schedulers: Plan and queue posts for optimal times
  • Cross-Platform Publishing: Sync content across multiple accounts
  • Content Management Systems: Organize, tag, and track post performance
  • Audience Polling: Publish posts with polls and collect fan preferences
  • Story Automation: Auto-post stories and manage ephemeral content

Quick Example

Create a new post:
const response = await fetch("https://api.ofauth.com/v2/access/posts", {
  method: "POST",
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    text: "New content just dropped! 🔥",
    mediaItems: [123, 456] // Media IDs from vault
  })
})

const post = await response.json()
console.log("Post created:", post.id)

Common Operations

List Posts

Get posts from a user (use me for your own account):
const response = await fetch("https://api.ofauth.com/v2/access/users/me/posts", {
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123"
  }
})

const posts = await response.json()

Get Post Details

const response = await fetch("https://api.ofauth.com/v2/access/posts/POST_ID", {
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123"
  }
})

const post = await response.json()
// Returns full post with media, likes, comments, etc.

Schedule a Post

Create a post to be published later:
const response = await fetch("https://api.ofauth.com/v2/access/posts", {
  method: "POST",
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    text: "Coming tomorrow! 🎉",
    mediaItems: [123],
    scheduledDate: "2024-12-25T12:00:00Z"
  })
})

Create PPV Post

Post with pay-per-view pricing:
const response = await fetch("https://api.ofauth.com/v2/access/posts", {
  method: "POST",
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    text: "Exclusive content 🔒",
    mediaItems: [123, 456],
    price: 14.99 // PPV price ($3-$200)
  })
})

Create Poll Post

const response = await fetch("https://api.ofauth.com/v2/access/posts", {
  method: "POST",
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    text: "What should I post next?",
    poll: {
      options: ["Behind the scenes", "Full set preview"],
      type: 1,
      dueDays: 7
    }
  })
})

Edit a Post

const response = await fetch("https://api.ofauth.com/v2/access/posts/POST_ID", {
  method: "PUT",
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    text: "Updated caption! ✨",
    mediaItems: [123]
  })
})

Delete a Post

const response = await fetch("https://api.ofauth.com/v2/access/posts/POST_ID", {
  method: "DELETE",
  headers: {
    apikey: "YOUR_API_KEY",
    "x-connection-id": "conn_abc123"
  }
})

API Endpoints

EndpointMethodDescription
/v2/access/postsPOSTCreate a new post
/v2/access/posts/{postId}GETGet post details
/v2/access/posts/{postId}PUTEdit a post
/v2/access/posts/{postId}DELETEDelete a post
/v2/access/users/{userId}/postsGETList user’s posts

Full API Reference

See complete endpoint documentation

Query Parameters

List Posts Query

ParameterTypeDefaultDescription
limitnumber10Results per page (1-10)
sortBystring”publish_date”Sort by: publish_date, tips, favorites_count
sortDirectionstring”desc”Sort direction: asc, desc
pinnedbooleanfalseInclude pinned posts only
includePostCountsbooleanfalseInclude engagement counters
beforePublishTimestring-Pagination cursor (ISO date)

Create Post Options

FieldTypeDescription
textstringPost caption (supports markdown)
mediaItems(number|string)[]Media references (see mediaItems reference)
pricenumberPPV price (33-200, optional)
isLockedTextbooleanLock text behind paywall
previewMediaCountnumberHow many mediaItems are previews. Uses the first N items from left to right.
scheduledDatestringISO date for scheduled posting
pollobjectPoll config with options, type, and dueDays
expireAfternumberDays until post expires (1-30)
fundRaisingTargetAmountnumberFundraising goal (min $10)
fundRaisingTipsPresetsnumber[]Tip amount presets (max 4)
For all accepted mediaItems values and validation rules, see the mediaItems reference.
For poll posts, use the managed poll object. OFAuth translates it to the upstream OnlyFans poll fields automatically.

Post Data Structure

Each post object includes:
{
  "id": 123456,
  "text": "Post caption here",
  "postedAt": "2024-01-15T10:30:00Z",
  "price": null,
  "isPinned": false,
  "likesCount": 42,
  "commentsCount": 5,
  "media": [
    {
      "id": 789,
      "type": "photo",
      "files": {
        "full": { "url": "https://media.ofauth.com/...", "width": 1920, "height": 1080 }
      }
    }
  ]
}

Tips & Best Practices

Media First: Always upload media to the vault first using the /uploads/init flow, then reference the media IDs in mediaItems when creating posts.
Scheduling: Scheduled posts are stored in OnlyFans’ queue. Use scheduledDate as an ISO 8601 date string.
Content Guidelines: All content posted through OFAuth must comply with OnlyFans’ terms of service. Violations can result in account suspension.

Media & Vault

Upload media before creating posts

Messaging & Chats

Share content via direct messages