Receive webhooks
Mountaya delivers each change your webhook endpoints subscribe to as a signed POST. On a JVM server, constructWebhookEvent checks the signature and reads the event.
Pass the body exactly as it arrived, before any JSON parser reads it, with its Mountaya-Signature header:
Answer a refused delivery with 400, and every other one with a 2xx within 10 seconds. Signatures explains the header.
Each event type has a class of WebhookEvent, so a when reads what each carries:
A type newer than your build arrives as WebhookEvent.Unknown. Answer it 2xx and move on:
Rotate the secret in the Mountaya app, under Organization → Webhooks. The previous secret keeps signing for up to 7 days, and the header carries a v1 for each. Deploy the new secret to MOUNTAYA_WEBHOOK_SECRET before the overlap ends: either secret verifies meanwhile.
Run your receiver against the published test vectors, with now pinned to each vector's clock: