Use MDShare as a lightweight anonymous Markdown publishing backend.
https://share.yekyos.com/s/{slug}/e/{slug}#edit={token} or /e/{slug}#manage={token}ownerToken or editorToken unless the user explicitly wants those links.Send POST /api/shares with JSON:
{
"markdownContent": "# Title\n\nBody",
"expiresInHours": 24,
"password": "",
"burnMode": "OFF",
"editableMode": "READ_ONLY"
}
Rules:
expiresInHours should normally be one of 1, 24, 168, 720.burnMode values:OFFAFTER_FIRST_VIEW_GRACEAFTER_FIRST_VIEW_INSTANTeditableMode values:READ_ONLYEDIT_LINKReturn these links to the user:
{baseUrl}/s/{slug}{baseUrl}/e/{slug}#manage={ownerToken}editorToken exists, {baseUrl}/e/{slug}#edit={editorToken}Example using the default deployment:
https://share.yekyos.com/s/abc123xyhttps://share.yekyos.com/e/abc123xy#manage=https://share.yekyos.com/e/abc123xy#edit=Call GET /api/shares/{slug}/public.
Possible states:
available: content is returnedgated: password and/or confirm-view is requiredexpiredburneddeletednot_foundIf the state is gated, ask for the password only when needed and explain burn-after-read before confirming access.
Send POST /api/shares/{slug}/public with JSON:
{
"password": "optional-password",
"confirmView": true
}
Use confirmView: true when the service says burn confirmation is required.
Use header:
x-share-token: <token>
Call GET /api/shares/{slug}/manage to inspect the current share and role.
Send PATCH /api/shares/{slug}/manage with header x-share-token and JSON:
{
"markdownContent": "# Updated\n\nContent",
"lastKnownUpdatedAt": "2026-03-12T00:00:00.000Z",
"force": false
}
If the API returns 409 with conflict: true, do not overwrite silently. Summarize the conflict and ask whether to force-save.
Owner token only. Send PATCH /api/shares/{slug}/settings with JSON:
{
"expiresInHours": 168,
"password": "",
"burnMode": "OFF",
"editableMode": "READ_ONLY"
}
If the response includes a new editorToken, regenerate the edit link.
Owner token only. Call DELETE /api/shares/{slug}/manage with x-share-token.
expiresInHours: 168burnMode: OFFeditableMode: READ_ONLY共 1 个版本