Skip to content

Authentication Example

This is an example of how to document authentication in a clear, reusable way.

Overview

Describe the auth scheme in one short paragraph.

Request

http
POST /api/auth/login
Authorization: Bearer <token>
Content-Type: application/json

Response

json
{
  "accessToken": "eyJhbGciOi..."
}

Common errors

  • 401 Unauthorized
  • 403 Forbidden
  • 429 Too Many Requests

Notes

  • Keep auth instructions close to the request example.
  • Mention required scopes or tokens if the endpoint depends on them.
  • Use the same terms the implementation uses.

Markdown-first documentation for teams that update docs often.