Bird
0
0

Which JSON structure correctly represents a webhook payload for a user creation event?

easy📝 Syntax Q3 of 15
Rest API - Webhooks and Events
Which JSON structure correctly represents a webhook payload for a user creation event?
A{"event":"user_created","data":{"id":123,"name":"Alice"}}
B["user_created", {"id":123, "name":"Alice"}]
C{"user_created":{"id":123,"name":"Alice"}}
D{"event":"user_created","id":123,"name":"Alice"}
Step-by-Step Solution
Solution:
  1. Step 1: Identify proper JSON format for event and data

    The payload should have an event key and a nested data object.
  2. Step 2: Check each option's structure

    {"event":"user_created","data":{"id":123,"name":"Alice"}} correctly nests data under 'data' key with event name separate.
  3. Final Answer:

    {"event":"user_created","data":{"id":123,"name":"Alice"}} -> Option A
  4. Quick Check:

    Correct JSON payload structure = {"event":"user_created","data":{"id":123,"name":"Alice"}} [OK]
Quick Trick: Use clear keys: event and data for webhook payloads [OK]
Common Mistakes:
MISTAKES
  • Using arrays instead of objects for payload
  • Mixing event and data keys at same level
  • Missing nested data object

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes