Authentication
Verify every delivery before parsing or acting on its JSON. Toden signs the exact request bytes with the secret assigned to that endpoint.
Signed headers
Every X-Myaza-* header above is also sent as X-Toden-* with the same value: X-Toden-Signature-V2, X-Toden-Timestamp, X-Toden-Replay-Window, X-Toden-Event, X-Toden-Event-Id, X-Toden-Delivery, X-Toden-Correlation-Id, X-Toden-Webhook-Version and X-Toden-Signature. Read whichever name you prefer; the X-Myaza-* names keep working.
Verification algorithm
- Read the raw HTTP request body as bytes.
- Parse
tand allv1values fromX-Myaza-Signature-V2. - Reject a missing, invalid, too-old or implausibly future timestamp.
- Compute lowercase hex
HMAC-SHA256("<t>.<rawBody>", endpointSecret). - Compare the expected value with every supplied
v1using a constant-time comparison. - Only after a match, parse the JSON, deduplicate on
id, enqueue it durably and return2xx.
Do not re-serialise parsed JSON before verification. Whitespace and property order change the signed bytes.
Envelope version
These signatures cover endpoints on webhook version v2 (recommended), whose body is the signed envelope. Its version field is "2026-08-11", the identifier of API version v2, and Toden sends that value on every delivery. If your handler checks the field, accept "2026-08-11" and "v2" and refuse anything else. X-Myaza-Webhook-Version names the endpoint’s webhook version: v2, or v1 for the legacy body.
Node.js example
Secret rotation
During the configured grace period Toden signs with the active secret and every unexpired grace secret. The V2 header therefore carries more than one v1 value. Keep both endpoint secrets available and accept the request if either expected signature matches. Remove the old secret only after its dashboard grace period ends.
Failure responses
Return 401 for missing, stale or invalid signatures. Return 2xx only after the event is durably accepted. Other non-2xx responses and timeouts are retried according to the delivery schedule.