Turink Document Edit Controller API
The document-edit-controller API from Turink — 6 operation(s) for document-edit-controller.
The document-edit-controller API from Turink — 6 operation(s) for document-edit-controller.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/turink-com:turink-com-document-edit-controller-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: PostMD Document Edit Controller API
description: 'Markdown documents published as web pages.
Publishing, reading, and changing or deleting a document that has no password need no credential. A document with a password takes it in the `X-Document-Password` header. An API key, issued from the web app and sent as `Authorization: Bearer pmk_...`, makes the documents it publishes its owner''s and is needed for groups, notes and a member''s own lists. Each operation below says which applies.
A document code forms two addresses: `/d/{docCode}` is the viewer a person opens, `/share/{docCode}` is the address to hand out because it carries the title in link previews. Neither returns the document to a caller that does not run scripts: the viewer returns a service notice and the share address a short page holding only the title. The document itself comes from `GET /api/v1/documents/{docCode}/raw`.
A document can be revised in edit mode, where the server holds a working copy that readers do not see until it is applied.
This specification covers the endpoints only. What the service can do and which page describes each thing is listed at `/llms.txt`. One capability is not an endpoint at all: a document can carry graph data inside its markdown, described at `/docs/graph`.'
version: v1
servers:
- url: https://postmd.turink.com
description: Generated server url
tags:
- name: document-edit-controller
paths:
/api/v1/documents/{docCode}/edit/takeover:
post:
tags:
- document-edit-controller
description: No credential needed. Called with an API key, the key needs scope `documents:write`.
operationId: takeover
parameters:
- name: docCode
in: path
required: true
schema:
type: string
- name: X-Document-Password
in: header
required: false
schema:
type: string
- name: X-Edit-Session
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseTakeoverResult'
security:
- {}
- apiKey: []
summary: Takeover
x-summary-source: derived
/api/v1/documents/{docCode}/edit/start:
post:
tags:
- document-edit-controller
description: No credential needed. Called with an API key, the key needs scope `documents:write`.
operationId: start
parameters:
- name: docCode
in: path
required: true
schema:
type: string
- name: X-Document-Password
in: header
required: false
schema:
type: string
- name: X-Edit-Session
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseStartResult'
security:
- {}
- apiKey: []
summary: Start
x-summary-source: derived
/api/v1/documents/{docCode}/edit/publish:
post:
tags:
- document-edit-controller
description: No credential needed. Called with an API key, the key needs scope `documents:write`.
operationId: publish
parameters:
- name: docCode
in: path
required: true
schema:
type: string
- name: notesOnReplace
in: query
required: false
schema:
type: string
- name: overwriteChanged
in: query
required: false
schema:
type: boolean
default: false
- name: X-Edit-Session
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseDocumentCode'
security:
- {}
- apiKey: []
summary: Publish
x-summary-source: derived
/api/v1/documents/{docCode}/edit/discard:
post:
tags:
- document-edit-controller
description: No credential needed. Called with an API key, the key needs scope `documents:write`.
operationId: discard
parameters:
- name: docCode
in: path
required: true
schema:
type: string
- name: X-Edit-Session
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseVoid'
security:
- {}
- apiKey: []
summary: Discard
x-summary-source: derived
/api/v1/documents/{docCode}/edit/content:
get:
tags:
- document-edit-controller
description: No credential needed. Called with an API key, the key needs scope `documents:read`.
operationId: readContent
parameters:
- name: docCode
in: path
required: true
schema:
type: string
- name: X-Edit-Session
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
text/markdown;charset=UTF-8:
schema:
type: string
security:
- {}
- apiKey: []
summary: Read content
x-summary-source: derived
post:
tags:
- document-edit-controller
description: No credential needed. Called with an API key, the key needs scope `documents:write`.
operationId: saveContent
parameters:
- name: docCode
in: path
required: true
schema:
type: string
- name: X-Edit-Session
in: header
required: false
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
images:
type: array
items:
type: string
format: binary
required:
- file
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseContentResult'
security:
- {}
- apiKey: []
summary: Save content
x-summary-source: derived
/api/v1/documents/{docCode}/edit/status:
get:
tags:
- document-edit-controller
operationId: status
parameters:
- name: docCode
in: path
required: true
schema:
type: string
- name: X-Document-Password
in: header
required: false
schema:
type: string
- name: X-Edit-Session
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseStatusResult'
summary: Status
x-summary-source: derived
components:
schemas:
ContentResult:
type: object
properties:
draftUpdatedAt:
type: string
format: date-time
expiresAt:
type: string
format: date-time
images:
$ref: '#/components/schemas/Report'
ApiResponseStartResult:
type: object
properties:
resultCode:
type: string
message:
type: string
pagination:
$ref: '#/components/schemas/Pagination'
data:
$ref: '#/components/schemas/StartResult'
Pagination:
type: object
properties:
totalItemCount:
type: integer
format: int64
pageItemCount:
type: integer
format: int32
pageNo:
type: integer
format: int32
StatusResult:
type: object
properties:
editing:
type: boolean
mine:
type: boolean
expiresAt:
type: string
format: date-time
takeoverRequested:
type: boolean
draftUpdatedAt:
type: string
format: date-time
ApiResponseStatusResult:
type: object
properties:
resultCode:
type: string
message:
type: string
pagination:
$ref: '#/components/schemas/Pagination'
data:
$ref: '#/components/schemas/StatusResult'
DocumentCode:
type: object
properties:
docCode:
type: string
shareUrl:
type: string
viewerUrl:
type: string
anonymous:
type: boolean
retainedUntil:
type: string
format: date-time
images:
$ref: '#/components/schemas/Report'
ApiResponseTakeoverResult:
type: object
properties:
resultCode:
type: string
message:
type: string
pagination:
$ref: '#/components/schemas/Pagination'
data:
$ref: '#/components/schemas/TakeoverResult'
TakeoverResult:
type: object
properties:
granted:
type: boolean
waitUntil:
type: string
format: date-time
expiresAt:
type: string
format: date-time
editSession:
type: string
Replaced:
type: object
properties:
path:
type: string
url:
type: string
ApiResponseVoid:
type: object
properties:
resultCode:
type: string
message:
type: string
pagination:
$ref: '#/components/schemas/Pagination'
data: {}
ApiResponseContentResult:
type: object
properties:
resultCode:
type: string
message:
type: string
pagination:
$ref: '#/components/schemas/Pagination'
data:
$ref: '#/components/schemas/ContentResult'
StartResult:
type: object
properties:
editSession:
type: string
expiresAt:
type: string
format: date-time
hasDraft:
type: boolean
draftUpdatedAt:
type: string
format: date-time
baseUpdatedAt:
type: string
format: date-time
ApiResponseDocumentCode:
type: object
properties:
resultCode:
type: string
message:
type: string
pagination:
$ref: '#/components/schemas/Pagination'
data:
$ref: '#/components/schemas/DocumentCode'
Report:
type: object
properties:
replaced:
type: array
items:
$ref: '#/components/schemas/Replaced'
unmatched:
type: array
items:
type: string
unused:
type: array
items:
type: string
unsupported:
type: array
items:
type: string
securitySchemes:
apiKey:
type: http
description: 'API key issued from the web app. The value starts with `pmk_` and is shown once at creation.
Scopes are independent: `documents:write` does not grant `documents:read`.'
scheme: bearer