Webhook
Danh sách endpoint
Các endpoint webhook của bạn.
https://api.sangtao.ai/v2/webhooksXá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.
Response
idstringbắt buộcMã endpoint, whk_…
urlstringbắt buộcNơi nhận sự kiện
eventsstring[]bắt buộcCác loại sự kiện endpoint nhận. ["*"] là tất cả
descriptionstring | nullGhi chú của bạn
enabledbooleanbắt buộcCó đang gửi sự kiện tới endpoint không
statusstringbắt buộcdisabled_failing: tự tắt sau 3 ngày giao hỏng liên tục
Giá trị có thể:
activedisableddisabled_failingcreatedAtstringbắt buộcLúc tạo (ISO 8601, UTC). Endpoint chỉ nhận sự kiện xảy ra từ lúc này
lastDeliveryAtstring | nullLần gần nhất thử giao tới endpoint
lastSuccessAtstring | nullLần gần nhất endpoint trả 2xx
lastFailureAtstring | nullLần gần nhất giao hỏng
Một mảng, cũ nhất trước. Không bao giờ có secret.
/webhookscurl "https://api.sangtao.ai/v2/webhooks" \
-H "X-Api-Key: YOUR_API_KEY"{
"success": true,
"data": [
{
"id": "whk_4nP8rT2xK",
"url": "https://example.com/webhooks/sangtao",
"events": [
"image.completed",
"image.failed"
],
"description": "Production",
"enabled": true,
"status": "active",
"createdAt": "2026-11-10T08:00:00Z",
"lastDeliveryAt": "2026-11-10T09:43:32Z",
"lastSuccessAt": "2026-11-10T09:43:32Z",
"lastFailureAt": null
}
]
}/webhookscurl "https://api.sangtao.ai/v2/webhooks" \
-H "X-Api-Key: YOUR_API_KEY"{
"success": true,
"data": [
{
"id": "whk_4nP8rT2xK",
"url": "https://example.com/webhooks/sangtao",
"events": [
"image.completed",
"image.failed"
],
"description": "Production",
"enabled": true,
"status": "active",
"createdAt": "2026-11-10T08:00:00Z",
"lastDeliveryAt": "2026-11-10T09:43:32Z",
"lastSuccessAt": "2026-11-10T09:43:32Z",
"lastFailureAt": null
}
]
}