Skip to content

docs: add webhook payload and testing documentation#29759

Open
akshitj11 wants to merge 2 commits into
calcom:mainfrom
akshitj11:docs/webhooks-15033
Open

docs: add webhook payload and testing documentation#29759
akshitj11 wants to merge 2 commits into
calcom:mainfrom
akshitj11:docs/webhooks-15033

Conversation

@akshitj11

@akshitj11 akshitj11 commented Jul 13, 2026

Copy link
Copy Markdown

What does this PR do?

Integrators had no published reference for Cal.diy webhook payload shapes or how to test webhooks locally — they had to read packages/features/webhooks/lib/factory/ source code.

This PR adds a Webhooks documentation page covering payload structures by trigger, clarifies that MEETING_STARTED / MEETING_ENDED fire at scheduled booking times (not in-call events), documents local testing with ngrok, and includes JSON examples for all major event types.

Visual Demo (For contributors especially)

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

  • N/A — documentation-only change.

Image Demo (if applicable):

  • Screenshot of the docs site showing Webhooks in the sidebar and the payload examples rendered on the page.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works. (N/A — docs-only change.)

How should this be tested?

  • Are there environment variables that should be set?
    • None required to review docs. For live webhook testing, a tunnel URL (e.g. ngrok) is documented.
  • What are the minimal test data to have?
    • Local Cal.diy instance (yarn dev or yarn dx) to render the docs site.
  • What is expected (happy path) to have (input and output)?
    • Input: open the Webhooks page in the docs site.
    • Output: nav entry visible; JSON examples render; payload field descriptions match packages/features/webhooks/lib/factory/versioned/v2021-10-20/.
  • Any other important info that could help to test that PR
    1. Run the docs site and open the Webhooks page.
    2. Verify nav entry appears under docs sidebar.
    3. Cross-check payload descriptions and JSON examples against payload builders in packages/features/webhooks/lib/factory/.

Document webhook payload shapes by trigger, clarify meeting start/end
timing, and add local testing guidance with ngrok.

Fixes calcom#15033
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Cal.diy, @akshitj11! Thanks for opening this pull request.

A few things to keep in mind:

  • This is Cal.diy, not Cal.com. Cal.diy is a community-driven, fully open-source fork of Cal.com licensed under MIT. Your changes here will be part of Cal.diy — they will not be deployed to the Cal.com production app.
  • Please review our Contributing Guidelines if you haven't already.
  • Make sure your PR title follows the Conventional Commits format.

A maintainer will review your PR soon. Thanks for contributing!

@github-actions github-actions Bot added community Created by Linear-GitHub Sync docs area: docs, documentation, cal.com/docs webhooks area: webhooks, callback, webhook payload labels Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Added a Webhooks section to the documentation navigation and created a page describing Cal.diy webhook payload versioning, trigger-specific structures, example payloads, local testing through a tunnel, subscriber setup, event triggering, and source locations for versioned payload builders.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The new docs cover payload shapes, MEETING_STARTED/ENDED timing, RECORDING_READY, and local testing guidance requested by #15033.
Out of Scope Changes check ✅ Passed The changes stay within documentation updates plus the docs nav entry and do not introduce unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly summarizes the main docs change: webhook payload and testing documentation.
Description check ✅ Passed The description matches the added webhook docs, navigation entry, payload examples, and local testing guidance.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
apps/docs/content/webhooks.mdx (3)

58-64: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add payload details for FORM_SUBMITTED and OOO_CREATED.

These events get only a single sentence each with no payload structure or example. The PR objective asks to document payload structures for all webhook events. Even a brief example payload would improve completeness and consistency with the recording events section.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/webhooks.mdx` around lines 58 - 64, Add payload
documentation for the FORM_SUBMITTED and OOO_CREATED sections, including each
event’s payload structure and a brief representative example consistent with the
existing recording-events documentation style.

15-17: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the payment event payload structure.

The description "payment-specific payloads with booking and payment metadata" is too vague to be actionable. Integrators need to know the actual fields. Consider adding an example JSON payload similar to the recording events section.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/webhooks.mdx` around lines 15 - 17, Expand the Payment
events section near BOOKING_PAYMENT_INITIATED and BOOKING_PAID with an example
JSON payload, following the format used by the recording events section and
showing the concrete booking and payment metadata fields integrators receive.

9-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add an example JSON payload for booking events.

The recording events section includes full JSON examples, but the booking events section only lists field names. Since booking events are the most commonly used triggers, an example payload would help integrators validate their handlers against the actual shape. The PR objective asks to document payload structures for all webhook events.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/webhooks.mdx` around lines 9 - 13, Add a representative
JSON payload example to the booking events section in webhooks.mdx, covering the
documented payload fields and realistic values so integrators can validate
handlers against the actual booking event shape. Keep the existing list of
shared booking fields and match the formatting used by the recording event
examples.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@apps/docs/content/webhooks.mdx`:
- Around line 58-64: Add payload documentation for the FORM_SUBMITTED and
OOO_CREATED sections, including each event’s payload structure and a brief
representative example consistent with the existing recording-events
documentation style.
- Around line 15-17: Expand the Payment events section near
BOOKING_PAYMENT_INITIATED and BOOKING_PAID with an example JSON payload,
following the format used by the recording events section and showing the
concrete booking and payment metadata fields integrators receive.
- Around line 9-13: Add a representative JSON payload example to the booking
events section in webhooks.mdx, covering the documented payload fields and
realistic values so integrators can validate handlers against the actual booking
event shape. Keep the existing list of shared booking fields and match the
formatting used by the recording event examples.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 13d23bbe-a7f8-44b2-8fcd-6e1c383741b1

📥 Commits

Reviewing files that changed from the base of the PR and between f004349 and 9e08c95.

📒 Files selected for processing (2)
  • apps/docs/content/_meta.ts
  • apps/docs/content/webhooks.mdx

Address CodeRabbit review feedback by documenting representative booking,
payment, form, and OOO webhook payload shapes.
@pull-request-size pull-request-size Bot added size/L and removed size/M labels Jul 13, 2026
@akshitj11

akshitj11 commented Jul 13, 2026

Copy link
Copy Markdown
Author

Addressed CodeRabbit feedback , added JSON payload examples for booking, payment, FORM_SUBMITTED, and OOO_CREATED events.

@akshitj11

Copy link
Copy Markdown
Author

CodeRabbit fixes pushed. Please add the run-ci label. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Created by Linear-GitHub Sync docs area: docs, documentation, cal.com/docs size/L webhooks area: webhooks, callback, webhook payload

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CAL-3718] Improvement in webhooks documentation

1 participant