API
Bear has a small API for managing your posts and blog settings. It's available on upgraded blogs.
Getting started
Head to your dashboard → Settings → API and generate a key. Each key works for one blog, and you can regenerate or revoke it there whenever you like.
Your API lives at https://bearblog.dev/YOUR-SUBDOMAIN/api/v1/ (use your Bear subdomain here, even if you have a custom domain). Send your key with every request:
Authorization: Bearer YOUR-API-KEY
Request bodies are JSON, so include Content-Type: application/json when creating or updating.
Keep your key private. Anyone who has it can edit your blog.
Posts
GET post/lists your posts, including drafts and pages.POST post/creates a post.GET post/UID/fetches a post.PATCH post/UID/updates a post. Only the fields you send are changed.DELETE post/UID/deletes a post for good.
A post's uid never changes, even if its slug does.
Fields
title: required when creating. Up to 200 characters.content: Markdown/HTML/LaTeX.slug: made from the title if you leave it out. Slugs get tidied up, and duplicates get a suffix, so use the one that comes back.publish:trueorfalse. Posts are drafts by default.published_date: a date with a timezone, like2026-09-11T12:00:00+02:00. A future date on a published post schedules it. Drafts without a date get one when they're published.tags: a list of strings.is_page:trueorfalse.discoverable:trueto opt the post into the discovery feed. Off by default.alias,canonical_url,meta_description,meta_image,class_name,lang: the same as the editor's header options.
Responses also include uid, url, and last_modified. Dates come back in UTC.
Listing
Lists come back 20 at a time, newest first, without content (fetch a single post for that). You get posts, count, page, page_size, and next_page, which is null on the last page.
page: which page to fetch. Starts at 1.status:draft,published, orscheduled. Leave it out for everything.is_page:trueorfalse. Leave it out for both posts and pages.
Blog
GET blog/fetches your blog's settings.PATCH blog/updates them. Only the fields you send are changed.
Fields
titlecontent: your home page, in Markdown/HTML/LaTeX.faviconmeta_description,meta_imagenav: navigation links, in Markdown.custom_styles: your theme's CSS.robots_txtdate_format: for exampled M, Y.
Responses also include last_modified.
Examples
# List drafts
curl 'https://bearblog.dev/YOUR-SUBDOMAIN/api/v1/post/?status=draft' \
-H 'Authorization: Bearer YOUR-API-KEY'
# Create a draft
curl -X POST 'https://bearblog.dev/YOUR-SUBDOMAIN/api/v1/post/' \
-H 'Authorization: Bearer YOUR-API-KEY' \
-H 'Content-Type: application/json' \
-d '{"title":"Hello from the API","content":"A **Markdown** draft.","tags":["api"]}'
# Publish it
curl -X PATCH 'https://bearblog.dev/YOUR-SUBDOMAIN/api/v1/post/UID/' \
-H 'Authorization: Bearer YOUR-API-KEY' \
-H 'Content-Type: application/json' \
-d '{"publish":true}'
# Update the home page
curl -X PATCH 'https://bearblog.dev/YOUR-SUBDOMAIN/api/v1/blog/' \
-H 'Authorization: Bearer YOUR-API-KEY' \
-H 'Content-Type: application/json' \
-d '{"content":"Welcome to my blog."}'
# Delete a post
curl -X DELETE 'https://bearblog.dev/YOUR-SUBDOMAIN/api/v1/post/UID/' \
-H 'Authorization: Bearer YOUR-API-KEY'
Errors and limits
When something goes wrong you get a message like {"error":"title is required"}, and nothing is saved.
400: something in the request isn't right. The message says what.401: the key is missing or wrong.403: the blog isn't upgraded.404: that post or path doesn't exist.429: slow down a little. You get 60 requests a minute, and theRetry-Afterheader says how many seconds to wait.