Every delivery is signed, so you can be sure it came from Sovgate and wasn't changed.
What the header holds
The Sovgate-Signature header contains the time the delivery was signed (in seconds) and one HMAC-SHA256 signature for each active signing secret, newest first. Each signature is made over the timestamp, a full stop and the exact body.
Checking it
- Read the raw body exactly as received, before any parsing.
- Compute HMAC-SHA256 of
timestamp + "." + raw body, keyed with your endpoint's signing secret. - Compare your result with the signatures in the header, using a constant-time comparison.
- Reject the delivery if none matches, or if the timestamp is too old (a few minutes), to stop replays.
The exact header format is in the API reference.
Rolling a secret
When you roll a signing secret, you can keep the old one working for an overlap (none, 1 hour or 24 hours). During the overlap, deliveries carry a signature for each secret, so either one verifies.
The signing secret is shown only after you confirm it's you, and each reveal is recorded.
Related articles
Tell us what happened, and our support team will help.