Receiving webhooks
When a merge finds changes that match one of your subscriptions, Model Atlas POSTs them to your endpoint, signed with the endpoint’s secret. This page covers what arrives, how to check it really came from us, and how to answer.
What arrives
Section titled “What arrives”An HTTPS POST to your endpoint’s URL, with these headers:
| Header | Value |
|---|---|
Content-Type |
application/json |
User-Agent |
ModelAtlas-Webhooks/1 |
Model-Atlas-Delivery |
The delivery’s ID (a ULID): the same as the body’s id, and the same on every retry. Not signed: see Duplicates. |
Model-Atlas-Signature |
t=<unix seconds>,v1=<hex>, with a second v1= during a secret rotation |
The body is one model’s changes from one merge: id (the delivery’s ID), type (events), created_at, model (slug, name), summary (counts by type and materiality, for a notification’s title), part and parts, and events, oldest first. Each event is the same JSON that GET /v1/events returns. New fields can appear at any time, so ignore the ones you don’t know.
{ "created_at": "2026-12-01T06:00:40Z", "events": [ { "correction": false, "correction_reason": null, "data": { "detail": { "retires_on_kind": "exact" }, "effective_on": "2027-05-15", "field": "retires_on", "new": "2027-05-15", "old": "2027-04-08", "region": null }, "detected_at": "2026-12-01T06:00:12Z", "entity": { "slug": "bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0", "type": "offering" }, "id": "01KB5Z6T8QY0M7J3V2C9W4D1EN", "materiality": "high", "provenance": { "source": "bedrock-lifecycle-page", "source_run_id": "3f1c2b9e-8d47-4a6e-9b1f-0c2d5e7a8b10" }, "type": "lifecycle.retirement_date_changed", "version": 1 } ], "id": "01KB5Z7A2M4N6P8R0S2T4V6W8X", "model": { "name": "Claude Sonnet 4.5", "slug": "claude-sonnet-4-5" }, "part": 1, "parts": 1, "summary": "1 lifecycle.retirement_date_changed (high)", "type": "events"}Verify the signature
Section titled “Verify the signature”Check every delivery before you act on it:
- Read the raw request body, as bytes, before any JSON parsing. The signature covers those exact bytes: parsing and re-serializing changes them (spacing, key order, escaping), and the check fails.
- Split
Model-Atlas-Signatureon,. Each part iskey=value: onet, and one or morev1. Ignore keys you don’t know. - Reject the delivery if
tis more than 5 minutes from your clock, either way. This stops a captured delivery from being replayed later. Keep your server’s clock in sync (NTP). - Compute HMAC-SHA256 over
<t>.<raw body>: thetvalue exactly as received, a., then the body bytes. The key is the whole secret string,whsec_included, as UTF-8 bytes. Don’t base64-decode it. - Hex-encode the result and compare it with each
v1value in constant time (crypto.timingSafeEqual,hmac.compare_digest,hmac.Equal). Accept the delivery if any one matches.
If the check fails, answer 400 and don’t process the body.
Code samples
Section titled “Code samples”Complete receivers, standard library only. Each verifies the signature, checks that Model-Atlas-Delivery matches the body’s id, answers 204 at once, then processes the delivery off the request path, skipping any delivery ID it has already processed. They print what they receive: replace that with your own handling. They’re tested against the test vector below on every build.
They listen on plain HTTP: put them behind your HTTPS load balancer or reverse proxy, since we only deliver to https URLs.
Node.js 18 or later. verify-signature.mjs has the check on its own, for use in any framework: pass it the raw body as a Buffer (in Express, express.raw({ type: 'application/json' })).
// verify-signature.mjs: checks a Model Atlas webhook signature. Node.js 18+, no dependencies.import { createHmac, timingSafeEqual } from 'node:crypto'
const TOLERANCE_SECONDS = 5 * 60
// verifySignature checks a Model-Atlas-Signature header ("t=<unix>,v1=<hex>[,v1=<hex>]")// against the raw body bytes (a Buffer, exactly as received). It returns null when a v1// signature matches and t is within 5 minutes of now, or the reason it doesn't.export function verifySignature(header, rawBody, secret, now = Date.now() / 1000) { let timestamp const signatures = [] for (const part of (header ?? '').split(',')) { const [key, ...rest] = part.trim().split('=') const value = rest.join('=') if (key === 't') timestamp = value else if (key === 'v1' && /^[0-9a-f]{64}$/i.test(value)) signatures.push(Buffer.from(value, 'hex')) } if (!timestamp || !/^[0-9]+$/.test(timestamp)) return 'no timestamp' if (Math.abs(now - Number(timestamp)) > TOLERANCE_SECONDS) return 'timestamp outside the tolerance' // HMAC-SHA256 of "<t>.<raw body>", keyed with the whole secret string, whsec_ included. const expected = createHmac('sha256', secret).update(`${timestamp}.`).update(rawBody).digest() return signatures.some((s) => timingSafeEqual(s, expected)) ? null : 'no matching signature'}// receiver.mjs: receives Model Atlas webhooks. It verifies each delivery's signature,// answers 204 at once, then processes the delivery off the request path.// Run: MODEL_ATLAS_WEBHOOK_SECRET=whsec_... PORT=8000 node receiver.mjsimport { createServer } from 'node:http'import { verifySignature } from './verify-signature.mjs'
const secret = process.env.MODEL_ATLAS_WEBHOOK_SECRETif (!secret) throw new Error('set MODEL_ATLAS_WEBHOOK_SECRET to the endpoint\'s whsec_ secret')const MAX_BODY_BYTES = 1024 * 1024 // Model Atlas sends at most 64 KB
// Delivery IDs already processed: the signed body's id, which a retry keeps. With more than// one instance, or to survive restarts, keep them in your database instead (a unique key on the ID).const seen = new Set()
function processDelivery(delivery) { if (seen.has(delivery.id)) { console.log(`delivery ${delivery.id}: duplicate, skipped`) return } seen.add(delivery.id) console.log(`delivery ${delivery.id} (part ${delivery.part} of ${delivery.parts}): ${delivery.model.name}: ${delivery.summary}`) for (const event of delivery.events) { if (event.data.detail?.truncated) { console.log(` ${event.id} ${event.type}: truncated, the whole event is at ${event.data.detail.event}`) } else { console.log(` ${event.id} ${event.type}: ${event.entity.slug} ${event.data.field} ${event.data.old} -> ${event.data.new}`) } }}
async function handle(req, res) { if (req.method !== 'POST') return res.writeHead(405, { Allow: 'POST' }).end() // Collect the raw bytes: the signature covers them exactly, so don't parse and re-serialize first. const chunks = [] let size = 0 for await (const chunk of req) { size += chunk.length if (size <= MAX_BODY_BYTES) chunks.push(chunk) } if (size > MAX_BODY_BYTES) return res.writeHead(413).end() const body = Buffer.concat(chunks) const problem = verifySignature(req.headers['model-atlas-signature'], body, secret) if (problem) return res.writeHead(400, { 'Content-Type': 'text/plain' }).end(problem) let delivery try { delivery = JSON.parse(body.toString('utf8')) } catch { return res.writeHead(400, { 'Content-Type': 'text/plain' }).end('invalid JSON') } // The signature covers the body, not the Model-Atlas-Delivery header: dedupe on the body's id, // and reject a header that doesn't match it (a replayed body under another delivery ID). if (typeof delivery?.id !== 'string' || delivery.id !== req.headers['model-atlas-delivery']) { return res.writeHead(400, { 'Content-Type': 'text/plain' }).end('Model-Atlas-Delivery does not match the body\'s id') } res.writeHead(204).end() setImmediate(() => processDelivery(delivery))}
const server = createServer((req, res) => { handle(req, res).catch((err) => { console.error(err) if (!res.headersSent) res.writeHead(500).end() })})server.listen(Number(process.env.PORT ?? 8000), () => console.log(`listening on port ${server.address().port}`))Python 3.9 or later. In a framework, pass verify_signature the raw bytes (Flask: request.get_data(); Django: request.body).
"""receiver.py: receives Model Atlas webhooks. It verifies each delivery's signature,answers 204 at once, then processes the delivery on a worker thread.Python 3.9+, standard library only.
Run: MODEL_ATLAS_WEBHOOK_SECRET=whsec_... PORT=8000 python3 receiver.py"""import hashlibimport hmacimport jsonimport osimport queueimport threadingimport timefrom http.server import BaseHTTPRequestHandler, ThreadingHTTPServerfrom typing import Optional
TOLERANCE_SECONDS = 5 * 60MAX_BODY_BYTES = 1024 * 1024 # Model Atlas sends at most 64 KB
def verify_signature(header: Optional[str], raw_body: bytes, secret: str, now: Optional[float] = None) -> Optional[str]: """Checks a Model-Atlas-Signature header ("t=<unix>,v1=<hex>[,v1=<hex>]") against the raw body bytes, exactly as received. Returns None when a v1 signature matches and t is within 5 minutes of now, or the reason it doesn't.""" timestamp = None signatures = [] for part in (header or "").split(","): key, sep, value = part.strip().partition("=") if not sep: continue if key == "t": timestamp = value elif key == "v1": try: signatures.append(bytes.fromhex(value)) except ValueError: pass if timestamp is None or not (timestamp.isascii() and timestamp.isdigit()): return "no timestamp" try: age = abs((time.time() if now is None else now) - int(timestamp)) except (ValueError, OverflowError): # hundreds of digits overflow a float return "timestamp outside the tolerance" if age > TOLERANCE_SECONDS: return "timestamp outside the tolerance" # HMAC-SHA256 of "<t>.<raw body>", keyed with the whole secret string, whsec_ included. expected = hmac.new(secret.encode(), timestamp.encode() + b"." + raw_body, hashlib.sha256).digest() if any(hmac.compare_digest(s, expected) for s in signatures): return None return "no matching signature"
deliveries = queue.Queue() # parsed, verified bodies
def process_deliveries() -> None: # Delivery IDs already processed: the signed body's id, which a retry keeps. With more than # one instance, or to survive restarts, keep them in your database instead (a unique key on the ID). seen = set() while True: delivery = deliveries.get() delivery_id = delivery["id"] if delivery_id in seen: print(f"delivery {delivery_id}: duplicate, skipped", flush=True) continue seen.add(delivery_id) print(f"delivery {delivery_id} (part {delivery['part']} of {delivery['parts']}): " f"{delivery['model']['name']}: {delivery['summary']}", flush=True) for event in delivery["events"]: detail = event["data"].get("detail") or {} if detail.get("truncated"): print(f" {event['id']} {event['type']}: truncated, the whole event is at {detail['event']}", flush=True) else: data = event["data"] print(f" {event['id']} {event['type']}: {event['entity']['slug']} {data['field']} " f"{data['old']} -> {data['new']}", flush=True)
class Handler(BaseHTTPRequestHandler): def do_POST(self) -> None: try: length = int(self.headers.get("Content-Length", "")) except ValueError: return self.reply(411) if length < 0 or length > MAX_BODY_BYTES: return self.reply(413) # The raw bytes: the signature covers them exactly, so don't parse and re-serialize first. body = self.rfile.read(length) problem = verify_signature(self.headers.get("Model-Atlas-Signature"), body, self.server.webhook_secret) if problem: return self.reply(400, problem) try: delivery = json.loads(body) except ValueError: return self.reply(400, "invalid JSON") # The signature covers the body, not the Model-Atlas-Delivery header: dedupe on the body's id, # and reject a header that doesn't match it (a replayed body under another delivery ID). if not isinstance(delivery, dict) or not isinstance(delivery.get("id"), str) \ or delivery["id"] != self.headers.get("Model-Atlas-Delivery"): return self.reply(400, "Model-Atlas-Delivery does not match the body's id") self.reply(204) deliveries.put(delivery)
def reply(self, status: int, text: str = "") -> None: data = text.encode() self.send_response(status) if data: self.send_header("Content-Type", "text/plain") self.send_header("Content-Length", str(len(data))) self.end_headers() self.wfile.write(data)
if __name__ == "__main__": secret = os.environ.get("MODEL_ATLAS_WEBHOOK_SECRET") if not secret: raise SystemExit("set MODEL_ATLAS_WEBHOOK_SECRET to the endpoint's whsec_ secret") threading.Thread(target=process_deliveries, daemon=True).start() server = ThreadingHTTPServer(("", int(os.environ.get("PORT", "8000"))), Handler) server.webhook_secret = secret print(f"listening on port {server.server_address[1]}", flush=True) server.serve_forever()Go 1.22 or later.
// Command receiver receives Model Atlas webhooks. It verifies each delivery's signature,// answers 204 at once, then processes the delivery on a worker goroutine.// Go 1.22+, standard library only.//// Run: MODEL_ATLAS_WEBHOOK_SECRET=whsec_... PORT=8000 go run main.gopackage main
import ( "crypto/hmac" "crypto/sha256" "encoding/hex" "encoding/json" "errors" "io" "log" "net/http" "os" "strconv" "strings" "time")
const ( tolerance = 5 * time.Minute maxBodyBytes = 1 << 20 // Model Atlas sends at most 64 KB)
// verifySignature checks a Model-Atlas-Signature header ("t=<unix>,v1=<hex>[,v1=<hex>]")// against the raw body bytes, exactly as received. It returns nil when a v1 signature// matches and t is within 5 minutes of now.func verifySignature(header string, body []byte, secret string, now time.Time) error { var ts string var sigs [][]byte for _, part := range strings.Split(header, ",") { k, v, ok := strings.Cut(strings.TrimSpace(part), "=") if !ok { continue } switch k { case "t": ts = v case "v1": if b, err := hex.DecodeString(v); err == nil { sigs = append(sigs, b) } } } sec, err := strconv.ParseInt(ts, 10, 64) if err != nil { return errors.New("no timestamp") } if d := now.Sub(time.Unix(sec, 0)); d > tolerance || d < -tolerance { return errors.New("timestamp outside the tolerance") } // HMAC-SHA256 of "<t>.<raw body>", keyed with the whole secret string, whsec_ included. m := hmac.New(sha256.New, []byte(secret)) m.Write([]byte(ts + ".")) m.Write(body) want := m.Sum(nil) for _, s := range sigs { if hmac.Equal(s, want) { return nil } } return errors.New("no matching signature")}
// delivery is the part of a delivery's body this receiver reads.type delivery struct { ID string `json:"id"` Summary string `json:"summary"` Part int `json:"part"` Parts int `json:"parts"` Model struct { Slug string `json:"slug"` Name string `json:"name"` } `json:"model"` Events []struct { ID string `json:"id"` Type string `json:"type"` Entity struct { Type string `json:"type"` Slug string `json:"slug"` } `json:"entity"` Data struct { Field string `json:"field"` Old *string `json:"old"` New *string `json:"new"` Detail map[string]any `json:"detail"` } `json:"data"` } `json:"events"`}
type receiver struct { secret string queue chan delivery seen map[string]bool // delivery IDs processed; only the worker goroutine uses it}
func newReceiver(secret string) *receiver { return &receiver{secret: secret, queue: make(chan delivery, 1000), seen: map[string]bool{}}}
func (rc *receiver) ServeHTTP(w http.ResponseWriter, r *http.Request) { // The raw bytes: the signature covers them exactly, so don't decode and re-encode first. body, err := io.ReadAll(http.MaxBytesReader(w, r.Body, maxBodyBytes)) if err != nil { http.Error(w, "body too large or unreadable", http.StatusRequestEntityTooLarge) return } if err := verifySignature(r.Header.Get("Model-Atlas-Signature"), body, rc.secret, time.Now()); err != nil { http.Error(w, err.Error(), http.StatusBadRequest) return } var d delivery if err := json.Unmarshal(body, &d); err != nil { http.Error(w, "invalid JSON", http.StatusBadRequest) return } // The signature covers the body, not the Model-Atlas-Delivery header: dedupe on the body's id, // and reject a header that doesn't match it (a replayed body under another delivery ID). if d.ID == "" || d.ID != r.Header.Get("Model-Atlas-Delivery") { http.Error(w, "Model-Atlas-Delivery does not match the body's id", http.StatusBadRequest) return } select { case rc.queue <- d: w.WriteHeader(http.StatusNoContent) default: // The worker is behind: a non-2xx makes Model Atlas retry later. http.Error(w, "busy", http.StatusServiceUnavailable) }}
func (rc *receiver) work() { for d := range rc.queue { rc.process(d) }}
func (rc *receiver) process(d delivery) { // d.ID is the signed body's id, which a retry keeps. With more than one instance, or to // survive restarts, keep processed IDs in your database instead (a unique key on the ID). if rc.seen[d.ID] { log.Printf("delivery %s: duplicate, skipped", d.ID) return } rc.seen[d.ID] = true log.Printf("delivery %s (part %d of %d): %s: %s", d.ID, d.Part, d.Parts, d.Model.Name, d.Summary) for _, e := range d.Events { if truncated, _ := e.Data.Detail["truncated"].(bool); truncated { log.Printf(" %s %s: truncated, the whole event is at %v", e.ID, e.Type, e.Data.Detail["event"]) continue } log.Printf(" %s %s: %s %s %s -> %s", e.ID, e.Type, e.Entity.Slug, e.Data.Field, text(e.Data.Old), text(e.Data.New)) }}
func text(s *string) string { if s == nil { return "null" } return *s}
func routes(rc *receiver) http.Handler { mux := http.NewServeMux() mux.Handle("POST /", rc) return mux}
func main() { secret := os.Getenv("MODEL_ATLAS_WEBHOOK_SECRET") if secret == "" { log.Fatal("set MODEL_ATLAS_WEBHOOK_SECRET to the endpoint's whsec_ secret") } port := os.Getenv("PORT") if port == "" { port = "8000" } rc := newReceiver(secret) go rc.work() srv := &http.Server{ Addr: ":" + port, Handler: routes(rc), ReadHeaderTimeout: 5 * time.Second, ReadTimeout: 10 * time.Second, WriteTimeout: 10 * time.Second, } log.Printf("listening on port %s", port) log.Fatal(srv.ListenAndServe())}Test vector
Section titled “Test vector”Check your own code with this delivery, signed by Model Atlas’s signing code. Verified at t (or up to 5 minutes later), each header must pass with the secrets shown and fail with any change to the body, the timestamp or the secret. With your real clock, t is long past, so your code should reject it as too old: pass the time in, as the samples do.
whsec_Zx3c9vT1mQ8kR2pL5nW7yB4dF6hJ0sA1uE3gI5oK7qM1796104890{"created_at":"2026-12-01T06:00:40Z","events":[{"correction":false,"correction_reason":null,"data":{"detail":{"retires_on_kind":"exact"},"effective_on":"2027-05-15","field":"retires_on","new":"2027-05-15","old":"2027-04-08","region":null},"detected_at":"2026-12-01T06:00:12Z","entity":{"slug":"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0","type":"offering"},"id":"01KB5Z6T8QY0M7J3V2C9W4D1EN","materiality":"high","provenance":{"source":"bedrock-lifecycle-page","source_run_id":"3f1c2b9e-8d47-4a6e-9b1f-0c2d5e7a8b10"},"type":"lifecycle.retirement_date_changed","version":1}],"id":"01KB5Z7A2M4N6P8R0S2T4V6W8X","model":{"name":"Claude Sonnet 4.5","slug":"claude-sonnet-4-5"},"part":1,"parts":1,"summary":"1 lifecycle.retirement_date_changed (high)","type":"events"}t=1796104890,v1=e059c0788b0cda62189895d61445b39eaa1218a551117060e67b2295a8f474fdDuring a rotation, the same delivery carries both secrets’ signatures, the new one first. Both secrets must verify it:
whsec_6HbgwfmPSduORQL3iyYfzJSJPMZ0d9sl4_dk34B-nm4t=1796104890,v1=e059c0788b0cda62189895d61445b39eaa1218a551117060e67b2295a8f474fd,v1=2fdd303de864ec97275b8f211753de96a700489b8350f938e498923161698f4fRotating the secret
Section titled “Rotating the secret”The secret (whsec_ and 43 more characters) is shown once: when you create the endpoint and when you rotate it. To rotate:
- Call
POST /v1/webhook-endpoints/{id}/rotate-secret. It returns the new secret. - For the next 24 hours, every delivery carries two
v1=signatures, the new secret’s first and the old one’s second. Code that accepts any matchingv1keeps working with either secret, so you can deploy the new one whenever you’re ready in that window. - After 24 hours, only the new secret signs.
You can’t rotate again while the old secret is still valid: that’s a 409 conflict, so the old secret always gets its full 24 hours. If a secret has leaked and you need it to stop working at once, replace the endpoint.
Replacing an endpoint
Section titled “Replacing an endpoint”Deleting an endpoint stops its secret at once, but it also deletes the endpoint’s subscriptions, its delivery log and its pending deliveries. Creating a new endpoint alone leaves your notifications stopped. To replace one:
- Note its subscriptions first. List your subscriptions and keep the settings of each one whose
endpoint_idis the old endpoint. - Note the time, then delete the endpoint.
- Create the new endpoint and store its new secret where your receiver reads it. Deploy that before anything else, or the next deliveries fail your signature check.
- Recreate each subscription on the new endpoint. A new subscription matches only events after it was created, so nothing is sent twice.
- Recover what you missed. Deliveries that were pending on the old endpoint, and events between the deletion and the new subscriptions, aren’t sent again. Fetch them from
GET /v1/eventswithsinceset to the time from step 2, or withafterset to the last event ID you processed. The events have the same IDs and data as the webhooks.
Duplicates
Section titled “Duplicates”A delivery can arrive more than once: after a timeout we retry even if your server did process it, a redelivery sends it again, and if we lose your answer on our side we send it again after 5 minutes. Every copy has the same delivery ID, in the body’s id and in the Model-Atlas-Delivery header. Each part of a large change has its own ID.
Deduplicate on the body’s id, after verifying the signature. The signature covers t and the body, not the headers. So someone who captures a request could replay it within the 5 minutes with a different Model-Atlas-Delivery value, and if you deduplicated on the header, you’d process it twice. Record the IDs you’ve processed (a unique key in your database is best) and skip the ones you’ve seen. We always send a header equal to the body’s id, so also reject a request where they differ (400, not processed), as the samples do.
The event IDs inside are stable too. Each attempt is signed afresh, so t and the signature differ between copies.
Responding
Section titled “Responding”Answer with any 2xx as soon as the signature checks out, and do the work afterwards (a queue, a background job). Each attempt has 10 seconds, connecting included; a slower answer counts as a failure and is retried, even if you finish processing it.
Anything else is a failure: a non-2xx status, a timeout or a connection error. A 3xx is a failure too: we never follow redirects, so register the final URL.
Retries
Section titled “Retries”A failed delivery is retried with the same ID and body. The wait after each failed attempt:
| After attempt | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|
| Wait | 1 min | 5 min | 30 min | 2 h | 8 h | 24 h | 36 h |
Each wait varies by up to 20% either way. That’s 8 attempts over about 3 days. If the eighth fails, the delivery is failed: it stays in the delivery log and you can redeliver it.
Disabled endpoints
Section titled “Disabled endpoints”If an endpoint keeps failing for 3 days without a single success, we disable it (enabled: false, disabled_reason: failing). Turn it back on with PATCH /v1/webhook-endpoints/{id} and {"enabled": true}: its pending deliveries resume, but changes from while it was disabled aren’t delivered. Catch up on those with GET /v1/events.
Redelivery
Section titled “Redelivery”The delivery log (GET /v1/deliveries, the last 30 days) shows every delivery, and GET /v1/deliveries/{id} its attempts, with your status code, error and response time. POST /v1/deliveries/{id}/redeliver sends a failed, succeeded or skipped delivery again, with the same ID and body and a fresh set of attempts. One that’s still pending is a 409 conflict.
Large changes
Section titled “Large changes”One delivery holds at most 100 events and 64 KB. A merge that changes more for one model comes as several deliveries, numbered by part of parts (1 of 3, 2 of 3, …). Each part has its own ID and is retried on its own, so parts can arrive in any order.
An event too big for a delivery on its own is truncated: its ID, type, materiality, entity and provenance stay; data.old and data.new keep their first 1 KB, ending in …; and data.detail becomes:
{"truncated": true, "event": "/v1/events/01KB5Z6T8QY0M7J3V2C9W4D1EN"}Fetch the whole event from that path with your API key (GET /v1/events/{id}).
Security
Section titled “Security”- Keep the secret on your server. Store it like a password (a secrets manager or an environment variable), never in a browser, a mobile app or source control. Anyone with it can sign deliveries that pass your check.
- HTTPS only. Endpoint URLs must use
httpsand a host name (not an IP address) that resolves to public addresses. We use TLS 1.2 or later. - We never follow redirects and don’t send through a proxy: a delivery goes only to the URL you registered.
- Verify before you trust anything in the body. The body comes from the internet until the signature says otherwise.
- If a secret may have leaked, replace the endpoint: rotation keeps the old secret valid for 24 hours.