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, and prices the post against the workspace balance. Publishes nothing and costs nothing.
On this page
- Category
- Publishing
- REST
- POST/api/tools/preflight_post
Parameters
contentstringrequired
The copy to check.
targetAccountsarray<object>optional
Same shape as create_post.
platformsarray<enum>optional
Same shape as create_post.
mediaUrlstringoptional
Media that would be attached, if any.
workspaceIdstringoptional
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.
{
"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."
]
}