HTTP/2 200
server: GitHub.com
content-type: text/html; charset=utf-8
last-modified: Thu, 25 Sep 2025 16:07:09 GMT
access-control-allow-origin: *
etag: W/"68d568ad-5f48"
expires: Fri, 10 Oct 2025 04:10:42 GMT
cache-control: max-age=600
content-encoding: gzip
x-proxy-cache: MISS
x-github-request-id: 1CE1:23832:11492E:14BF28:68E884E7
accept-ranges: bytes
age: 0
date: Fri, 10 Oct 2025 04:00:42 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210088-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1760068842.037311,VS0,VE292
vary: Accept-Encoding
x-fastly-request-id: e2fd3a32565868b1886018f1d5b21f3b71c2c0da
content-length: 4671
webhook-example | OpenAPI DocumentationFork me on GitHubSkip to main content
webhook-example
JSON
{"openapi":"3.1.0","info":{"title":"Webhook Example","version":"1.0.0"},"webhooks":{"newPet":{"post":{"requestBody":{"description":"Information about a new pet in the system","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}}},"components":{"schemas":{"Pet":{"required":["id","name"],"properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}}}}}
YAML
openapi:3.1.0info:title:Webhook Exampleversion:1.0.0# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable componentswebhooks:# Each webhook needs a namenewPet:# This is a Path Item Object, the only difference is that the request is initiated by the API providerpost:requestBody:description:Information about a new pet in the systemcontent:application/json:schema:$ref:'#/components/schemas/Pet'responses:'200':description:Return a 200 status to indicate that the data was received successfullycomponents:schemas:Pet:required:-id-nameproperties:id:type:integerformat:int64name:type:stringtag:type:string