Prerequisites
- An active Sparkles API access grant.
- A public HTTPS endpoint on port
443. - A handler that can read the unmodified request body.
Step 1: Register an endpoint
Open the API access page, enter your endpoint URL, and copy thewhsec_ signing secret. Sparkles shows the secret only when it is created or rotated.
Keep the endpoint pending until your server implements signature and challenge verification.
Step 2: Verify every request
Read these headers before parsing the JSON body:
The signed value is:
v1 value, then remove the old secret after the overlap ends.
Step 3: Answer endpoint verification
Selecting Verify endpoint sends a signedendpoint.verification request:
sequence or Webhook-Attempt.
Step 4: Acknowledge durable acceptance
Return any2xx response only after saving the event durably. Delivery is at least once, so deduplicate on the body UUID before applying side effects.
Sparkles retries transient failures after approximately 1 minute, 5 minutes, 30 minutes, 2 hours, 8 hours, 1 day, 2 days, and 3 days. An HTTP 429 response may override the next delay through Retry-After, capped at one day. Return HTTP 410 to disable the endpoint and stop delivery.
Verification
The API access page marks the endpoint active after it receives a valid challenge response. A delivered event should have a matching bodyid and Webhook-Id, a current timestamp, and a valid signature.
Troubleshooting
- Signature mismatch: verify against the raw bytes before JSON parsing or reserialization.
- Verification timeout: respond within 15 seconds with no more than 4 KiB of JSON.
- Endpoint rejected: use public HTTPS on port 443 without a query string or fragment.
- Duplicate event: acknowledge it without applying its side effects again.