curl --request POST \
--url https://api.ofauth.com/v2/access/posts \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'x-connection-id: <api-key>' \
--data '
{
"text": "",
"replyToMessageId": "<string>",
"mediaItems": [],
"isLockedText": false,
"price": 0,
"previewMediaCount": 0,
"releaseForms": {
"users": [],
"partners": [],
"guests": []
},
"userTags": [],
"isMarkdown": true,
"scheduledDate": "<string>",
"fundRaisingTargetAmount": 11,
"fundRaisingTipsPresets": [
123
],
"expireAfter": 15.5
}
'import requests
url = "https://api.ofauth.com/v2/access/posts"
payload = {
"text": "",
"replyToMessageId": "<string>",
"mediaItems": [],
"isLockedText": False,
"price": 0,
"previewMediaCount": 0,
"releaseForms": {
"users": [],
"partners": [],
"guests": []
},
"userTags": [],
"isMarkdown": True,
"scheduledDate": "<string>",
"fundRaisingTargetAmount": 11,
"fundRaisingTipsPresets": [123],
"expireAfter": 15.5
}
headers = {
"apiKey": "<api-key>",
"x-connection-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
apiKey: '<api-key>',
'x-connection-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: '',
replyToMessageId: '<string>',
mediaItems: [],
isLockedText: false,
price: 0,
previewMediaCount: 0,
releaseForms: {users: [], partners: [], guests: []},
userTags: [],
isMarkdown: true,
scheduledDate: '<string>',
fundRaisingTargetAmount: 11,
fundRaisingTipsPresets: [123],
expireAfter: 15.5
})
};
fetch('https://api.ofauth.com/v2/access/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ofauth.com/v2/access/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '',
'replyToMessageId' => '<string>',
'mediaItems' => [
],
'isLockedText' => false,
'price' => 0,
'previewMediaCount' => 0,
'releaseForms' => [
'users' => [
],
'partners' => [
],
'guests' => [
]
],
'userTags' => [
],
'isMarkdown' => true,
'scheduledDate' => '<string>',
'fundRaisingTargetAmount' => 11,
'fundRaisingTipsPresets' => [
123
],
'expireAfter' => 15.5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <api-key>",
"x-connection-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ofauth.com/v2/access/posts"
payload := strings.NewReader("{\n \"text\": \"\",\n \"replyToMessageId\": \"<string>\",\n \"mediaItems\": [],\n \"isLockedText\": false,\n \"price\": 0,\n \"previewMediaCount\": 0,\n \"releaseForms\": {\n \"users\": [],\n \"partners\": [],\n \"guests\": []\n },\n \"userTags\": [],\n \"isMarkdown\": true,\n \"scheduledDate\": \"<string>\",\n \"fundRaisingTargetAmount\": 11,\n \"fundRaisingTipsPresets\": [\n 123\n ],\n \"expireAfter\": 15.5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("x-connection-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ofauth.com/v2/access/posts")
.header("apiKey", "<api-key>")
.header("x-connection-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"\",\n \"replyToMessageId\": \"<string>\",\n \"mediaItems\": [],\n \"isLockedText\": false,\n \"price\": 0,\n \"previewMediaCount\": 0,\n \"releaseForms\": {\n \"users\": [],\n \"partners\": [],\n \"guests\": []\n },\n \"userTags\": [],\n \"isMarkdown\": true,\n \"scheduledDate\": \"<string>\",\n \"fundRaisingTargetAmount\": 11,\n \"fundRaisingTipsPresets\": [\n 123\n ],\n \"expireAfter\": 15.5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ofauth.com/v2/access/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["x-connection-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"\",\n \"replyToMessageId\": \"<string>\",\n \"mediaItems\": [],\n \"isLockedText\": false,\n \"price\": 0,\n \"previewMediaCount\": 0,\n \"releaseForms\": {\n \"users\": [],\n \"partners\": [],\n \"guests\": []\n },\n \"userTags\": [],\n \"isMarkdown\": true,\n \"scheduledDate\": \"<string>\",\n \"fundRaisingTargetAmount\": 11,\n \"fundRaisingTipsPresets\": [\n 123\n ],\n \"expireAfter\": 15.5\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"canDelete": true,
"canEdit": true,
"mediaCount": 123,
"media": [
{
"id": 123,
"convertedToVideo": true,
"canView": true,
"hasError": true,
"createdAt": "<string>",
"isReady": true,
"releaseForms": [
{
"id": 123,
"name": "<string>",
"partnerSource": "<string>",
"type": "<string>",
"user": {
"view": "<string>",
"id": 123,
"name": "<string>",
"username": "<string>",
"isVerified": true,
"avatar": "<string>",
"avatarThumbs": {
"c50": "<string>",
"c144": "<string>"
},
"ivStatus": "<string>",
"isFromGuest": true
}
}
],
"duration": 123,
"hasCustomPreview": true,
"videoSources": {
"240": "<string>",
"720": "<string>"
},
"files": {
"full": {
"url": "<string>",
"sources": [
{
"url": "<string>",
"width": 123,
"height": 123,
"type": "<string>"
}
],
"width": 123,
"height": 123,
"size": 123
},
"thumb": {
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
},
"preview": {
"url": "<string>",
"options": [
{
"url": "<string>",
"width": 123,
"height": 123,
"type": "<string>"
}
],
"width": 123,
"height": 123,
"size": 123
},
"squarePreview": {
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
}
}
}
],
"canViewMedia": true,
"responseType": "<string>",
"postedAt": "<string>",
"postedAtPrecise": "<string>",
"isMarkdownDisabled": true,
"isOpened": true,
"canToggleFavorite": true,
"tipsAmount": "<string>",
"text": "<string>",
"isFavorite": true,
"canComment": true,
"favoritesCount": 123,
"isMediaReady": true,
"rawText": "<string>",
"author": {
"id": 123,
"_view": "<string>"
}
}Create post
Create post
Permission Required: posts:write
curl --request POST \
--url https://api.ofauth.com/v2/access/posts \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'x-connection-id: <api-key>' \
--data '
{
"text": "",
"replyToMessageId": "<string>",
"mediaItems": [],
"isLockedText": false,
"price": 0,
"previewMediaCount": 0,
"releaseForms": {
"users": [],
"partners": [],
"guests": []
},
"userTags": [],
"isMarkdown": true,
"scheduledDate": "<string>",
"fundRaisingTargetAmount": 11,
"fundRaisingTipsPresets": [
123
],
"expireAfter": 15.5
}
'import requests
url = "https://api.ofauth.com/v2/access/posts"
payload = {
"text": "",
"replyToMessageId": "<string>",
"mediaItems": [],
"isLockedText": False,
"price": 0,
"previewMediaCount": 0,
"releaseForms": {
"users": [],
"partners": [],
"guests": []
},
"userTags": [],
"isMarkdown": True,
"scheduledDate": "<string>",
"fundRaisingTargetAmount": 11,
"fundRaisingTipsPresets": [123],
"expireAfter": 15.5
}
headers = {
"apiKey": "<api-key>",
"x-connection-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
apiKey: '<api-key>',
'x-connection-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: '',
replyToMessageId: '<string>',
mediaItems: [],
isLockedText: false,
price: 0,
previewMediaCount: 0,
releaseForms: {users: [], partners: [], guests: []},
userTags: [],
isMarkdown: true,
scheduledDate: '<string>',
fundRaisingTargetAmount: 11,
fundRaisingTipsPresets: [123],
expireAfter: 15.5
})
};
fetch('https://api.ofauth.com/v2/access/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ofauth.com/v2/access/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '',
'replyToMessageId' => '<string>',
'mediaItems' => [
],
'isLockedText' => false,
'price' => 0,
'previewMediaCount' => 0,
'releaseForms' => [
'users' => [
],
'partners' => [
],
'guests' => [
]
],
'userTags' => [
],
'isMarkdown' => true,
'scheduledDate' => '<string>',
'fundRaisingTargetAmount' => 11,
'fundRaisingTipsPresets' => [
123
],
'expireAfter' => 15.5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <api-key>",
"x-connection-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ofauth.com/v2/access/posts"
payload := strings.NewReader("{\n \"text\": \"\",\n \"replyToMessageId\": \"<string>\",\n \"mediaItems\": [],\n \"isLockedText\": false,\n \"price\": 0,\n \"previewMediaCount\": 0,\n \"releaseForms\": {\n \"users\": [],\n \"partners\": [],\n \"guests\": []\n },\n \"userTags\": [],\n \"isMarkdown\": true,\n \"scheduledDate\": \"<string>\",\n \"fundRaisingTargetAmount\": 11,\n \"fundRaisingTipsPresets\": [\n 123\n ],\n \"expireAfter\": 15.5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("x-connection-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ofauth.com/v2/access/posts")
.header("apiKey", "<api-key>")
.header("x-connection-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"\",\n \"replyToMessageId\": \"<string>\",\n \"mediaItems\": [],\n \"isLockedText\": false,\n \"price\": 0,\n \"previewMediaCount\": 0,\n \"releaseForms\": {\n \"users\": [],\n \"partners\": [],\n \"guests\": []\n },\n \"userTags\": [],\n \"isMarkdown\": true,\n \"scheduledDate\": \"<string>\",\n \"fundRaisingTargetAmount\": 11,\n \"fundRaisingTipsPresets\": [\n 123\n ],\n \"expireAfter\": 15.5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ofauth.com/v2/access/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["x-connection-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"\",\n \"replyToMessageId\": \"<string>\",\n \"mediaItems\": [],\n \"isLockedText\": false,\n \"price\": 0,\n \"previewMediaCount\": 0,\n \"releaseForms\": {\n \"users\": [],\n \"partners\": [],\n \"guests\": []\n },\n \"userTags\": [],\n \"isMarkdown\": true,\n \"scheduledDate\": \"<string>\",\n \"fundRaisingTargetAmount\": 11,\n \"fundRaisingTipsPresets\": [\n 123\n ],\n \"expireAfter\": 15.5\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"canDelete": true,
"canEdit": true,
"mediaCount": 123,
"media": [
{
"id": 123,
"convertedToVideo": true,
"canView": true,
"hasError": true,
"createdAt": "<string>",
"isReady": true,
"releaseForms": [
{
"id": 123,
"name": "<string>",
"partnerSource": "<string>",
"type": "<string>",
"user": {
"view": "<string>",
"id": 123,
"name": "<string>",
"username": "<string>",
"isVerified": true,
"avatar": "<string>",
"avatarThumbs": {
"c50": "<string>",
"c144": "<string>"
},
"ivStatus": "<string>",
"isFromGuest": true
}
}
],
"duration": 123,
"hasCustomPreview": true,
"videoSources": {
"240": "<string>",
"720": "<string>"
},
"files": {
"full": {
"url": "<string>",
"sources": [
{
"url": "<string>",
"width": 123,
"height": 123,
"type": "<string>"
}
],
"width": 123,
"height": 123,
"size": 123
},
"thumb": {
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
},
"preview": {
"url": "<string>",
"options": [
{
"url": "<string>",
"width": 123,
"height": 123,
"type": "<string>"
}
],
"width": 123,
"height": 123,
"size": 123
},
"squarePreview": {
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
}
}
}
],
"canViewMedia": true,
"responseType": "<string>",
"postedAt": "<string>",
"postedAtPrecise": "<string>",
"isMarkdownDisabled": true,
"isOpened": true,
"canToggleFavorite": true,
"tipsAmount": "<string>",
"text": "<string>",
"isFavorite": true,
"canComment": true,
"favoritesCount": 123,
"isMediaReady": true,
"rawText": "<string>",
"author": {
"id": 123,
"_view": "<string>"
}
}Authorizations
Requires a connection via the x-connection-id header.
Body
Text content. Supports markdown by default. See Text Formatting Guide.
10000Reply to an existing chat message
1Media references to attach. Accepts vault media IDs, upload references (mediaUploadId), or http(s) URLs. See mediaItems reference.
OnlyFans media ID
x > 0Whether text is locked behind paywall (defaults to false).
Price to unlock message content (0 for free)
0 <= x <= 200How many items in mediaItems should be previews. Uses the first N items from left to right.
x >= 0Release form participants
Show child attributes
Show child attributes
Users to tag
OnlyFans user ID
x > 0Whether to parse text as markdown (default: true). See Text Formatting Guide.
When to publish the post (omit for immediate). Use ISO 8601 with timezone, e.g. 2026-05-25T12:00:00.000Z, or epoch milliseconds.
Target amount for fund raising post
x >= 10Preset tip amounts for fund raising
4Days until post expires (1-30)
1 <= x <= 30Poll attached to the post
Show child attributes
Show child attributes
Response
Successful response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?