Sync API Technical Specification
Summary
The Sync API publishes a Markdown document to a private archive without sending the source to a conversion service. This note freezes the version 1.2 contract: fields, errors, and the print theme names.
Error model
Clients surface a short code and a sentence a person can act on. They do not retry a local parse failure.
Goals
- Render GitHub Flavored Markdown in the browser.
- Keep nested structure intact.
- Checklist state survives a reload of the preview.
- Aligned columns stay aligned in print.
- Embed the chosen theme in the HTML download.
Non-goals
- Shared cursors.
- A plugin marketplace.
- No remote theme loader.
- Server-side conversion.
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| title | string | yes | Document heading |
| theme | enum | no | editorial, github, academic, or minimal |
| source | markdown | yes | UTF-8 source |
Example
{
"title": "Sync API",
"theme": "github"
}Tasks
- Freeze the field names
- Document the error model
- Add fixtures for nested lists
- Review the 14 mm print margin
Risks
Theme CSS has to travel inside the exported file. A link to an outside stylesheet would break offline reading.
References
Read the summary before changing a field name.
Owner: Platform writing group. Status: ready for review.