Update Post
Update a posted, queued, or "saved for later" post.
You can retrieve your token by visiting the OnlyFansAPI Console and clicking API Keys -> Create API Key.
In: header
Path Parameters
The Account ID
The ID of the post
The post text content
Array of OF label IDs. Refer to our /posts/labels
endpoint.
Array of OFAPI ofapi_media_
IDs, or OF media IDs
Array OnlyFans creator user IDs to tag in your post
Number of days after which the post will expire. Can be 1, 3, 7 or 30 days. Keep empty for no expiration.
Schedule your post in the future (UTC timezone).
Add your post to the "Saved for later" queue.
Add a fundraising target to your post. If present, value must be at least 10.
Specify which tip amounts will be listed under the fundraising card. Required with fundRaisingTargetAmount
, and you must provide at least 1 option. Array items cannot be higher than the fundRaisingTargetAmount
.
Include a poll or quiz within your post.
"poll" | "quiz"
The due date (in days) of your poll/quiz. Can be 1, 3, 7 or 30 days. Can only be filled with votingType
.
The options of your poll/quiz. Required with votingType
.
The array key of your quiz' correct answer. Required when votingType
is "quiz". Keep in mind that arrays start at 0
Response Body
curl -X PUT "https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/posts/1234567890" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello!"
}'
const body = JSON.stringify({
"text": "Hello!"
})
fetch("https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/posts/1234567890", {
body
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/posts/1234567890"
body := strings.NewReader(`{
"text": "Hello!"
}`)
req, _ := http.NewRequest("PUT", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/posts/1234567890"
body = {
"text": "Hello!"
}
response = requests.request("PUT", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;
var body = BodyPublishers.ofString("""{
"text": "Hello!"
}""");
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/posts/1234567890"))
.header("Content-Type", "application/json")
.PUT(body)
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;
var body = new StringContent("""
{
"text": "Hello!"
}
""", Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.PutAsync("https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/posts/1234567890", body);
var responseBody = await response.Content.ReadAsStringAsync();
""