Declared with its handler and its proof.
A webhook is the address where a third party sends a notification. The schema names the handler that each notification starts, and how the third party proves that it holds the secret.
webhooks {
name: "provider"
handler: "apply_notice"
proof: WEBHOOK_PROOF_SIGNATURE
proof_header: "X-Signature"
proof_prefix: "sha256="
signature_encoding: SIGNATURE_ENCODING_HEX
headers: "X-Event"
id_header: "X-Delivery"
}
A webhook, in the schema
The schema holds no secret and no address. An admin gives the secret in each environment.
| The schema names | What it sets |
|---|---|
| Handler | The handler that each notification starts a job of. It requires no input. |
| Proof | A signature of the body, the secret in a header, or the secret at the end of the address. |
| Proof header | The header that carries the proof, after a fixed prefix when the schema gives one. |
| Headers | The headers that the handler receives, with the body as it came. The engine reads neither. |
| Identifier | The header that identifies a notification. One that comes again within a day starts no second job. |
What a webhook declares
A third party that proves itself another way, such as with a timestamp, sends the secret in the address. The handler checks the rest.