Webhooks
For each matching filing FilingStream sends an HTTPS POST with a JSON body to the subscription's webhook_url.
Request
Headers:
| Header | Meaning |
|---|---|
FS-Signature | t=<unix seconds>,v1=<hex>; see below. During a secret rotation overlap there are two v1= values. |
FS-Event-ID | The event id (also in the body). Stable across retries: use it to deduplicate. |
FS-Delivery-ID | Identifies this delivery. |
FS-Delivery-Attempt | 1 for the first try, then 2, 3, … |
Content-Type | application/json |
Body (abridged):
{
"id": "evt_…",
"type": "filing.created",
"seq": 12345,
"created_at": "2026-11-10T14:00:01Z",
"subscription_id": "sub_…",
"matched_keywords": ["merger agreement"],
"data": {
"accession_number": "0000320193-26-000101",
"form_type": "8-K",
"filed_date": "2026-11-10",
"company_name": "Apple Inc.",
"tickers": ["AAPL"],
"items": ["2.02"],
"links": {"index": "…", "primary_document": "…", "full_text": "…"},
"searched_documents": [],
"enrichment": "complete"
}
}
The full field list is in the OpenAPI file. Use seq and id for ordering and deduplication: delivery is at least once, so the same event can arrive more than once.
Verify the signature
The signature is HMAC-SHA256 over "<t>.<raw body>" using your subscription's webhook secret as the key, hex encoded. Verify against the raw bytes of the body, compare in constant time, and reject timestamps more than 5 minutes from now.
func verify(secret, header string, body []byte, now time.Time) bool {
var ts int64
var sigs [][]byte
for _, part := range strings.Split(header, ",") {
k, v, _ := strings.Cut(strings.TrimSpace(part), "=")
switch k {
case "t":
ts, _ = strconv.ParseInt(v, 10, 64)
case "v1":
if b, err := hex.DecodeString(v); err == nil {
sigs = append(sigs, b)
}
}
}
if d := now.Sub(time.Unix(ts, 0)); ts == 0 || d > 5*time.Minute || d < -5*time.Minute {
return false
}
m := hmac.New(sha256.New, []byte(secret))
m.Write([]byte(strconv.FormatInt(ts, 10) + "." + string(body)))
want := m.Sum(nil)
for _, s := range sigs {
if hmac.Equal(s, want) {
return true
}
}
return false
}
import hmac, hashlib, time
def verify(secret: str, header: str, body: bytes, tolerance=300) -> bool:
parts = dict(p.split("=", 1) for p in header.split(",") if "=" in p) # keep every v1 if you rotate
ts = int(parts["t"])
if abs(time.time() - ts) > tolerance:
return False
want = hmac.new(secret.encode(), f"{ts}.".encode() + body, hashlib.sha256).hexdigest()
sigs = [p.split("=", 1)[1] for p in header.split(",") if p.strip().startswith("v1=")]
return any(hmac.compare_digest(s, want) for s in sigs)
Responses and retries
- Answer with any
2xxquickly; the response body is ignored. Redirects are not followed. - Anything else, a timeout or a connection error counts as a failure and the delivery is retried with growing delays (about 10 s, 30 s, 2 min, 10 min, 30 min, 1 h, then 3 h, each with ±20 % jitter) for up to 8 attempts.
- HTTP
410 Gonedisables the subscription. So do 20 consecutive failed deliveries. - The webhook URL must be a public HTTPS endpoint. Private, loopback and link-local addresses are refused, both when you save the URL and when we connect.
POST /v1/subscriptions/{id}/testsends a synthetic event signed like a real one.GET /v1/subscriptions/{id}/deliveriesandGET /v1/deliveries/{id}show every attempt;POST /v1/deliveries/{id}/retryre-queues a failed delivery (a few manual retries per delivery, within your plan's delivery-log window).