A Segment Track Call Needs an Event Name. The HTTP 200 Does Not Check.
A server posts a track to api.segment.io/v1/batch . The response is 200. Downstream destinations never see the event. Segment's HTTP API is a collector. It is not a schema checker. The track spec marks event as required . The collector still takes a call that omits it. It does not invent a name. { "writeKey" : "seg-write-key-abc" , "batch" : [ { "type" : "track" , "userId" : "019mr8mf4r" } ] } No…
When posting a track to Segment's API, the response is HTTP 200, but this does not guarantee the event will be received by downstream destinations. Segment's HTTP API is a collector, not a schema checker, and it will still take a call even if the event name is omitted. The event name is required for the track type, and Segment drops the call without it.
To resolve this issue, an event name should be added to the call. Additionally, every call needs a userId or anonymousId, which Segment documents as required on every call. The timestamp should be in ISO 8601 format, or omitted if the event is happening now. The HTTP 200 is not a contract check, and Pixellint is an independent tool used for linting these payloads.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.