Segment · event: track ·
content type: application/json
This is a representative sample — fake IDs, real structure. To see a payload with your data, point the provider at a capture URL (button below).
One click creates a free capture bin with this exact payload already in it — pretty-printed, headers inspectable, replayable to your own endpoint:
Then paste the bin's URL into Segment's webhook settings to capture a real delivery. No signup.
content-type: application/json user-agent: Segment.io/1.0 x-signature: 6d729ef2f3463d8f7aeb41830650465a20026995
{
"version": 1,
"type": "track",
"userId": "019mr8mf4r",
"event": "Purchased an Item",
"properties": {
"revenue": "39.95",
"shippingMethod": "2-day"
},
"context": {
"library": {
"name": "analytics.js",
"version": "4.1.0"
}
},
"timestamp": "2026-08-30T06:15:00.276Z",
"messageId": "ajs-next-8f3c2b1a9d7e6f5a4b3c2d1e0f9a8b7c"
}
X-Signature, keyed
with the destination's optional Shared Secret. Try it with secret
hookden-segment-sample-secret in the
signature debugger (Segment scheme), or set
the generic scheme with header x-signature on a capture bin — it now
falls back to SHA-1 automatically.JSON.stringify(req.body[0]) — the signature covers
only the first event in the array, not the whole batch body. A
verifier that hashes the full raw batch will "fail" on perfectly genuine
deliveries.JSON.stringify(req.body) —
the re-serialized parsed body, not the raw bytes. That works because
Segment sends compact JSON that round-trips; but middleware that reorders keys or a
framework that pretty-prints will break it. When in doubt, capture the exact wire
bytes in a bin and compare.type, and expect userId and
timestamp on every call.Reproduce this delivery against any endpoint (your handler, a bin, staging):
$ curl -X POST https://your-endpoint.example/hook \
-H 'content-type: application/json' \
-H 'user-agent: Segment.io/1.0' \
-H 'x-signature: 6d729ef2f3463d8f7aeb41830650465a20026995' \
-d '{
"version": 1,
"type": "track",
"userId": "019mr8mf4r",
"event": "Purchased an Item",
"properties": {
"revenue": "39.95",
"shippingMethod": "2-day"
},
"context": {
"library": {
"name": "analytics.js",
"version": "4.1.0"
}
},
"timestamp": "2026-08-30T06:15:00.276Z",
"messageId": "ajs-next-8f3c2b1a9d7e6f5a4b3c2d1e0f9a8b7c"
}'
← All payload examples · Related guide · Signature debugger · Docs