Base URL: https://with.md
Use this API when an agent needs to:
- publish markdown for a human,
- wait for human edits in the browser,
- retrieve or update markdown programmatically.
Creates a new anonymous share.
Request JSON:
{
"content": "# Title\n\nBody",
"title": "Optional title",
"filename": "optional-name.md"
}Response 201:
{
"ok": true,
"shareId": "abc123xy",
"viewUrl": "https://with.md/s/abc123xy",
"rawUrl": "https://with.md/s/abc123xy/raw",
"editUrl": "https://with.md/s/abc123xy?edit=...",
"editSecret": "...",
"expiresAt": null
}Notes:
editSecretis required for later updates.- Max content size is 1 MB.
- Shares do not expire.
Fetches current markdown and metadata.
Response 200:
{
"ok": true,
"shareId": "abc123xy",
"title": "Shared Document",
"filename": "shared-document.md",
"content": "# Title\n\nBody",
"version": "sha256...",
"sizeBytes": 123,
"createdAt": 1772000000000,
"updatedAt": 1772001000000,
"expiresAt": null
}Updates content for an existing anonymous share.
Request JSON:
{
"editSecret": "...",
"content": "# Updated\n\nBody",
"title": "Optional new title",
"ifMatch": "sha256..."
}Notes:
ifMatchis optional optimistic concurrency.- You can also send
If-Match: "sha256..."header. - If expected version mismatches, API returns
409.
Repo-share links are created by authenticated users via UI/server APIs. Agents can read and edit via these public endpoints once they have token + edit secret.
Returns markdown for a repo-backed shared document.
Response 200:
{
"ok": true,
"token": "token",
"shareId": "token",
"title": "README",
"filename": "readme.md",
"path": "docs/readme.md",
"content": "# ...",
"version": "sha256...",
"sizeBytes": 1024,
"updatedAt": 1772001000000,
"expiresAt": null,
"viewUrl": "https://with.md/r/token",
"rawUrl": "https://with.md/r/token/raw"
}Updates a repo-shared document with the edit secret.
Request JSON:
{
"editSecret": "...",
"content": "# Updated\n\nBody",
"ifMatch": "sha256..."
}Response 200:
{
"ok": true,
"token": "token",
"shareId": "token",
"path": "docs/readme.md",
"title": "README",
"filename": "readme.md",
"version": "sha256...",
"updatedAt": 1772001000000,
"sizeBytes": 1024,
"shareUrl": "https://with.md/r/token",
"rawUrl": "https://with.md/r/token/raw"
}- Anonymous shares:
GET /s/:shareId/raw - Repo shares:
GET /r/:token/raw
These return plain text markdown for programmatic clients.
400invalid request body or missing required fields.403invalid edit secret.404share not found.409version mismatch (ifMatchfailed).413payload too large (>1 MB).429rate limited.