Define Webhooks in OpenAPI
Use the x-fern-webhook
extension to define webhooks in your OpenAPI spec
To define a webhook in your OpenAPI specification, add the x-fern-webhook: true
extension to your endpoint. OpenAPI 3.0.0 or higher is required. Fern will treat the requestBody
as the webhook payload.
The path that you choose when defining a webhook can be arbitrary. Since webhooks can be sent to any server, Fern just ignores the path.