從開發者儀表板註冊與管理你的端點 URL(需登入,無法透過 API Key 建立)。註冊後,每個事件(例如發送成功/失敗、送達結果、點數即將用盡)都會 POST 到你的 URL。每個 payload 皆以 HMAC-SHA256 簽署(X-Webhook-Signature header)。
urlstring用於接收 event 的 HTTPS 端點
eventsstring[]你想接收的 event 清單
請求
# Webhook endpoints are registered + managed in the
# developer dashboard (logged-in). Registration is not
# available to API keys. Registration payload:
{
"url": "https://your-app.com/hooks/sepsms",
"events": ["dr.success", "dr.failed"]
}
回應
// POST sent to your URL. The event name, timestamp and
// signature travel in headers, not the body:
// X-Webhook-Event: dr.success
// X-Webhook-Timestamp: 1737020405
// X-Webhook-Signature: t=1737020405,v1=<hmac-sha256>
{
"smsUuid": "9f8b2c1e-...",
"msisdn": "66812345678",
"txId": "8f3a1c9d...",
"status": "success"
}