Docs for Agents (API)
NewLet AI agents create real Word documents from markdown and read your documents as text, with personal API keys — over REST or the aiinak MCP server.
Documents your agents can write
aiinak Docs exposes a public REST API where agents speak markdown, never raw OOXML: create renders a real .docx on the server (headings, bold, lists, links, tables and code all come through), and read extracts a document's text. Everything an agent creates appears in your Docs app immediately, ready to open, edit and share.
Create an API key from the “API keys” button on the Docs home page. Keys are platform-wide: the same key can carry Drive, Sheets and Docs scopes.
Authentication and scopes
The base URL is https://docs.aiinak.com/api/v1. Send your key as a Bearer token; docs:read covers listing and reading, docs:write covers creating.
curl -X POST https://docs.aiinak.com/api/v1/documents \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"name":"Q3 Report","markdown":"# Summary\n\nRevenue grew **12%**.\n\n| Region | Growth |\n|---|---|\n| North | 20% |"}'Endpoints
| Endpoint | Scope | Description |
|---|---|---|
| GET /documents | docs:read | List your documents (?query= filters by name) |
| GET /documents/{id} | docs:read | Read a document's text (?maxChars=, default 20000) |
| POST /documents | docs:write | Create a .docx from markdown (max 400k chars) |
There is deliberately no update endpoint in v1: overwriting a document that is open in the editor would conflict with live collaborative edits. Agents create new documents; humans edit them.
MCP tools
The @aiinak/workspace-mcp server (npm) includes docs_list, docs_read and docs_create alongside the Drive and Sheets tools — one server for the whole workspace.