For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog inStart for free
  • Overview
    • What is an API definition?
    • Project structure
      • Overview
      • Overlays
      • Overrides
      • Authentication
      • Servers
      • Sync your specification
        • HTTP JSON endpoints
        • Webhooks
        • Multipart form uploads
        • Server-sent events
      • generators.yml reference
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
Book a demoLog inStart for free
On this page
  • Examples
OpenAPIEndpoints

HTTP JSON Endpoints

Document HTTP JSON APIs with the application/json content type

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Sync your OpenAPI specification

Next

Webhooks

Endpoints in OpenAPI are defined underneath the paths key. Below is an example of defining a single endpoint:

openapi.yml
1paths:
2 /pets:
3 post:
4 summary: Create a new pet
5 description: Creates a new pet with the provided information
6 requestBody:
7 required: true
8 content:
9 application/json:
10 schema:
11 $ref: '#/components/schemas/Pet'
12 responses:
13 '200':
14 description: User created successfully
15 content:
16 application/json:
17 schema:
18 $ref: '#/components/schemas/Pet'

Examples

You can provide examples of requests and responses by using the examples key.

openapi.yml
1paths:
2 /pets:
3 post:
4 summary: Create a new pet
5 description: Creates a new pet with the provided information
6 requestBody:
7 required: true
8 content:
9 application/json:
10 schema:
11 $ref: '#/components/schemas/Pet'
12 examples:
13 PetExample:
14 summary: This is an example of a Pet
15 value:
16 name: Markley
17 id: 44
18 responses:
19 '200':
20 description: A Pet object
21 content:
22 application/json:
23 schema:
24 $ref: '#/components/schemas/Pet'
25 examples:
26 PetExample:
27 summary: This is an example of a Pet
28 value:
29 name: Markley
30 id: 44