Docs

Generate Docs

POST
Generate a documentation website for your API

Request

This endpoint expects an object.
url
unionRequired
navigation
unionRequired
colors
objectOptional
apis
list of objectsOptional
layout
objectOptional

Response

This endpoint returns an object
generationID
UUID
The ID of the generation request. Use this ID to check the status of the generation request.
status
enum
The status of the generation request.
Allowed values: pendinggeneratingcompleted
POST
1curl -X POST https://api.buildwithfern.com/docs/generate \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "url": {
6 "type": "customDomain",
7 "value": "https://docs.petstore.com"
8 },
9 "navigation": {
10 "type": "unversioned",
11 "value": {
12 "type": "untabbed",
13 "value": [
14 {
15 "type": "section",
16 "contents": [
17 {
18 "type": "page",
19 "contents": "Welcome to the Petstore API documentation.",
20 "title": "Overview",
21 "slug": "overview"
22 }
23 ],
24 "title": "Introduction"
25 }
26 ]
27 }
28 }
29}'
200
Successful
1{
2 "generationID": "123e4567-e89b-12d3-a456-426614174000",
3 "status": "pending"
4}