Skip to content

API Reference

This is a reference document demonstrating the API documentation format.

Returns a list of users.

Response:

{
"users": [
{ "id": 1, "name": "John" },
{ "id": 2, "name": "Jane" }
]
}

Creates a new user.

Request Body:

{
"name": "string",
"email": "string"
}

Response:

{
"id": 3,
"name": "New User",
"email": "user@example.com"
}

All API requests require authentication via Bearer token.

Terminal window
curl -H "Authorization: Bearer <token>" https://api.example.com/users
CodeDescription
400Bad Request
401Unauthorized
404Not Found
500Internal Server Error