Retry failed accounts
POST
/api/posts/:postId/retryPublish again to the accounts that failed, or only to the given accountIds (from platformPosts[].accountId).
- Ampost already retries retryable failures (rate limits, timeouts, platform errors) by itself, up to 5 attempts with backoff; an account waiting for that shows
pendingwithnextAttemptAt. - Call this for an account that is
failed, after fixing the cause. - It starts
attemptsagain from 0. - A published account whose first comment failed (
platformPosts[].firstComment.statusfailed) posts only the comment again, without publishing the post twice or counting it again. - An account whose thread stopped at a failed item continues the thread from that item, without publishing the post or the earlier items again.
- To publish a draft or scheduled post, use posts_publish. 404 POST_NOT_FOUND for an id that is not yours; 409 INVALID_STATUS_TRANSITION unless the post is
partialorfailed(or only first comments failed).
- Key scope
- posts:write
- MCP tool
- posts_retry
- Retries
- Safe with an Idempotency-Key
Headers
AuthorizationstringrequiredBearer <API key>. Create a key in the dashboard under API keys.Idempotency-KeystringA unique value per logical request, so a retry never creates a second post. See Idempotency.
Path parameters
postIdstringrequiredPost id (UUID):
idfrom posts_list or posts_create
Body
accountIdsstring[]Accounts to retry (
platformPosts[].accountId). A published account whosefirstComment.statusis failed retries only the comment; an account whose thread stopped at a failed item continues the thread from that item (the post and earlier items are not published again); other accounts publish again. Default: every failed account and every failed first comment.
Errors return { error: { code, message } }; every code is in Error codes.