Turink Document Controller API
The document-controller API from Turink — 8 operation(s) for document-controller.
The document-controller API from Turink — 8 operation(s) for document-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-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 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-controller
paths:
/api/v1/documents:
post:
tags:
- document-controller
description: No credential needed. Called with an API key, the key needs scope `documents:write`.
operationId: upload
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: array
items:
type: string
format: binary
images:
type: array
items:
type: string
format: binary
title:
type: string
password:
type: string
viewerStyle:
type: string
groupId:
type: integer
format: int64
required:
- file
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseDocumentCode'
security:
- {}
- apiKey: []
summary: Upload
x-summary-source: derived
/api/v1/documents/{docCode}/update:
post:
tags:
- document-controller
description: No credential needed. Called with an API key, the key needs scope `documents:write`.
operationId: update_1
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
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
images:
type: array
items:
type: string
format: binary
title:
type: string
password:
type: string
clearPassword:
type: boolean
default: false
viewerStyle:
type: string
notesOnReplace:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseDocumentCode'
security:
- {}
- apiKey: []
summary: Update 1
x-summary-source: derived
/api/v1/documents/{docCode}/group:
post:
tags:
- document-controller
description: Requires API key scope `documents:write`.
operationId: moveToGroup
parameters:
- name: docCode
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GroupAssignRequest'
required: true
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseVoid'
security:
- apiKey: []
summary: Move to group
x-summary-source: derived
/api/v1/documents/{docCode}/delete:
post:
tags:
- document-controller
description: No credential needed. Called with an API key, the key needs scope `documents:write`.
operationId: delete_2
parameters:
- name: docCode
in: path
required: true
schema:
type: string
- name: X-Document-Password
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseVoid'
security:
- {}
- apiKey: []
summary: Delete 2
x-summary-source: derived
/api/v1/documents/bulk:
post:
tags:
- document-controller
description: Requires API key scope `documents:write`.
operationId: uploadBulk
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
files:
type: array
items:
type: string
format: binary
password:
type: string
viewerStyle:
type: string
groupId:
type: integer
format: int64
required:
- files
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseBulkUploadResult'
security:
- apiKey: []
summary: Upload bulk
x-summary-source: derived
/api/v1/documents/{docCode}:
get:
tags:
- document-controller
description: No credential needed. Called with an API key, the key needs scope `documents:read`.
operationId: view
parameters:
- name: docCode
in: path
required: true
schema:
type: string
- name: X-Document-Password
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseDocumentView'
security:
- {}
- apiKey: []
summary: View
x-summary-source: derived
/api/v1/documents/{docCode}/raw:
get:
tags:
- document-controller
description: No credential needed. Called with an API key, the key needs scope `documents:read`.
operationId: raw
parameters:
- name: docCode
in: path
required: true
schema:
type: string
- name: X-Document-Password
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
text/markdown;charset=UTF-8:
schema:
type: string
security:
- {}
- apiKey: []
summary: Raw
x-summary-source: derived
/api/v1/documents/{docCode}/meta:
get:
tags:
- document-controller
description: No credential needed. Called with an API key, the key needs scope `documents:read`.
operationId: meta
parameters:
- name: docCode
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseDocumentMeta'
security:
- {}
- apiKey: []
summary: Meta
x-summary-source: derived
components:
schemas:
ApiResponseBulkUploadResult:
type: object
properties:
resultCode:
type: string
message:
type: string
pagination:
$ref: '#/components/schemas/Pagination'
data:
$ref: '#/components/schemas/BulkUploadResult'
Pagination:
type: object
properties:
totalItemCount:
type: integer
format: int64
pageItemCount:
type: integer
format: int32
pageNo:
type: integer
format: int32
BulkItemResult:
type: object
properties:
fileName:
type: string
success:
type: boolean
docCode:
type: string
resultCode:
type: string
message:
type: string
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'
DocumentView:
type: object
properties:
docCode:
type: string
title:
type: string
fileName:
type: string
hasPassword:
type: boolean
viewerStyle:
type: string
createdAt:
type: string
format: date-time
notesAllowed:
type: boolean
owner:
type: boolean
content:
type: string
imageToken:
type: string
GroupAssignRequest:
type: object
properties:
groupId:
type: integer
format: int64
Replaced:
type: object
properties:
path:
type: string
url:
type: string
ApiResponseDocumentMeta:
type: object
properties:
resultCode:
type: string
message:
type: string
pagination:
$ref: '#/components/schemas/Pagination'
data:
$ref: '#/components/schemas/DocumentMeta'
DocumentMeta:
type: object
properties:
docCode:
type: string
title:
type: string
fileName:
type: string
hasPassword:
type: boolean
viewerStyle:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
ApiResponseVoid:
type: object
properties:
resultCode:
type: string
message:
type: string
pagination:
$ref: '#/components/schemas/Pagination'
data: {}
BulkUploadResult:
type: object
properties:
total:
type: integer
format: int32
succeeded:
type: integer
format: int32
results:
type: array
items:
$ref: '#/components/schemas/BulkItemResult'
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
ApiResponseDocumentView:
type: object
properties:
resultCode:
type: string
message:
type: string
pagination:
$ref: '#/components/schemas/Pagination'
data:
$ref: '#/components/schemas/DocumentView'
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