Webhooks in the Fern Definition
In Fern, you can specify webhooks in your API definition. The webhooks will be included in both the generated SDKs and the API documentation.
Webhook definition
Each webhook defines:
- Method: The HTTP Method that the webhook will use (either
GET
orPOST
) - Headers: The headers that the webhook will send
- Payload: The schema of the webhook payload
webhooks.yml
Inlined payloads
You can inline the schema of the payload by doing the following:
webhooks.yml