Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions src/features/dashboard/settings/webhooks/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@ export const WEBHOOK_EVENTS = [
export type WebhookEvent = (typeof WEBHOOK_EVENTS)[number]

export const WEBHOOK_EXAMPLE_PAYLOAD = `{
"version": "v1",
"id": "<UUID>",
"version": "v2",
"type": "sandbox.lifecycle.created",
"eventData": null,
"sandboxBuildId": "<UUID>",
"sandboxExecutionId": "<UUID>",
"sandboxId": "<SANDBOX_ID>",
"sandboxTeamId": "<UUID>",
"sandboxTemplateId": "<TEMPLATE_ID>",
"timestamp": "<ISO_8601_TIMESTAMP>"
"timestamp": "<ISO_8601_TIMESTAMP>",
"event_category": "lifecycle",
"event_label": "create",
"sandbox_id": "<SANDBOX_ID>",
Comment on lines +17 to +18

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve event_data in the v2 example

For v2 deliveries that include sandbox metadata or execution details, the webhook schema exposes that data under snake_case event_data; this update removes the old eventData field but never adds its v2 replacement. Users copying this example for payload validation or handler typings will reject or ignore real deliveries that contain event data, especially paused/killed events and sandboxes with metadata.

Useful? React with 👍 / 👎.

"sandbox_execution_id": "<UUID>",
"sandbox_template_id": "<TEMPLATE_ID>",
"sandbox_build_id": "<UUID>",
"sandbox_team_id": "<UUID>"
}

// Payload structure may vary by event type.
// Payload structure may vary by event type.
// See docs for full schema.`

export const WEBHOOK_SIGNATURE_VALIDATION_DOCS_URL =
Expand Down
Loading