What does a webhook request look like?
The three-part structure behind every event we send.
Every webhook is a JSON POST with Content-Type: application/json. Regardless of which event it is, the body always has the same three parts:
{ "eventName": "...", "data": { }, "metadata": { }}
eventName— a string identifying which event this is. Branch on this to decide how to handle the request.data— the details of what happened. The exact fields depend on the event, but this object always identifies the company the event belongs to..metadata— information about the delivery itself, not the event. This includes a unique identifier for the event, timestamp and the delivery attempt number.