# PostMD > PostMD publishes a markdown file as a web page at its own address. You upload a > `.md` file, receive a document code, and hand out the link. Publishing needs no > account. A document can also carry a graph an agent built from reading it, which > the viewer draws. The HTTP API does everything the browser screens > do, so an agent can drive the whole service. This file is a map, not a manual. Each row below names where something is written down, so a single page usually answers a single question. ## What you can do | You want to | Go to | |---|---| | Publish a file and hand someone a link | `POST /api/v1/documents`, the file as `multipart/form-data` — no account, no key | | Publish several files in one request | [/docs/api](/docs/api), "Upload several documents at once" | | Read a document you have a code or a URL for | `GET /api/v1/documents/{docCode}/raw` for the markdown; the same path without `/raw`, or `/meta`, for the title, the dates and whether it has a password | | Change or delete a document | [/docs/api](/docs/api), "Update a document" and "Delete a document" | | Revise a document without readers seeing the change until it is ready | [/docs/api](/docs/api), "Edit mode". The server holds a working copy and readers see it only once it is applied — by the person watching the viewer, or by you when that is what they asked for | | Visualise a document, or show its structure — a graph, a diagram, a map, an outline, a mind map (시각화, 구조화, 도식, 문서 그래프) | [/docs/graph](/docs/graph). What an agent puts together from reading the document — its parts, the things it names and how they relate, anchored to its headings — stored inside the document and drawn by the viewer. Unlike a mermaid block, which is part of what the author wrote, and unlike a picture made beside the conversation | | Publish a file together with the pictures it shows from your computer | [/docs/api](/docs/api), "Images from your computer" — the pictures go in the same upload and their local paths become web addresses; needs an account | | Set a reader password, or change the viewer theme | [/docs/api](/docs/api), "Upload a document" — `password` and `viewerStyle` are form fields on upload and on update | | Sort your own documents into groups | [/docs/api](/docs/api), "Groups"; moving one is "Move a document to another group", under Documents | | Leave notes or highlights on a document | [/docs/api](/docs/api), "Notes" — needs an account | | Own documents rather than publish them anonymously | [/docs/api](/docs/api), "Account and API keys" | | Know the rules: who may edit, how long a document is kept | [/docs/service](/docs/service) | | Find out what changed and when | [/docs/changelog](/docs/changelog) | | Do all of this repeatedly, as registered tools | MCP. Hosted at `https://postmd.turink.com/mcp` needs no install and covers publishing, reading, updating and deleting. `npx -y postmd-mcp-server` runs locally and adds the tools that need an API key, plus reading a file from the machine it runs on | ## Publish The first row of that table in full, because it is the one thing that needs no reading at all. ``` curl -F file=@report.md https://postmd.turink.com/api/v1/documents ``` `file` is the only required field, sent as `multipart/form-data`. `title`, `password`, `viewerStyle` and `groupId` are optional and go in the same form. ``` {"resultCode":"200","data":{ "docCode":"P-123-456-789", "shareUrl":"https://postmd.turink.com/share/P-123-456-789", "viewerUrl":"https://postmd.turink.com/d/P-123-456-789", "anonymous":true, "retainedUntil":"2026-10-20T05:03:59Z"}} ``` Hand the person `shareUrl`; nothing needs assembling. Without a credential the document has no owner, so anyone holding `docCode` can update or delete it unless you set a `password`. Retention and permissions are in [/docs/service](/docs/service). ## Docs - [Service overview](/docs/service): What PostMD is, what it can do, and things to know before integrating. - [API reference](/docs/api): Endpoints, authentication, request/response format and error codes. - [Document graphs](/docs/graph): Visualising a document as a map of itself: its parts, how they relate, anchored to its headings and drawn by the viewer. - [Changelog](/docs/changelog): Notable changes to the service and its API. Each document opens by saying what it covers and what it does not. ## Conventions - Base URL `/api/v1`. Machine-readable spec at [/api-docs](/api-docs). - JSON answers share one envelope: `{ resultCode, message, data }`. Branch on `resultCode`; `200` means success. `message` is always English. It carries the reason a call failed, and on a few successful calls a fact the caller needs. - One endpoint breaks that envelope. `GET /api/v1/documents/{docCode}/raw` returns the markdown file itself. - A document code makes two addresses. `/d/{docCode}` is the viewer a reader opens. `/share/{docCode}` is the one to hand out, because it carries the title into link previews. Both come back from the upload answer. - A file can keep the code of the document it was published as, in a `postmd:document` comment at its top. The format is in [/docs/api](/docs/api), "Keeping the code in the file". - An API key goes in `Authorization: Bearer pmk_...`. A member issues it in the web app; it is not something an agent can create for itself. - [robots.txt](/robots.txt) governs crawling for indexes and training corpora. It places no restriction on calling the API, which is what the service is for.