preflight_post
Checks copy against each destination network’s character limit, flags profiles that are not connected or need reconnecting, warns when a network requires media, checks a carousel against each target’s item ceiling, and prices the post against the workspace balance. Publishes nothing and costs nothing.
- Access
- read
- Category
- Publishing
- Endpoint
POST/api/tools/preflight_post
On this page
Parameters
contentstringrequired
The copy to check.
targetAccountsarray<object>
Same shape as create_post.
platformsarray<enum>
Same shape as create_post.
mediaUrlstring
Media that would be attached, if any.
mediaUrlsarray<string>
The carousel that would be attached. Returns a mediaSetLimits map and a blocker for any target that takes fewer items, or will not mix video into the set.
workspaceIdstring
Workspace to act on, from list_workspaces. Omit to use the default workspace on the key.
Example request
curl -X POST "https://api.postmcpai.com/api/tools/preflight_post" \
-H "Content-Type: application/json" \
-H "x-api-key: $POSTMCPAI_API_KEY" \
-d '{
"content": "A long announcement that runs past the X limit… https://acme.co/launch",
"platforms": [
"twitter",
"linkedin"
]
}'Response
ok is false when anything in blockers[] would stop the post. warnings[] is advisory. On a carousel, mediaCount and mediaSetLimits say what each target will make of it.
{
"ok": false,
"characterCount": 316,
"resolvedTargets": [
{
"platform": "twitter",
"profileId": "tw_1293847",
"username": "@alexj_dev"
},
{
"platform": "linkedin",
"profileId": "lin_7741903",
"username": "postmcp-ai"
}
],
"unknownTargets": [],
"limits": {
"twitter": 280,
"linkedin": 3000
},
"credits": {
"cost": 56,
"balance": 450,
"remainingAfter": 394
},
"blockers": [
"Copy is 36 character(s) over twitter’s 280-character limit."
],
"warnings": [
"Copy contains a link, which adds a one-off 50-credit surcharge."
]
}