Pages in API reference

Posts

Retry failed accounts

POST/api/posts/:postId/retry

Publish 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 pending with nextAttemptAt.
  • Call this for an account that is failed, after fixing the cause.
  • It starts attempts again from 0.
  • A published account whose first comment failed (platformPosts[].firstComment.status failed) 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 partial or failed (or only first comments failed).
Key scope
posts:write
MCP tool
posts_retry
Retries
Safe with an Idempotency-Key

Headers

  • Authorizationstringrequired

    Bearer <API key>. Create a key in the dashboard under API keys.

  • Idempotency-Keystring

    A unique value per logical request, so a retry never creates a second post. See Idempotency.

Path parameters

  • postIdstringrequired

    Post id (UUID): id from posts_list or posts_create

Body

  • accountIdsstring[]

    Accounts to retry (platformPosts[].accountId). A published account whose firstComment.status is 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.