Appearance
API template
One API surface: an HTTP endpoint, a serverless function, an IPC or Tauri command, a scheduled job trigger, or a third-party API this repository consumes. Lives at docs/repos/<repo>/apis/<page-slug>.md.
Generated by npm run new:page -- <repo> api <page-slug> "<Title>".
Template
md
---
title: "{{title}}"
description: "TODO: One sentence on what this API does."
status: draft
---
# {{title}}
TODO: One-sentence summary of the API.
| Field | Value |
| --- | --- |
| Method / kind | TODO: GET / POST / command / cron / webhook |
| Path or name | `TODO` |
| Auth | TODO: none / session / token / secret |
| Runtime | TODO: where it runs |
| Source | `TODO: path/to/handler` |
## Purpose
TODO: What the API is for and who calls it.
## Inputs / Parameters
### Path and query parameters
| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| TODO | path / query / header | TODO | TODO | TODO |
### Request body
```json
{
"TODO": "TODO"
}
```
## Outputs / Return value
### Success
```json
{
"TODO": "TODO"
}
```
### Errors
| Status / code | When | Body |
| --- | --- | --- |
| TODO | TODO | TODO |
## Usage
```bash
# TODO: example request
curl -X TODO "TODO"
```
## Implementation
TODO: Add implementation details/code. Cover validation, the main steps,
caching, and what it calls downstream.
## Architecture
TODO: Add diagram or Mermaid diagram.
```mermaid
sequenceDiagram
participant C as TODO: Client
participant A as {{title}}
participant D as TODO: Downstream
C->>A: TODO: request
A->>D: TODO: call
D-->>A: TODO: result
A-->>C: TODO: response
```
## Dependencies
| Dependency | Kind | Why it's needed |
| --- | --- | --- |
| TODO | internal / external / secret | TODO |
## Edge cases
- TODO: Rate limits, timeouts, retries, idempotency, large payloads, partial
failure.
## Related components
- TODO: Links to the components, functions or modules that call or implement
this API.Placeholders
text
{{title}} Page title, usually the method + path or command name