Documentation

API Documentation

RESTful API documentation for developers

Quick Info
Base URL
https://api.lots.blog
Authentication

API Key (Bearer token or X-API-Key header)

Total Endpoints

28

Getting Started

Authentication

All API requests require authentication using an API key. You can create an API key from your dashboard.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.lots.blog/api/v1/lotsblog/blogs/:blog_id/domain/check

content

POST
/api/v1/lotsblog/blogs/:blog_id/domain/check

Check Domain

check_domain

Check the owned blog custom domain verification and HTTPS certificate state. Returns exact DNS records and a plain-language next step. Does not change the user DNS records.

POST
/api/v1/lotsblog/blogs/:blog_id/images/complete

Complete Image Upload

complete_image_upload

Verify the uploaded image size and magic bytes before using it in an article. Call after PUT to the URL returned by create_image_upload. Return a public CDN URL.

POST
/api/v1/lotsblog/blogs/:blog_id/domain

Connect Domain

connect_domain

Connect the blog owner custom hostname and return exact required CNAME and optional TXT DNS records. Ask the user to set records at their DNS provider, then call check_domain. Owner-only; requires a plan with custom domains. Does not change DNS automatically or replace an existing different domain.

POST
/api/v1/lotsblog/blogs/:blog_id/images/upload

Create Image Upload

create_image_upload

Prepare a local image upload without passing base64 through MCP. Return a 15-minute presigned PUT URL, headers and file_key. PUT the local bytes then call complete_image_upload. JPEG, PNG, WebP or GIF, at most 25 MB. Requires the blog owner plan and create permission. Uploaded images are public.

POST
/api/v1/lotsblog/blogs/:blog_id/images/delete

Delete Media

delete_media

Permanently delete an unused image belonging to this blog, only under the user instruction. Images referenced by article content, covers or blog appearance cannot be deleted.

POST
/api/v1/lotsblog/blogs/:blog_id/posts/:post_id/quality-check

Independent Article Review

run_post_quality_check

Optional paid article quality check requested by the user. Charges the blog owner token-based LotsTech Credits for model input and output; cost varies with article length and usage. Set authorize_charge=true for a requested paid quality check; no separate resource funding consent is required. Never guarantees rankings or gates publication. Maximum 45000 characters; unchanged-revision retries reuse execution.

GET
/api/v1/lotsblog/blogs/:blog_id/images

List Media

list_media

List a bounded page of image keys and CDN URLs for this blog. Use next_cursor to continue. Images uploaded through MCP are publicly accessible.

POST
/api/v1/lotsblog/blogs/:blog_id/posts/:post_id/unpublish

Unpublish Post

unpublish_post

Move a published or scheduled article back to a private draft under user instructions. Clears publication time and any pending schedule. The public URL stops serving the article.

billing

GET
/api/v1/lotsblog/funding

Check product funding

get_funding_status

Check plan coverage, credit funding and current capacity rates. Plan coverage is used first; capacity beyond it is paid from the owner's credits automatically, charged daily (free credits first, then plan credits, then purchased). If credits run low, give the returned settings_url so the owner can top up or choose a plan.

General

POST
/api/v1/lotsblog/blogs

Create Blog

create_blog

Create a hosted blog. A plan covers its included blogs; each extra blog costs that plan's own per-blog rate, and without a plan each blog is $9 a month. Capacity is paid from the owner's credits automatically, charged daily. Use get_funding_status for current rates and balance. If credits are insufficient, return the owner settings link so they can top up or choose a plan. Returns the blog and hosting URL.

GET
/api/v1/lotsblog/blogs/:blog_id

Get Blog Details

get_blog

Read the blog, current user role, hosting URL and private Markdown blog_guide. Call list_blogs first to select the blog. Read the guide before writing; it is optional and must not be copied into public articles.

GET
/api/v1/lotsblog/blogs

List Blogs

list_blogs

Retrieves all blogs where the authenticated user is an owner or active member. Returns blogs with the user's role in each blog (owner, admin, editor, author, user). This is useful for displaying a blog selector in the UI or for determining which blogs the user can manage. Only active blog memberships are included (status='active' in blog_users table). Blogs are returned with their access URLs (either custom domain or subdomain URL).

PATCH
/api/v1/lotsblog/blogs/:blog_id

Update Blog Settings

update_blog

Update the owned blog name, title, privacy or private Markdown blog guide. Only supplied fields change. Use connect_domain/check_domain for custom domains; appearance and team setup use the dashboard.

