Đăng bài
Lấy một bài đăng
Một bài đăng và kết quả trên từng nền tảng.
https://api.sangtao.ai/v2/publishing/posts/{id}Xác thực
X-Api-Keystring · headerbắt buộcAPI key của bạn, tạo ở trang API key trong tài khoản.
Tham số đường dẫn
idstringbắt buộcID trong đường dẫn.
Response
idstring (guid)bắt buộcID bài đăng
teamIdstring (guid)bắt buộcNhóm đã dùng để đăng
teamNamestringbắt buộcTên nhóm đó
webJobIdstring | nullJob sangtao.ai đã đăng, khi đăng bằng jobId
titlestring | nullTiêu đề hiển thị: tiêu đề YouTube, không có thì caption của nền tảng đầu tiên
thumbnailUrlstring | nullẢnh bìa
statusstringbắt buộcTrạng thái chung của bài. Trạng thái cuối: Published, PartiallyPublished, Failed, Cancelled
Giá trị có thể:
PendingProcessingDraftUploadingScheduledPublishingPublishedPartiallyPublishedFailedCancelledstatusMessagestring | nullGhi chú ngắn về trạng thái
scheduledAtstring | nullThời điểm hẹn đăng (UTC), nếu có
createdAtstringbắt buộcThời điểm tạo bài (ISO 8601, UTC)
platformsobject[]bắt buộcMỗi nền tảng một phần tử
Hiện thuộc tính conẨn thuộc tính con
idstringbắt buộcMã mục của nền tảng này trong bài, pp_…. Chuỗi mờ, đừng so sánh hay tính toán
platformstringbắt buộcNền tảng
Giá trị có thể:
TikTokYouTubeInstagramFacebookThreadsTwitterpostTypestring | nullLoại bài bạn gửi; null khi dùng loại mặc định
Giá trị có thể:
POSTREELSTORYSHORTVIDEOIMAGEstatusstringbắt buộcTrạng thái trên nền tảng này
Giá trị có thể:
DraftUploadingScheduledPublishingPublishedFailedCancelledRetryingcaptionstring | nullNội dung bài đã gửi
titlestring | nullTiêu đề đã gửi (YouTube)
descriptionstring | nullMô tả đã gửi (YouTube)
externalUrlstring | nullLink tới bài trên nền tảng, khi đã đăng
errorstring | nullLý do thất bại, khi Failed
publishedAtstring | nullThời điểm bài lên (ISO 8601, UTC)
webhookobjectChỉ có khi request gửi webhookUrl: kết quả lần giao gần nhất. Không nằm trong data của webhook
Hiện thuộc tính conẨn thuộc tính con
urlstringbắt buộcwebhookUrl đã gửi
statusstringbắt buộcwaiting: chưa xong, chưa gửi. pending: hỏng, sẽ thử lại
Giá trị có thể:
waitingpendingsucceededfailedattemptCountnumberbắt buộcSố lần đã thử
lastHttpStatusnumber | nullMã URL trả lần gần nhất
lastErrorstring | nullLý do lần thử gần nhất hỏng
deliveryIdstring | nulldlv_… — xem bằng GET /webhooks/deliveries/{deliveryId}
Mã lỗi
| Mã | errorCode | Khi nào |
|---|---|---|
| 404 | POST_NOT_FOUND | Không có bài nào của bạn với id này |
/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"
}
}
}/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"
}
}
}