Before you start
Ask the user to authorize your app withposts:write, which lets your app publish posts. For new uploads, also request vault:write. Use the returned access token and select a linked account the user shared with your app.
Install the TypeScript SDK version 4. Create a client on your server:
Publish text or media
mediaItems for a text-only post. Save post.id. The response contains the created post. Its media is ready when post.isMediaReady is true.
The example’s 789 is an existing media ID from the selected creator’s Vault. Replace it with your own ID. Use Vault IDs or finalized upload references for attachments. Follow Upload media for new files.
Publish paid content
Pass this object asbody to client.access.posts.create():
Schedule publication
AddscheduledDate with an ISO timestamp and timezone, such as 2027-01-10T18:00:00.000Z. You can also use milliseconds since January 1, 1970, UTC. Omit the field to publish immediately. Read the schedule through /v3/access/queue/posts after creation.
Create a poll
type and dueDays to positive whole numbers. The API reference does not list every poll type. Use a type that works with your OnlyFans account.
Set expiration or fundraising
AddexpireAfter to expire a post after 1 to 30 days.
For fundraising, use fundRaisingTargetAmount of at least 10 and at most four fundRaisingTipsPresets:
Set formatting and participants
isMarkdown defaults to true. Set it to false to send your text or HTML unchanged. See Text formatting.
releaseForms contains users, partners, and guests arrays of numeric IDs. userTags also accepts numeric user IDs. See the API reference for the fields you can send.
Edit or delete the post
Read the post and checkcanEdit or canDelete:
client.access.posts.update({ postId: 987654, body }) with the full post you want to keep. Updates accept the same fields as creation. Fields you leave out can return to their defaults. To keep attachments, use numeric Vault IDs.
Call client.access.posts.delete({ postId: 987654 }) to delete the post. Check the response before removing the post from your app. If you do not know whether a create request succeeded, follow V3 error recovery before trying again. A retry can create a second post.