← جميع المستندات

webhook CMS

أخبر geodeck عند النشر/إلغاء النشر لإطلاق إعادة توليد llms.txt وping تالٍ.

نقطة النهاية

POST https://geodeck.icu/api/webhook/cms
X-geodeck-Signature: sha256=<hex hmac of raw body>
Content-Type: application/json

الحمولة

{
  "domain": "example.com",
  "url":    "https://example.com/blog/post-slug",
  "event":  "publish"
}

يجب أن يكون event أحد publish أو update أو unpublish.

Batch submission

{
  "domain": "example.com",
  "urls": [
    "https://example.com/blog/post-one",
    "https://example.com/blog/post-two"
  ],
  "event": "update"
}

Batch mode accepts up to 500 same-host URLs per signed request. In batch mode, omit title, summary, content, and html.

التوقيع

احسب HMAC-SHA256 لجسم الطلب raw باستخدام مفتاح webhook السري للنطاق. أرسل مُشفَّراً بـhex مع بادئة sha256=.

echo -n "$BODY" | openssl dgst -sha256 -hmac "$SECRET" -hex

الاستجابات

  • 202 Accepted - الحمولة في قائمة الانتظار.
  • 401 Unauthorized - توقيع مفقود/غير صالح.
  • 404 - نطاق غير معروف.
  • 429 - تم الوصول إلى حد معدل الخطة.

إعادة المحاولة

عند استجابة 5xx، أعِد المحاولة بتراجع أسي (1ث، 5ث، 30ث، 5 دقائق). بعد الفشل الثالث، أظهر الخطأ في سجل نظام إدارة المحتوى.

Keep reading the rest of the Geodeck documentation, or jump to the platform pages.

Platform