Webhooks¶
nulis.top mengirim HTTP POST ke URL yang Anda daftarkan di Studio → Integrasi.
Events¶
| Event | Trigger |
|---|---|
article.completed |
Generate artikel selesai |
article.updated |
Konten artikel diedit di studio |
article.seo_updated |
Simpan metadata SEO |
Headers¶
| Header | Nilai |
|---|---|
Content-Type |
application/json |
X-Nulis-Event |
Nama event |
X-Nulis-Delivery-Id |
UUID pengiriman |
X-Nulis-Signature |
sha256=<hmac_hex> |
Body¶
{
"event": "article.completed",
"delivery_id": "uuid",
"data": { /* article_to_publish_payload */ }
}
Verifikasi signature¶
import hmac, hashlib
expected = hmac.new(secret.encode(), request_body, hashlib.sha256).hexdigest()
assert hmac.compare_digest(f"sha256={expected}", request.headers["X-Nulis-Signature"])
Retry¶
Gagal (non-2xx atau timeout): 3 percobaan dengan exponential backoff. Log tersimpan di IntegrationPublishLog.
Test¶
Tombol Test webhook di halaman Integrasi studio, atau POST /api/v1/webhooks/test (session login).