generate_payload_schema
Generate TypeScript interfaces, Zod schemas, Pydantic models, or JSON Schema from captured webhook request bodies; compare multiple requests to identify optional and nullable fields.
Instructions
Generate TypeScript interfaces, Zod schemas, Pydantic models, or JSON Schema from the bodies of requests captured by a sandbox endpoint. Several requests of one event teach which fields are optional or nullable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Root type name (default: from the detected event, else WebhookPayload) | |
| path | No | Only requests with this path | |
| event | No | Only requests whose detected provider event matches, e.g. "invoice.paid" or "push". One event per schema gives the tightest types. | |
| limit | No | How many of the latest requests to read before filtering | |
| format | No | Output: "typescript" interfaces, "zod" schemas, "pydantic" models, or "json-schema" | typescript |
| method | No | Only requests with this HTTP method | |
| requestIds | No | Use exactly these requests instead of the latest ones | |
| endpointSlug | Yes | The endpoint slug |