The Marked Share API
The Marked Share API
Marked Share is built API-first. The same HTTP endpoints powering the Marked desktop app and the web frontend are available for your own scripts, Raycast extensions, Alfred workflows, and automated publishing pipelines.
Authentication and Endpoints
The API is located at https://share.markedapp.com/api/v1.
Requests require an API Token and write operations require an X-Device-Key header:
Authorization: Bearer <your_api_token>
X-Device-Key: <your_device_key>
Tokens and device keys can be created in your account settings.
Core Capabilities
1. Document Management
-
List & Search:
GET /documents?q=query&limit=25supports full-text ranked search and pagination headers (X-Total-Count,Link). -
Create Documents:
POST /documentsaccepts either raw JSON withbody_markdown,title,visibility, andcollection_slug, or multipart TextPack archives (.textpack/.zip). -
Update Documents:
PATCH /documents/:idupdates content safely withIf-Match: <content_hash>optimistic concurrency locking. -
Export TextPacks:
GET /documents/:id/textpackdownloads the complete document bundle with images and metadata.
2. Highlight Sets and Reviews
-
Retrieve Annotations:
GET /documents/:id/highlight_setslists all reader highlight sets on your documents. -
Import Highlights:
POST /documents/:id/highlight_sets/:set_id/importmerges a reviewer’s feedback into your personal highlight set.
3. Collections
-
List Collections:
GET /collectionsreturns all collections, their display modes, and custom domains. -
Inspect Collection:
GET /collections/:id?include=documentslists collection metadata and member posts.
4. Cross-Publishing
-
Micro.blog:
POST /documents/:id/microblogtriggers immediate Micropub syndication withformat: "full"orformat: "excerpt".
Automating Your Workflow
Because Marked Share accepts standard Markdown over a clean REST API, you can easily integrate it into your existing tools:
curl -X POST https://share.markedapp.com/api/v1/documents \
-H "Authorization: Bearer $MARKED_API_TOKEN" \
-H "X-Device-Key: $MARKED_DEVICE_KEY" \
-H "Content-Type: application/json" \
-d '{
"document": {
"title": "My Post",
"body_markdown": "# Hello World\nPublished via curl.",
"visibility": "public",
"collection_slug": "marked-share"
}
}'
With simple API primitives, you can publish from anywhere, script backups, and build custom workflows tailored to your writing habits.