API Documentation

Create clear API documentation with this Markdown template. Define endpoints, parameters, authentication methods, and response examples for developers.

Markdown
# API Documentation: User Service

## ๐Ÿ”‘ Authentication
Include the `Authorization: Bearer <token>` header in all requests.

## ๐Ÿ‘ค Get User Profile
`GET /api/v1/users/:id`

### Parameters
| Name | Type | Description |
| :--- | :--- | :--- |
| id | string | The unique user ID |

### Response
```json
{
  "status": "success",
  "data": {
    "username": "johndoe",
    "email": "john@example.com"
  }
}
```
Preview

API Documentation: User Service

๐Ÿ”‘ Authentication

Include the Authorization: Bearer <token> header in all requests.

๐Ÿ‘ค Get User Profile

GET /api/v1/users/:id

Parameters

NameTypeDescription
idstringThe unique user ID

Response

{
  "status": "success",
  "data": {
    "username": "johndoe",
    "email": "john@example.com"
  }
}

How to use this template

  1. 1

    Copy the Markdown

    Click the Copy button above to put the full template on your clipboard.

  2. 2

    Paste into your editor

    Paste into VS Code, Obsidian, the mdkit editor, or any Markdown editor. The template renders cleanly in any GFM-compatible viewer.

  3. 3

    Fill in your content

    Replace the placeholder text with your own. Delete sections you don't need โ€” the template is a starting point, not a contract.

  4. 4

    Export or share

    Commit to Git, export to HTML or PDF, or paste into your team's wiki.

What it solves

API documentation bridges the gap between backend logic and frontend (or third-party) consumption. It solves the frustration of 'guessing' how an API works by providing a clear contract of endpoints, parameters, and expected responses.

Key features

  • Authentication methods (e.g., Bearer Token)
  • Detailed endpoint definitions (GET, POST, etc.)
  • Parameter tables with types and descriptions
  • JSON response examples for success and error states

Pro tips

  • โ€บKeep your examples copy-paste friendly.
  • โ€บDocument common error codes (400, 401, 404, 500) and their meanings.
  • โ€บUse tools like Swagger or Postman, but keep a Markdown version for quick reference in the repo.

Related templates