Posts
Create a post
https://postifuse.com/v1/postsOne post to any mix of networks, for one profile. Preflight runs on every create: an account that would be refused is held with the rule and the fix, the others go ahead.
- No
publishand nopublish_at: a draft "publish": "now": posts at once.publish_at: schedules it"dry_run": true: returns what would happen to each account and saves nothing- Accounts from two profiles are refused with
profile_mismatch: one post never crosses clients
curl --request POST \
--url 'https://postifuse.com/v1/posts' \
--header 'Authorization: Bearer pf_live_…' \
--header 'Idempotency-Key: create-post-1' \
--header 'Content-Type: application/json' \
--data '{
"accounts": [
"acc_ig",
"acc_tt",
"acc_yt",
"acc_x"
],
"text": "Three pacing mistakes from my first marathon",
"media": [
"med_42"
],
"publish_at": "2027-01-08T17:00:00Z",
"overrides": {
"youtube": {
"title": "3 marathon pacing mistakes"
},
"x": {
"text": "3 pacing mistakes, one marathon"
}
}
}'
const res = await fetch("https://postifuse.com/v1/posts", {
method: "POST",
headers: {
"Authorization": "Bearer pf_live_…",
"Idempotency-Key": "create-post-1",
"Content-Type": "application/json"
},
body: JSON.stringify({
"accounts": [
"acc_ig",
"acc_tt",
"acc_yt",
"acc_x"
],
"text": "Three pacing mistakes from my first marathon",
"media": [
"med_42"
],
"publish_at": "2027-01-08T17:00:00Z",
"overrides": {
"youtube": {
"title": "3 marathon pacing mistakes"
},
"x": {
"text": "3 pacing mistakes, one marathon"
}
}
}),
});
const data = await res.json();
import requests
res = requests.post(
"https://postifuse.com/v1/posts",
headers={"Authorization": "Bearer pf_live_…", "Idempotency-Key": "create-post-1"},
json={
"accounts": [
"acc_ig",
"acc_tt",
"acc_yt",
"acc_x"
],
"text": "Three pacing mistakes from my first marathon",
"media": [
"med_42"
],
"publish_at": "2027-01-08T17:00:00Z",
"overrides": {
"youtube": {
"title": "3 marathon pacing mistakes"
},
"x": {
"text": "3 pacing mistakes, one marathon"
}
}
},
)
print(res.json())
{
"id": "pst_42",
"status": "scheduled",
"targets": [
{
"account": "acc_ig",
"status": "scheduled"
},
{
"account": "acc_tt",
"status": "scheduled"
},
{
"account": "acc_yt",
"status": "scheduled"
},
{
"account": "acc_x",
"status": "held",
"rule": "x.video.max_duration",
"fix": "Trim to 140 s or less"
}
]
}
{
"error": "profile_mismatch",
"message": "acc_x belongs to prf_studio, the other accounts to prf_martin.",
"fix": "Send one post per profile",
"docs": "https://postifuse.com/docs/profiles/"
}
{
"error": "workspace_not_active",
"message": "The workspace for this key is not active yet.",
"docs": "https://postifuse.com/docs/errors/"
}
Headers
AuthorizationstringrequiredBearer followed by a workspace key, a profile key or an OAuth token. See authentication.
Example Bearer pf_live_…
Idempotency-KeystringrequiredAny unique string. The same key within 24 h returns the same result and posts nothing twice.
Body application/json
accountsarray<string>requiredAccount ids, all in the same profile.
Example ["acc_ig","acc_tt"]
textstringThe text, used on every network unless overridden.
Example Three pacing mistakes from my first marathon
mediaarray<string>Media ids from upload media.
Example ["med_42"]
publishstringnow publishes at once.
One of now
Example now
publish_atstring<date-time>When to publish, ISO 8601 UTC.
Example 2027-01-08T17:00:00Z
overridesobjectPer-network text, YouTube title, or X thread.
Example {"youtube":{"title":"3 marathon pacing mistakes"}}
Show 3 child attributes (per network)
textstringtitlestringthreadbooleandry_runbooleanReturn what would happen to each account and save nothing.
Example true