OpenAPI
You can sync GitBook pages with an OpenAPI or Swagger file or a URL to include auto-generated API methods in your documentation.
OpenAPI block
GitBook's OpenAPI block is powered by Scalar, so you can test your APIs directly from your docs.
Create a new user
POST /users
<Description of the endpoint>
Headers
Name
Value
Content-Type
application/json
Authorization
Bearer <token>
Body
Name
Type
Description
name
string
Name of the user
age
number
Age of the user
Response
{
"id": 1,
"name": "John",
"age": 30
}{
"error": "Invalid request"
}Last updated