sangtao.ai
API key

Publishing

Retry a post

Publish a post again to the networks where it failed.

POSThttps://api.sangtao.ai/v2/publishing/posts/{id}/retry

Authorization

  • X-Api-Keystring · headerrequired

    Your API key, from the API keys page of your account.

Path parameters

  • idstringrequired

    The ID in the path.

Publishes again to the networks whose status is Failed; the ones already published are left alone. No body. A retry is not charged as a new post.

Response

  • statusstringrequired

    The post's status after the retry started

    Available options:PendingProcessingDraftUploadingScheduledPublishingPublishedPartiallyPublishedFailedCancelled

  • retriedPlatformsstring[]required

    The networks being retried — those that were Failed; they are now Retrying

The three 400s carry their reason in error, with no errorCode.

Errors

StatuserrorCodeWhen
400—error "no_failed_platforms": no network of the post has failed
400—error "missing_external_post": the post never got as far as publishing — publish it again instead
400—error "retry_failed": the retry could not be started — try again later
404POST_NOT_FOUNDNo post of yours with this id
POST/publishing/posts/{id}/retry
curl -X POST "https://api.sangtao.ai/v2/publishing/posts/7c9e6679-7425-40de-944b-e07fc1f90ae7/retry" \
  -H "X-Api-Key: YOUR_API_KEY"
{
  "success": true,
  "data": {
    "status": "Publishing",
    "retriedPlatforms": [
      "YouTube"
    ]
  }
}