API Documentation
RESTful API documentation for developers
https://api.lots.blogAPI Key (Bearer token or X-API-Key header)
41
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/checkcontent
/api/v1/lotsblog/blogs/:blog_id/domain/checkCheck Domain
check_domainCheck the owned blog's custom domain (DNS verification and HTTPS certificate) and, when one is set up, its subdirectory (fetches example.com/blog/__lotsblog/subdirectory-check through the user's rewrite). Returns exact records or setup rules and a plain-language next step. Does not change the user's DNS or site.
/api/v1/lotsblog/blogs/:blog_id/images/completeComplete Image Upload
complete_image_uploadVerify 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.
/api/v1/lotsblog/blogs/:blog_id/domainConnect Domain
connect_domainConnect the blog to the owner's own address. Without path: connect a custom hostname (such as blog.example.com) and return the exact required CNAME and optional TXT DNS records; ask the user to set them, then call check_domain. With path (such as /blog): serve the blog at example.com/blog through one rewrite on the user's own site; returns the proxy target, the private proxy secret and copy-ready rules for Cloudflare Workers, Vercel, Next.js, Netlify and Nginx. The rules never contain the secret: they read it from a Worker secret or environment variable named LOTSBLOG_PROXY_SECRET (Nginx: an include file), and each rule's secret_storage says where the user puts it. Give the secret only to the owner for server-side settings, never in code or a committed file. Ask the user to add one rule, then call check_domain. Owner-only; requires an active plan or credits. Never changes DNS or the user's site automatically and never replaces an existing different domain. remove_subdirectory removes a path setup. Never use a lots.blog or lotsblog.com address: the blog already has one.
/api/v1/lotsblog/blogs/:blog_id/images/uploadCreate Image Upload
create_image_uploadPrepare 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.
/api/v1/lotsblog/blogs/:blog_id/images/deleteDelete Media
delete_mediaPermanently 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.
/api/v1/lotsblog/blogs/:blog_id/imagesList Media
list_mediaList a bounded page of image keys and CDN URLs for this blog. Use next_cursor to continue. Images uploaded through MCP are publicly accessible.
/api/v1/lotsblog/blogs/:blog_id/domain/subdirectoryRemove Subdirectory
remove_subdirectoryStop serving the blog at a path on the owner's own site (example.com/blog), under the owner's explicit instruction. Canonical URLs, the sitemap and RSS return to the verified custom domain or the blog's own {subdomain}.lotsblog.com address, which stop redirecting to the path. Ask the user to remove the rewrite from their site afterwards. Removes only the path setup; custom domains are removed in the dashboard. Owner-only. Requires confirm=true. get_blog shows the current path setup.
/api/v1/lotsblog/blogs/:blog_id/posts/:post_id/restoreRestore Post
restore_blog_postRestore a post from Trash to the status it had before (draft, scheduled, published or archived). A schedule that has already passed comes back as a draft. Restoring a published or scheduled post needs publish or schedule permission and active funding. Use list_blog_posts with status trashed to find posts in Trash.
/api/v1/lotsblog/blogs/:blog_id/posts/:post_id/unpublishUnpublish Post
unpublish_postMove 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. This is the only way to take a published post off the blog, and it needs the connection's Delete permission (mcp:delete).
search
/api/v1/lotsblog/blogs/:blog_id/search-console/sitemapSubmit Sitemap To Google
submit_sitemapSubmit the blog's sitemap to Google Search Console, under the user's instruction. Works when the blog is connected to Search Console (lots.blog dashboard, Analytics, Search tab) and LotsBlog's Search Console account has Full or Owner access to the property; with Restricted access it explains how to give Full access instead. Owners and admins. Returns the sitemap URL and the property it was submitted to. New posts are also announced through the sitemap and IndexNow automatically; use this after a new address or large changes.
team
/api/v1/lotsblog/blog-transfers/acceptAccept Blog Transfer
accept_blog_transferFor the person a blog was transferred to. With no arguments: the transfers waiting for you. With transfer_id (or the token from the email link) and no confirm: what moves with the blog and whether your LotsBlog plan or credits cover it; show this to the user before accepting. With confirm: true, under the user's instruction: accept. You become the owner and your plan or credits pay for the blog from today; the previous owner stays on the team if they chose to. Refused with FUNDING_REQUIRED when your plan or credits do not cover one more blog (nothing changes). You must be signed in with the address the transfer was sent to.
/api/v1/lotsblog/blogs/:blog_id/transferCancel Or Decline Blog Transfer
cancel_blog_transferStop a pending blog transfer, under the user's instruction. The owner cancels with blog_id; the person it was sent to declines with transfer_id (or the token from the email link), and the owner is told. Nothing moves and the link stops working.
/api/v1/lotsblog/blog-transfers/declineCancel Or Decline Blog Transfer
cancel_blog_transferStop a pending blog transfer, under the user's instruction. The owner cancels with blog_id; the person it was sent to declines with transfer_id (or the token from the email link), and the owner is told. Nothing moves and the link stops working.
/api/v1/lotsblog/blogs/:blog_id/members/:member_idChange Blog Team Role
update_blog_member_roleChange a team member's role to admin, editor or author, under the user's instruction. Owners can change admins, editors and authors; admins can change editors and authors, and only to roles below admin. Nobody changes their own role or the owner's. Owner is never assignable: ownership moves only through a transfer. Get member_id from list_blog_members.
/api/v1/lotsblog/blogs/:blog_id/members/invitationsInvite To Blog Team
invite_blog_memberInvite someone to the blog's team by email as admin, editor or author, under the user's instruction. Sends the LotsBlog invitation email; the link opens on the blog's own address and expires in 7 days. The invitee accepts by signing in with that same email. Owners can invite admins, editors and authors; admins can invite editors and authors. Owner is never an invite role: a blog has one owner. Fails, and keeps nothing, if the email cannot be sent.
/api/v1/lotsblog/blogs/:blog_id/members/leaveLeave Blog Team
leave_blogLeave a blog's team yourself, under the user's instruction. Your posts stay on the blog and you keep a reader account; an owner or admin can invite you back. The owner can't leave their own blog.
/api/v1/lotsblog/blogs/:blog_id/membersList Blog Team
list_blog_membersList the blog's team (owner, admins, editors, authors) with each person's role, plus open invitations. Also returns your own role, your permissions and the roles you may invite. Owners, admins and editors can see the team; authors cannot. Invitation links are included only for owners and admins.
/api/v1/lotsblog/blogs/:blog_id/members/:member_idRemove From Blog Team
remove_blog_memberRemove someone from the blog's team, under the user's instruction. Their posts and comments stay; they keep a reader account on the blog. Owners can remove admins, editors and authors; admins can remove editors and authors. The owner can't be removed; to leave yourself use leave_blog. Get member_id from list_blog_members.
/api/v1/lotsblog/blogs/:blog_id/members/invitations/:invitation_id/resendResend Blog Invitation
resend_blog_invitationEmail an open invitation again and extend it by 7 days. Owners and admins, for roles below their own. Get invitation_id from list_blog_members.
/api/v1/lotsblog/blogs/:blog_id/members/invitations/:invitation_idRevoke Blog Invitation
revoke_blog_invitationCancel an invitation that has not been accepted, under the user's instruction; its link stops working. Owners and admins. Get invitation_id from list_blog_members.
/api/v1/lotsblog/blogs/:blog_id/transferTransfer Blog To Another Account
transfer_blogGive the blog to another LotsBlog account, under the owner's instruction. Owner only. We email to_email a link; nothing moves until that person signs in to LotsBlog with that address and accepts, and their own plan or credits must cover the blog. Everything moves with it: posts, drafts, topics, media, team, settings, analytics, the custom domain and a /blog path on the owner's site; the blog stays live at the same address. keep_previous_owner (default true) keeps you on the team as previous_owner_role (admin by default, or editor or author); false makes you a reader. One pending transfer per blog: a new one replaces it. The link works for 7 days. get_blog shows the pending transfer; cancel_blog_transfer cancels it.
billing
/api/v1/lotsblog/fundingCheck product funding
get_funding_statusCheck 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
/api/v1/lotsblog/blogsCreate Blog
create_blogCreate 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.
/api/v1/lotsblog/blogs/:blog_idGet Blog Details
get_blogRead 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. description is the home page meta description and intro ("" when unset). subdirectory shows a path setup on the owner's site (example.com/blog): host, path, url, status pending or verified, and the last check and error; it is null when there is none. ga_measurement_id is the blog's GA4 Measurement ID, or null. reader_sign_in shows how readers sign in (email_code, google, password; available false while the setting rolls out).
/api/v1/lotsblog/blogsList Blogs
list_blogsRetrieves 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).
/api/v1/lotsblog/blogs/:blog_idUpdate Blog Settings
update_blogUpdate the owned blog name, title, description, privacy or private Markdown blog guide. Only supplied fields change. Use connect_domain/check_domain for custom domains; appearance uses the dashboard; manage the team with list_blog_members, invite_blog_member, update_blog_member_role and remove_blog_member. Also sets the home page description (description; about 155-160 characters, "" clears it), robots.txt (robots_txt; "" restores the default), the Google Analytics 4 Measurement ID (ga_measurement_id; "" removes it) and how readers sign in (email_code_sign_in, google_sign_in, password_sign_in; at least one stays on).
/api/v1/lotsblog/blogs/:blog_id/imagesUpload Blog Image
upload_blog_imageUpload 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
/api/v1/lotsblog/blogs/:blog_id/postsCreate Blog Post
create_blog_postCreate 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.
/api/v1/lotsblog/blogs/:blog_id/posts/:post_idDelete Blog Post
delete_blog_postMove a post to Trash under user instructions. It leaves the public site, sitemap, RSS and search at once, and search engines are told it is gone. Nothing is deleted: restore_blog_post returns it to its previous status, and only the blog owner or an admin can delete it forever from the dashboard Trash. Owners and admins can trash any post; editors and authors only their own. Moving a published post to Trash needs the connection's Delete permission (mcp:delete); drafts, scheduled and archived posts need only Create and edit.
/api/v1/lotsblog/blogs/:blog_id/posts/:post_idGet Blog Post
get_blog_postRead 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.
/api/v1/lotsblog/blogs/:blog_id/posts/:post_id/analyticsGet Post Analytics
get_post_analyticsRead traffic and engagement analytics for an article, plus a search block with its Google Search Console numbers when the blog is connected: clicks, impressions, CTR, average position by day and the top 25 searches for the post. Select blog_id from list_blogs and post_id from list_blog_posts. When Search Console is not connected, search.status is not_connected with the settings link.
/api/v1/lotsblog/blogs/:blog_id/postsList Blog Posts
list_blog_postsList the blog's posts, newest first, with optional filters by type, status and topic, and pagination. Posts in Trash are left out unless status is trashed.
/api/v1/lotsblog/blogs/:blog_id/posts/:post_id/publishPublish Post
publish_postPublish 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.
/api/v1/lotsblog/blogs/:blog_id/posts/:post_id/scheduleSchedule Post
schedule_postSchedule 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. A published post cannot be scheduled: take it off the blog with unpublish_post first.
/api/v1/lotsblog/blogs/:blog_id/posts/:post_idUpdate Blog Post
update_blog_postUpdate 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. A published post stays published here: to take it off the blog use unpublish_post, then schedule or archive it if needed.
topics
/api/v1/lotsblog/blogs/:blog_id/topicsCreate Topic
create_topicCreate 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.
/api/v1/lotsblog/blogs/:blog_id/topics/:topic_idDelete Topic
delete_topicDelete 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.
/api/v1/lotsblog/blogs/:blog_id/topics/:topic_idGet Topic
get_topicRetrieves 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.
/api/v1/lotsblog/blogs/:blog_id/topicsList Topics
list_topicsLists all topics/categories for a blog. IMPORTANT: Requires blog_id — call list_blogs first to get the blog UUID.
/api/v1/lotsblog/blogs/:blog_id/topics/:topic_idUpdate Topic
update_topicUpdate 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
/api/v1/lotsblog/blogs/:blog_id/analyticsGet Blog Analytics
get_blog_analyticsRetrieves traffic and engagement analytics for a blog, plus a search block with Google Search Console numbers when the blog is connected: clicks, impressions, CTR, average position, daily numbers, top pages and the top 25 searches, with a data_through date (Google runs 2 to 3 days behind). When Search Console is not connected, search.status is not_connected with the settings link, never zeros. Requires blog_id: call list_blogs first to get the blog UUID.