Agent Guardrails
Automated clients (MCP agents, n8n flows, SDK scripts) retry, loop and run unattended. The PostBoost API protects your accounts from the two mistakes that get social accounts flagged: duplicate posts and runaway volume. These checks apply to API requests and to the post tools of the PostBoost MCP server and the Claude connector; posts made in the dashboard are not affected.
Recommended loop
- Check the accounts —
GET /{workspaceUuid}/account-health - Dry run —
POST /{workspaceUuid}/posts/validatewith the exact create-post body - Create —
POST /{workspaceUuid}/postswith anIdempotency-Key
Account health
GET /{workspaceUuid}/account-health returns, per account, whether it is authorized, whether it holds an access token (has_token), healthy (both), and its daily cap (limit, used_today). An account that is not healthy must be reconnected in the dashboard before it can publish.
Dry run
POST /{workspaceUuid}/posts/validate takes the create-post body and creates nothing. It always answers 200:
{
"valid": false,
"errors": { "versions.0.content.0.body": ["The text may not be longer than 280 characters for X."] },
"issues": [],
"warnings": [],
"publish_at": "2026-10-12T10:00:00+00:00",
"accounts": [ { "id": 12, "provider": "twitter", "healthy": true, "daily_cap": { "limit": 50, "used_today": 3 } } ]
}
errors— the validation errors create-post would return as422. Network requirements (text length, media count and type, links) are checked for every account, even for drafts.issues— guardrail problems (below) create-post would refuse.warnings— the non-blocking warnings create-post would return, with the same codes and messages:threads_too_long,threads_too_many_links,youtube_description_too_long,youtube_forbidden_characters,instagram_image_ratio,meta_first_comment_unavailable,linkedin_first_comment_unavailableandai_media_without_disclosure(see the PostWarning schema).validstaystrue, but the network will reject or ignore these at publish: fix them before scheduling.
Viewers can call it too.
Idempotent retries
Send Idempotency-Key: <unique string> (a UUID works) with any POST. Repeating the request with the same key within 24 hours returns the stored response with the header Idempotent-Replayed: true and creates nothing.
| Situation | Response |
|---|---|
| Same key, same body | Stored response, Idempotent-Replayed: true |
| Same key, different body | 422 |
| Same key while the first request is still running | 409, Retry-After: 1 |
| Key longer than 255 characters or not printable ASCII | 400 |
First attempt returned 5xx or 429 | Not stored — retry with the same key |
Keys are scoped to your user, the workspace, the method and the path.
Duplicate guard
Create and update requests are refused with 409 when the content for an account matches a post created for that account in the last 24 hours (case, spacing and media order are ignored):
{
"message": "A post with the same content for this account was created in the last 24 hours. Send \"allow_duplicate\": true to post it anyway.",
"code": "duplicate_post",
"account_id": 12,
"existing_post_uuid": "9f2c1b7e-4a51-4d0e-9a51-6b7d9f0e2c11"
}
To post it anyway, add "allow_duplicate": true to the body or send the header X-Allow-Duplicate: true.
Daily caps
Scheduling (schedule, schedule_now or queue on create/update, or the schedule and add-to-queue endpoints for a saved post) is refused with 429 when an account already has its daily number of posts on that UTC day (scheduled, awaiting approval or published). Drafts are never capped.
For the queue (queue: true or addPostToQueue), "that day" is the day of the queue slot the post will get: the earliest next free slot of its accounts' posting schedules. A post queued after today's last slot lands tomorrow, so it is checked against tomorrow's cap.
{ "message": "…", "code": "account_daily_cap_reached", "account_id": 12, "limit": 50, "used": 50 }
| Network | Posts per UTC day |
|---|---|
| X | 50 |
| 25 | |
| Facebook Page | 50 |
| Threads | 50 |
| LinkedIn (profile) | 20 |
| LinkedIn Page | 50 |
| TikTok | 15 |
| YouTube | 10 |
| 50 | |
| Bluesky, Mastodon | 100 |
| Google Business Profile | 10 |
| Other networks | 50 |
Free workspaces get half these caps (rounded down, at least 1).
These are not rate limits: rate limits cap requests per minute, caps cap posts per account per day.
The workspace's monthly X allowance is tracked but not enforced yet. Once it is, scheduling to X past it will be refused with 429 and code: x_monthly_cap_reached.
Accounts that cannot publish
Scheduling to an account that must be reconnected returns 422 with code: account_unauthorized (or account_token_missing) right away, instead of failing later at publish time. Drafts for the account are still allowed.
GET /{workspaceUuid}/account-health also predicts when each connection expires; see Connection health.
Warnings
A successful createPost (201) or updatePost (200) can carry a warnings array: the post was saved, but something will not behave as you may expect. Log the code. New codes are added as new checks ship (code is an x-extensible-enum), so handle a code you do not know like any other warning. Warnings never change the status code, refusals (409, 422, 429) never carry them, and an Idempotency-Key replay returns them again. When there is nothing to report, the key is absent.
"warnings": [
{ "code": "meta_first_comment_unavailable", "account_id": 12, "message": "Facebook Page and Instagram first comments are temporarily unavailable ..." }
]
code | account_id | Meaning |
|---|---|---|
ai_media_without_disclosure | null | The post uses media from the AI image endpoints, but you sent ai_generated: false, so no network AI label is applied. Send ai_generated: true or remove the media. |
meta_first_comment_unavailable | the Facebook Page or Instagram account | A first comment (a version's second content item) cannot be published on Facebook Pages and Instagram while Meta reviews our access. The post itself publishes; add the comment by hand for now. |
linkedin_first_comment_unavailable | the LinkedIn profile or Page account | LinkedIn first comments are not enabled on this server, so only the first content item is posted and the second one (the first comment) is dropped. The post itself publishes; add the comment by hand. |
Activity log
GET /{workspaceUuid}/activity lists every write request (POST, PUT, DELETE) made through the API in the workspace, newest first, with its outcome: created, updated, deleted, validated, replayed, blocked_duplicate, blocked_cap, blocked_unauthorized, validation_failed, error or ok. Filter with outcome, client and since. Entries are kept for 90 days.
Label your requests with an X-PostBoost-Client header (for example my-agent/1.2); otherwise the User-Agent is recorded.