Paper Studio
Back to home

API Documentation

Use the Paper Studio API to programmatically publish markdown documents as beautiful web pages.

Authentication

All API requests require an API key. Get your API key from the Dashboard.

Include your API key in the Authorization header:

Authorization: Bearer ps_your_api_key_here

Base URL

https://paperstudio.ink/api/v1

Publish Document

POST /publish

Convert markdown to a beautifully styled web document. Your brand settings are automatically applied.

Request Body

{
  "markdown": "# Your Document\n\nYour content here...",
  "title": "Optional custom title",
  "password": "optional-password",
  "slug": "existing-slug-to-update"
}
ParameterTypeRequiredDescription
markdownstringYesThe markdown content to convert (max 2MB)
titlestringNoCustom title (defaults to first heading)
passwordstringNoPassword protect the document
slugstringNoUpdate existing document instead of creating new

Response

{
  "success": true,
  "slug": "abc123xy",
  "url": "/abc123xy",
  "title": "Your Document Title",
  "protected": false,
  "created": true
}
FieldDescription
successWhether the operation succeeded
slugThe unique document identifier
urlRelative URL path to the document
titleThe document title
protectedWhether the document is password protected
created / updatedWhether this was a new document or an update

Example Request

curl -X POST https://paperstudio.ink/api/v1/publish \
  -H "Authorization: Bearer ps_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# Q4 Report\n\n## Summary\n\nGreat quarter!",
    "title": "Q4 2024 Report"
  }'

Read Document

GET /read?slug=your-slug

Retrieve the source markdown of a published document. The document owner must enable markdown export for this to work.

Query Parameters

ParameterTypeRequiredDescription
slugstringYesThe document slug or handle-based URL
passwordstringNoRequired for password-protected documents

Authentication

Authentication depends on the document's access level:

Document TypeAuth Required
PublicNone
Password-protected?password=xxx
Exclusive (PS Members)API key (any user)
Exclusive (Pro Members)API key (active subscriber)
Exclusive (Invited Members)API key (on member list)

Document owners always have access via their API key regardless of access level.

Response

Returns raw markdown with Content-Type: text/markdown.

Example

# Public document
curl https://paperstudio.ink/api/v1/read?slug=abc123xy

# With API key (for exclusive content)
curl https://paperstudio.ink/api/v1/read?slug=abc123xy \
  -H "Authorization: Bearer ps_your_api_key"

# Password-protected document
curl "https://paperstudio.ink/api/v1/read?slug=abc123xy&password=secret"

Rate Limits

Free tier: 50 documents per day

Rate limits reset at midnight UTC.

Error Codes

StatusDescription
400Bad request - missing or invalid parameters
401Unauthorized - invalid or missing API key
403Forbidden - you don't own this document, or markdown export is disabled
404Not found - document doesn't exist
413Payload too large - document exceeds 2MB
429Too many requests - rate limit exceeded
500Server error - something went wrong

Supported Features

  • Standard markdown (headings, lists, tables, links, images)
  • Mermaid diagrams (flowcharts, pie charts, etc.)
  • HTTPS images (automatically embedded)
  • Your brand colors and fonts
  • Custom styling instructions
  • Password protection

Ready to get started?

Create an account and get your API key to start publishing documents.