sangtao.ai
API key

Publishing

Get a post

One post and how it went on each network.

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

Authorization

  • X-Api-Keystring · headerrequired

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

Path parameters

  • idstringrequired

    The ID in the path.

Poll every 10–15 seconds, and stop once status is final: Published, PartiallyPublished, Failed or Cancelled. PartiallyPublished is normal when posting to several networks — read platforms[].error for why one failed, then retry it.

Response

  • idstring (guid)required

    The post's ID

  • teamIdstring (guid)required

    The group it was published from

  • teamNamestringrequired

    That group's name

  • webJobIdstring | null

    The sangtao.ai job posted, when it was published with jobId

  • titlestring | null

    Display title: the YouTube title, else the first platform's caption

  • thumbnailUrlstring | null

    Cover image

  • statusstringrequired

    The post as a whole. Final: Published, PartiallyPublished, Failed, Cancelled

    Available options:PendingProcessingDraftUploadingScheduledPublishingPublishedPartiallyPublishedFailedCancelled

  • statusMessagestring | null

    A short note on the status

  • scheduledAtstring | null

    The scheduled time (UTC), if scheduled

  • createdAtstringrequired

    When the post was created (ISO 8601, UTC)

  • platformsobject[]required

    One per network

    Show child attributes
    • idstringrequired

      This network's entry in the post, pp_…. An opaque string

    • platformstringrequired

      The network

      Available options:TikTokYouTubeInstagramFacebookThreadsTwitter

    • postTypestring | null

      The type you sent; null when the default was used

      Available options:POSTREELSTORYSHORTVIDEOIMAGE

    • statusstringrequired

      This network's status

      Available options:DraftUploadingScheduledPublishingPublishedFailedCancelledRetrying

    • captionstring | null

      Post text sent

    • titlestring | null

      Title sent (YouTube)

    • descriptionstring | null

      Description sent (YouTube)

    • externalUrlstring | null

      Link to the live post, once published

    • errorstring | null

      Why it failed, when Failed

    • publishedAtstring | null

      When it went live (ISO 8601, UTC)

  • webhookobject

    Only when the request had webhookUrl: how its latest delivery went. Never inside the webhook’s own data

    Show child attributes
    • urlstringrequired

      The webhookUrl

    • statusstringrequired

      waiting: not finished yet, nothing sent. pending: failed, will retry

      Available options:waitingpendingsucceededfailed

    • attemptCountnumberrequired

      Attempts so far

    • lastHttpStatusnumber | null

      What the URL answered last

    • lastErrorstring | null

      Why the last attempt failed

    • deliveryIdstring | null

      dlv_… — open it with GET /webhooks/deliveries/{deliveryId}

Errors

StatuserrorCodeWhen
404POST_NOT_FOUNDNo post of yours with this id
GET/publishing/posts/{id}
curl "https://api.sangtao.ai/v2/publishing/posts/7c9e6679-7425-40de-944b-e07fc1f90ae7" \
  -H "X-Api-Key: YOUR_API_KEY"
{
  "success": true,
  "data": {
    "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "teamId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "teamName": "Main channels",
    "webJobId": null,
    "title": "How to make iced coffee at home",
    "thumbnailUrl": "https://cdn.example.com/cover.jpg",
    "status": "PartiallyPublished",
    "statusMessage": null,
    "scheduledAt": null,
    "createdAt": "2026-11-08T02:00:00Z",
    "platforms": [
      {
        "id": "pp_3kT9qPz0B",
        "platform": "TikTok",
        "postType": null,
        "status": "Published",
        "caption": "Iced coffee in 3 steps #coffee",
        "title": null,
        "description": null,
        "externalUrl": "https://www.tiktok.com/@yourchannel/video/1234567890",
        "error": null,
        "publishedAt": "2026-11-08T02:03:00Z"
      },
      {
        "id": "pp_9pW4nKt1H",
        "platform": "YouTube",
        "postType": "SHORT",
        "status": "Failed",
        "caption": null,
        "title": "How to make iced coffee at home",
        "description": "A three-step recipe.",
        "externalUrl": null,
        "error": "The video is too long for Shorts",
        "publishedAt": null
      }
    ],
    "webhook": {
      "url": "https://example.com/webhooks/sangtao",
      "status": "succeeded",
      "attemptCount": 1,
      "lastHttpStatus": 200,
      "lastError": null,
      "deliveryId": "dlv_7Fz2kWq4N"
    }
  }
}