What a webhook message looks like (JSON for beginners)
A webhook usually carries its data as JSON, a plain-text format of labels and values. Here's how to read one, with a small made-up example.
When a webhook arrives, the data inside it is usually written in a format called JSON. It looks a bit like code, but you can read it. Stripe, for one, says it uses HTTPS to send webhook events to your app as a JSON payload that includes event information.1
A payload is just the useful contents, the way a parcel's payload is whatever's inside the box.
What JSON is
JSON stands for JavaScript Object Notation. MDN calls it a standard text-based format for representing structured data.2 Text-based means you could open it in a plain notepad. Structured means every piece of information has a label.
The official JSON site says it is easy for humans to read and write.3 It's built on two things: a collection of name/value pairs, and an ordered list of values.3
A name/value pair is a label with its answer. The label might be "first_name" and the answer "River". A list is several items in a row.
A small example
This is a made-up message, modelled on the one in Zapier's help page. The names are placeholders, not real people.
{
"first_name": "River",
"last_name": "Green"
}
Read it from the outside in:
- The curly braces
{ }wrap one whole record. - Each line is a label, a colon, then its value.
- Commas separate the lines.
The label "first_name" holds the value "River". That's it. Real messages have more lines, but the pattern doesn't change.
The rules that trip people up
MDN lists a few. Strings must be enclosed in double quotes, not single quotes.2 Each property needs to be in the form of "key": value. Objects and arrays cannot contain trailing commas, which means a stray comma after the last item breaks it.2
You'll rarely write JSON by hand in a no-code tool. The rules matter when you paste a test message and the tool says it can't read it. Look for a missing quote or an extra comma.
Lists of records
JSON can hold more than one record at once. Square brackets [ ] wrap a list, with each record inside separated by commas.
Zapier says you can send an array of properly formed JSON objects, and it will trigger the Zap once for each object. Its own example has three objects and runs the actions three times, once for every object in the array.4 An array is the programmer's word for a list.
So one message can start more than one run. If your workflow sends something to an AI tool or to customers each time, count how many records are in the list first.
More than the data
The JSON is only the body of the request. A webhook request has other parts too. Make's logs show the webhook request as a timestamp, URL, method, headers, query and body.5 Make also says parsed items combine the query parameters and body of the webhook request in one bundle.5
The method says what kind of request it is, such as POST. The headers are extra details beside the message. The query is anything tacked on to the end of the address. The body is the part with your data.
From message to fields
No-code tools do the reading for you. Zapier says it will separate each field in your webhook data, which lets you use them in later steps.4 Its page gives email addresses, names and project info as examples.
That's the moment to be careful. Fields can hold customer details. When you test a workflow, use dummy data you've made up, not a real customer's record. And if you later pass fields to an AI step, see Where an AI step fits in a webhook workflow.
To learn what sends these messages in the first place, read What is a webhook?.
Further reading and sources
- Receive Stripe events in your webhook endpoint, Stripe Documentation
- Working with JSON, MDN Web Docs
- Introducing JSON, json.org
- Trigger Zap workflows from webhooks, Zapier Help Center
- Webhooks, Make Help Center