hosting

POST /v1/site-events/ingest

Receive a site's report about its own changes (signed webhook).

Tất cả các điểm cuối hosting

Tất cả tài liệu dành cho nhà phát triển

Xác thực

Điểm cuối này là công khai. Nó không yêu cầu thông tin xác thực hay tổ chức nào — đây chính là nội dung mà trang web tiếp thị và các công cụ trả lời bằng AI của chúng tôi đọc.

Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

curl -X POST https://api.zinndigital.com/v1/site-events/ingest \
  -H "Content-Type: application/json" \
  -d '{ "site": <string> }'

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

What a site's Zinn® plugin POSTs when something changed on it — a plugin activated or deactivated, core or a theme updated, a theme switched — plus the PHP version it is running. Machine-to-machine; there is no principal. WordPress is talking, not a person, so there is no session, no API key and no organisation header. Authentication is an HMAC-SHA256 over "<timestamp>\n<body>" in X-Zinn-Cache-Signature (sha256=<hex>), with X-Zinn-Cache-Timestamp carrying the unix seconds — the same scheme the plugin already uses for its cache-purge mirror. The secret is derived, never stored. The engine resolves site to a hosted site by primary domain, derives that site's webhook secret from the platform master key, and compares in constant time. The organisation comes from the resolved site: a valid signature proves the sender holds that site's secret and proves nothing whatsoever about any other tenant. Every refusal is uninformative on purpose. An unknown hostname is a bare 404 and a bad signature a bare 401, because a chattier answer would tell anyone who can guess a hostname which domains this platform hosts. Idempotent. WordPress fires some of these hooks more than once per change and the POST is fire-and-forget, so a duplicate delivery is accepted with stored: 0 rather than refused — replay safety lives in the database.

Tham số

TênLoạiBắt buộcNội dung này là gì
X-Zinn-Cache-Timestamp (header)stringUnix seconds. Signed as part of the material, which is what makes the replay window meaningful — a signature over the body alone could be replayed for ever with a fresh header.
X-Zinn-Cache-Signature (header)stringsha256=<hex>.

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
sitestringThe site's own home_url(). An untrusted claim — it selects which site's derived secret the signature is checked against, and nothing more. The organisation is taken from the…
php_versionstringKhôngThe PHP version the site is running. The engine raises a php_version_changed event when it differs from the last one reported — a change is detectable by comparison rather…
eventsobject[]KhôngA batch. WordPress bulk-updating 40 plugins fires one upgrader_process_complete describing all of them, so a batch is the normal case, not the edge case. deploy is rejected…

Phản hồi

TênLoạiBắt buộcNội dung này là gì
acceptedboolean
storedintegerHow many rows were new. A duplicate delivery is accepted with 0 rather than refused: WordPress fires some of these hooks more than once per change and the POST is…

Các lỗi điểm cuối này có thể trả về

401 · 404 · 422 · 503