# JSON Schema for Event Payloads

**Use case:** 

Create separate JSON Schemas for different webhook event payload samples instead of merging them into one schema.

## Input

```json
{
  "samples": [
    {
      "event": "user.created",
      "createdAt": "2026-06-25T10:00:00Z",
      "user": {
        "id": "u_1",
        "plan": "pro"
      }
    },
    {
      "event": "invoice.paid",
      "createdAt": "2026-06-25T11:00:00Z",
      "invoice": {
        "id": "inv_1",
        "amount": 12900,
        "currency": "USD"
      }
    }
  ],
  "schemaTitle": "WebhookEvent",
  "schemaDescription": "Separate schemas for webhook event samples.",
  "outputFormat": "json",
  "inferRequired": true,
  "allowAdditionalProperties": false,
  "mergeAllSamples": false
}
```

## Output

```json
{
  "sampleIndex": {
    "label": "Sample #",
    "format": "number"
  },
  "schemaTitle": {
    "label": "Title",
    "format": "text"
  },
  "fieldCount": {
    "label": "Fields",
    "format": "number"
  },
  "requiredCount": {
    "label": "Required",
    "format": "number"
  },
  "outputFormat": {
    "label": "Format",
    "format": "text"
  },
  "schema": {
    "label": "Schema",
    "format": "text"
  }
}
```

## About this Actor

This example demonstrates how to use [JSON Schema Generator](https://apify.com/automation-lab/json-schema-generator) with a specific input configuration. Visit the [Actor detail page](https://apify.com/automation-lab/json-schema-generator) to learn more, explore other use cases, and run it yourself.