POST
/api/v1/lotsblog/blogs/:blog_id/images

Upload Blog Image

upload_blog_image

Upload an image from a public/signed image_url or small image_base64. For a local screenshot or larger image, prefer create_image_upload then complete_image_upload. Return the public CDN URL for featured_image in create_blog_post/update_blog_post or article Markdown. Requires the blog owner active plan and content-create permission; image URLs are public even for private blogs.

posts

POST
/api/v1/lotsblog/blogs/:blog_id/posts

Create Blog Post

create_blog_post

Create an article with Markdown content, metadata, topics and optional matching supplemental JSON-LD such as FAQPage. Defaults to a private draft. Return preview_url to the user; sign-in is required for draft preview. Publish or schedule only under explicit user instructions. Use list_topics to choose topic_ids.

DELETE
/api/v1/lotsblog/blogs/:blog_id/posts/:post_id

Delete Blog Post

delete_blog_post

Permanently delete a post and all associated data (articles, list items, polls, comments, likes, etc.). Only owner and admin roles can delete posts. CASCADE constraints will automatically remove all related data. This action cannot be undone.

GET
/api/v1/lotsblog/blogs/:blog_id/posts/:post_id

Get Blog Post

get_blog_post

Read the saved article and metadata by blog_id and post_id. Call list_blog_posts to find post IDs. Use this to verify saved content and publication status before retrying an uncertain write.

GET
/api/v1/lotsblog/blogs/:blog_id/posts/:post_id/analytics

Get Post Analytics

get_post_analytics

Read traffic and engagement analytics for an article. Select blog_id from list_blogs and post_id from list_blog_posts. Traffic is not a ranking or AI-citation measurement.

GET
/api/v1/lotsblog/blogs/:blog_id/posts

List Blog Posts

list_blog_posts

List all posts for a blog with optional filters by type, status, topic, and pagination. Returns posts ordered by creation date (newest first). Use this to display blog content, filter by draft/published status, or find posts of a specific type.

POST
/api/v1/lotsblog/blogs/:blog_id/posts/:post_id/publish

Publish Post

publish_post

Publish the saved post now, only when the user instructs publication. Select blog_id from list_blogs and post_id from list_blog_posts. Returns the saved publication status.

POST
/api/v1/lotsblog/blogs/:blog_id/posts/:post_id/schedule

Schedule Post

schedule_post

Schedule the saved post under the user instructions. Use an ISO 8601 timestamp with timezone, at least five minutes in the future. Select post_id from list_blog_posts. A scheduled status is not confirmation that the article is already live.

PATCH
/api/v1/lotsblog/blogs/:blog_id/posts/:post_id

Update Blog Post

update_blog_post

Update the existing article content, metadata, topics or publication status. Omitted fields are preserved; topic_ids=[] clears topics. Returns preview_url. Use the existing post_id rather than creating a duplicate. Publish or schedule only under user instructions.

topics

POST
/api/v1/lotsblog/blogs/:blog_id/topics

Create Topic

create_topic

Create an article topic/category in the selected blog. An explicit slug is preserved and must be unique within that blog; omit it to generate from the name. Returns the numeric topic ID for topic_ids in article create/update.

DELETE
/api/v1/lotsblog/blogs/:blog_id/topics/:topic_id

Delete Topic

delete_topic

Delete a topic/category under user instructions. Articles remain intact; their association with this topic is removed. Topics with children must be handled first. Select the numeric topic_id from list_topics.

GET
/api/v1/lotsblog/blogs/:blog_id/topics/:topic_id

Get Topic

get_topic

Retrieves details for a specific blog topic. IMPORTANT: Requires blog_id and topic_id — call list_blogs to get the blog UUID, then list_topics to get the topic_id.

GET
/api/v1/lotsblog/blogs/:blog_id/topics

List Topics

list_topics

Lists all topics/categories for a blog. IMPORTANT: Requires blog_id — call list_blogs first to get the blog UUID.

PATCH
/api/v1/lotsblog/blogs/:blog_id/topics/:topic_id

Update Topic

update_topic

Update the topic name, description, slug or metadata. Omitted fields are preserved. Supplied slugs are kept and must be unique within the blog. Select topic_id from list_topics.

analytics

GET
/api/v1/lotsblog/blogs/:blog_id/analytics

Get Blog Analytics

get_blog_analytics

Retrieves traffic and engagement analytics for a blog. IMPORTANT: Requires blog_id — call list_blogs first to get the blog UUID.