Skip to content

Delivery and webhook signatures

A delivery is an HTTP POST from the platform to your endpoint. When the sending service account has a signing secret the request is signed, so you can prove it came from the platform and was not altered or replayed. This page is the exact algorithm. For the concepts (envelopes, retries, acknowledgement) see Delivery; for a how-to see Receive deliveries and verify signatures.

Header Value
X-FlowCatalyst-Signature Lower-case hex of HMAC-SHA256(secret, timestamp + body), 64 characters. (The router writes it upper-case, X-FLOWCATALYST-SIGNATURE; header names are case-insensitive.)
X-FlowCatalyst-Timestamp UTC time of signing, ISO 8601 with millisecond precision: 2026-05-24T08:30:00.123Z.
Authorization Bearer <token>, when the signing account has a webhook bearer token.
Content-Type application/json for an envelope. For a data-only delivery, the job’s own payload content type (application/json when it has none).
X-Dispatch-Job-Id The dispatch job id. Sent on deliveries made by the platform’s dispatch-processing callback.
X-Event-Type The dispatch job’s code (the event type for an event-raised job). Same deliveries.
X-FlowCatalyst-Client {clientId}:{clientCode}, naming the tenant a multi-tenant endpoint is receiving a delivery for. Sent for every delivery whose job has a client that resolves to an identifier, including data-only deliveries. Omitted entirely (never half a pair) for platform-scoped jobs. It does not change what is signed.

Scheduled-job firings and function webhooks are signed the same way.

Two details differ from the rest of the API: the timestamp has millisecond (not microsecond) precision, and it is an ISO string, not Unix seconds. A bare Unix-seconds value is still accepted by the SDK verifiers for backward compatibility.

signing string = timestamp_header_value + raw_body_bytes
signature = lower_hex( HMAC_SHA256( key = signing_secret, message = signing string ) )
  • The timestamp is the header value as a string, used byte for byte. No separator, no re-formatting.
  • The body is the raw bytes received on the wire. The sender signs the bytes it sends and never re-serialises, so the JSON library on either side cannot change the result. Verify before you parse: read the raw body, check the signature, then decode JSON. A body that has been parsed and re-encoded will not verify.
  • For the router’s mediation call the body is {"messageId":"<id>"}. For the dispatch-processing callback it is the delivery body: the envelope, or the raw payload when the subscription is dataOnly. The signature covers the body only; headers (including X-FlowCatalyst-Client) are not signed.
  • Compare in constant time. Hex is compared case-insensitively by the SDKs.

A verifier should also reject stale and future-dated deliveries, parsing the timestamp to whole seconds:

Check Default
Older than the tolerance Reject. Tolerance 300 s (5 minutes).
More than 60 s in the future Reject (clock skew allowance).

Retries are re-signed with a fresh timestamp, so a legitimate retry always falls inside the window. The Go Verifier applies one symmetric skew (default 5 minutes) instead of the 300 s / 60 s pair; the Validator in the same package uses 300 s past and 60 s future like the other SDKs.

The signing secret belongs to the service account that signs the delivery: the subscription’s own account if it names one, else its connection’s account, else the application’s oldest active service account (for a direct dispatch job, the application named by the job code). The first of these that names an account decides, with no fall-through. If the named account is inactive or has no webhook credentials, the delivery goes out unsigned and the reason is recorded on the attempt ((delivered unsigned: ...)); it is never signed by a different account. Treat an unsigned delivery as untrusted. See Subscriptions and connections.

All SDK verifiers are held to these. Secret, timestamp and body are exact strings; the signature is the expected output.

Secret Timestamp Body Signature
secret 2026-08-07T09:32:12.123Z hello a7d62aade7a79e88792f84e035b72788a3c78a30f46ad265ec8d6fb12a4e9f91
test-secret-do-not-use-in-prod 2026-05-24T08:30:00.123Z {"messageId":"msg_TEST123456"} 0278cfb47ccbf20a2356584cca6e076cbade089ccc961dbe553f0e768cbf9059
s3crét 1786095132 (Unix seconds) {"name":"Zoë","emoji":"✓"} (UTF-8) b059d3518989f4f1fa649fe7295432f389337d7ade30f185684d013e1c07a3ca

The timestamp in a vector is far outside any replay window; test the signature function directly, or inject a clock, rather than the full verifier. See also Conformance vectors.

Every SDK ships a verifier. Pass the raw body and the two header values.

import "github.com/flowcatalyst/go-sdk/webhook"
verifier := webhook.NewVerifier(os.Getenv("FLOWCATALYST_SIGNING_SECRET"))
func handle(w http.ResponseWriter, r *http.Request) {
body, err := io.ReadAll(r.Body) // raw bytes, before any JSON decoding
if err != nil {
http.Error(w, "bad request", http.StatusBadRequest)
return
}
err = verifier.Verify(body,
r.Header.Get(webhook.SignatureHeader), // X-FLOWCATALYST-SIGNATURE
r.Header.Get(webhook.TimestampHeader)) // X-FLOWCATALYST-TIMESTAMP
if err != nil {
// webhook.ErrMissingSignature, ErrMissingTimestamp, ErrBadTimestamp,
// ErrStaleTimestamp, ErrBadSignature
http.Error(w, "invalid signature", http.StatusUnauthorized)
return
}
// parse and handle body
}

webhook.NewValidator(secret, opts...) (or ValidatorFromEnv(), reading FLOWCATALYST_SIGNING_SECRET) is the equivalent with a Validate(signature, timestamp, payload) method, WithTolerance and WithClock options, and a ComputeSignature method for tests.

If you do not use an SDK, the check is a few lines in any language:

import hashlib, hmac, time
from datetime import datetime
def verify(secret: bytes, body: bytes, signature: str, timestamp: str) -> bool:
sent = datetime.fromisoformat(timestamp.replace("Z", "+00:00")).timestamp()
if sent < time.time() - 300 or sent > time.time() + 60:
return False
expected = hmac.new(secret, timestamp.encode() + body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, signature.lower())

A target answers a delivery with a 2xx and an optional JSON body. An absent or unparseable body on a 2xx is plain success.

Field Type Meaning
ack boolean false means “not delivered; requeue with backoff”. Default true.
delaySeconds integer With ack:false, the minimum requeue delay. With flushGroup, the suppression window.
notBefore string (RFC 3339) With ack:false, the instant to redeliver at or after. Takes precedence over delaySeconds when it parses; an unparseable value is ignored. Send both for older routers.
flushGroup boolean true means delivered, and stop delivering the rest of this message’s group for delaySeconds (default 60, capped at 5 minutes). Only safe when the target already owns the records the messages point at. ack:false wins over it.

A target can also end retries for good by answering 422 with the header FlowCatalyst-Outcome: reject; the attempt’s job then fails at once instead of spending its remaining retries.

A 429 response’s Retry-After header (delay-seconds or an HTTP date) is honoured as a delay without spending a retry. See Delivery for the retry curve.

Other uses of HMAC in the platform sign plain strings (for example the dispatch-job auth token signs the raw job id), and the rest are not HMAC at all (JWT RS256, Argon2id password hashes, AES-GCM at rest). None of them sign serialised JSON.