REST API
Access your Meldoc workspace programmatically through the REST API.
The REST API lets you read documents, push updates, and manage assets from any HTTP client — the same operations available through the Meldoc CLI and Meldoc MCP, but as plain HTTP requests. Build custom integrations, automate documentation updates, or sync content between Meldoc and other systems.
Base URL
https://api.meldoc.io/api/v1/
Authentication
Every request requires two headers:
X-Cli-Secret — your Integration Tokens (mdc_...).
X-Project-Alias — the alias of the project you’re operating on.
Note: A token’s effective permissions are capped by what its creator may do on that project. A token cannot do more than its creator can.
Endpoints at a Glance
Documents
| Method | Path | Description | Role |
|---|---|---|---|
| GET | /api/v1/tree |
Get document tree | Read |
| GET | /api/v1/doc?alias=... |
Get a single document | Read |
| POST | /api/v1/docs/batch |
Get multiple documents | Read |
| POST | /api/v1/pull |
Incremental pull with cursor | Read |
| POST | /api/v1/push |
Push documents | Write |
| DELETE | /api/v1/docs |
Delete documents | Write and Delete |
| POST | /api/v1/docs/archive |
Archive a document and its live descendants | Write |
| POST | /api/v1/docs/unarchive |
Take one document back out of the archive | Write |
Document types
| Method | Path | Description | Role |
|---|---|---|---|
| GET | /api/v1/templates |
List the project’s document types | Read |
Links
| Method | Path | Description | Role |
|---|---|---|---|
| POST | /api/v1/links |
Process document links | Write |
Assets
| Method | Path | Description | Role |
|---|---|---|---|
| POST | /api/v1/assets/exists |
Check if assets exist | Read |
| POST | /api/v1/assets/upload |
Upload an asset | Write |
| POST | /api/v1/docs/:docId/assets/bindings |
Bind assets to a document | Write |
| GET | /api/v1/docs/:docId/assets |
List document assets | Read |
Errors
All errors return JSON with an error field:
{
"error": "alias query parameter is required"
}
400 — invalid parameters or request body. 401 — missing or invalid token. 403 — insufficient token role, workspace blocked, or plan limit reached. 404 — document or resource not found. 429 — rate limit exceeded. 500 — server error.
Rate Limiting
Rate limits apply per token based on your workspace plan. When you exceed the limit, the API returns HTTP 429. Implement exponential backoff in your client.
In This Section
API Quick Start — Make your first API call in under 5 minutes.
Endpoint Reference — Complete endpoint reference with request and response examples.