Skip to content
scsiwygest. โ€˜26
Sign in
get startedmcpcommunityapiplaygroundswaggersign insign up

ยง Docs ยท REST reference

The whole API,
one request at a time.

Most creators use the MCP server โ€” it gives your IDE full access without touching a single endpoint. But the REST API is there for scripts, CI/CD, and programmatic publishing.

ยง I โ€” Authentication

Bearer tokens

Write endpoints require an Authorization header. Get your token from the account page. Read endpoints are public.

Authorization: Bearer YOUR_TOKEN_HERE

ยง II โ€” Post format

JSON payload

{
  "slug": "my-post-slug",
  "title": "Post Title",
  "body": "# Markdown\n\nFull markdown body.",
  "tags": ["tag1", "tag2"],
  "visibility": "public",
  "images": [
    { "id": "img1", "name": "photo.jpg", "data": "data:image/jpeg;base64,..." }
  ]
}
  • slug โ€” URL-safe identifier, unique per blog
  • body โ€” Markdown (GFM supported)
  • visibility โ€” public or journal (Pro only)
  • images โ€” base64 data URIs, self-contained in JSON
  • date โ€” ISO 8601, defaults to now. Use for backdating.
  • draft: true โ€” saves without publishing

ยง III โ€” Endpoints

All routes

GET/api/sites

Platform directory โ€” all public sites. No auth.

curl https://scsiwyg.com/api/sites
POST/api/sites

Create a new blog. Auth required.

curl -X POST https://scsiwyg.com/api/sites \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"username": "myname", "title": "My Blog"}'
GET/api/{username}

Site info and published posts. Public.

curl https://scsiwyg.com/api/myname
PATCH/api/{username}

Update blog settings โ€” title, bio, theme, newsletter, community mode. Auth required.

curl -X PATCH https://scsiwyg.com/api/myname \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"theme":"ocean","themeOverrides":{"link":"#ff6600"}}'
GET/api/{username}/posts

List published posts. Public.

curl https://scsiwyg.com/api/myname/posts
POST/api/{username}/posts

Publish a new post. Auth required. Publishes immediately unless draft: true.

curl -X POST https://scsiwyg.com/api/myname/posts \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"slug":"hello","title":"Hello","body":"# Hi","visibility":"public"}'
GET/api/{username}/posts/{slug}

Get a single post with full body. Public.

curl https://scsiwyg.com/api/myname/posts/hello
PUT/api/{username}/posts/{slug}

Update a post. Send only changed fields. Auth required.

curl -X PUT https://scsiwyg.com/api/myname/posts/hello \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title": "Updated title"}'
DELETE/api/{username}/posts/{slug}

Permanently delete a post. Auth required.

curl -X DELETE https://scsiwyg.com/api/myname/posts/hello \
  -H "Authorization: Bearer $TOKEN"
POST/api/{username}/posts/{slug}/view

Track a post view. Public. Deduplicates by visitor within 24 hours.

curl -X POST https://scsiwyg.com/api/myname/posts/hello/view
GET/api/{username}/contributors

List contributors. Shows community mode status. Public.

curl https://scsiwyg.com/api/myname/contributors
POST/api/{username}/contributors

Add a contributor by email. Auth required, site owner only.

curl -X POST https://scsiwyg.com/api/myname/contributors \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email": "collaborator@example.com"}'
POST/api/subscribers

Subscribe an email to a site newsletter. Public. Rate limited 10/hour.

curl -X POST https://scsiwyg.com/api/subscribers \
  -H "Content-Type: application/json" \
  -d '{"email":"reader@example.com","siteId":"SITE_ID"}'
GET/api/subscribers

List subscribers for a site. Auth required (site owner).

curl "https://scsiwyg.com/api/subscribers?username=myname" \
  -H "Authorization: Bearer $TOKEN"
GET/api/newsletter/send-status

Poll newsletter send status. Auth required.

curl "https://scsiwyg.com/api/newsletter/send-status?slug=hello" \
  -H "Authorization: Bearer $TOKEN"
GET/api/analytics

Site analytics โ€” views, top posts, referrers, daily trends. Pro plan, session auth.

curl https://scsiwyg.com/api/analytics?days=30
GET/api/openapi.json

OpenAPI 3.1 spec โ€” machine-readable, for AI tools and Swagger UI.

curl https://scsiwyg.com/api/openapi.json

ยง IV โ€” Rate limits

Limits & quotas

Free tier60 req/min
Pro tier600 req/min
Max post body500 KB
Max image size5 MB per image (base64)
Max images per post20