Lykhari api docs
lykhari has an api. you can create, update, and read posts on your blog from outside the dashboard, which means scripts, cron jobs, or an ai like claude or chatgpt can write to your blog directly. this post is the full reference.
it's a pro feature, and it can't delete anything. only write and read.
getting a token
dashboard, settings, search "api", generate a token. you'll only see the full value once, right after generating it, so copy it somewhere safe. you can have one active token at a time, and you can revoke it and generate a new one whenever you want.
authenticating
every request needs this header:
Authorization: Bearer lykh_your_token_hererequests go to your own blog's domain, same as the dashboard itself. so if your blog is at yourname.lykhari.com, that's also where the api lives.
creating a post
POST https://yourname.lykhari.com/api/posts
Authorization: Bearer lykh_...
Content-Type: application/json
{
"title": "hello from the api",
"type": "POST",
"status": "DRAFT",
"markdown": "write normal markdown here.\n\nheadings, **bold**, *italic*, [links](https://example.com), lists, quotes, and code all work."
}type is POST, PAGE, or CATEGORY. status is DRAFT, PUBLISHED, UNPUBLISHED, or SCHEDULED. leave title out and the post still gets created, it just can't be published without one until you add it later.
writing the body as markdown
posts are stored internally as a structured json tree, the same format the dashboard editor itself uses. you don't have to touch that. send a markdown field instead of content, and lykhari converts it for you on the way in.
supported: headings, bold, italic, strikethrough, inline code, code blocks, bulleted and numbered lists, links, blockquotes. that covers most of what people actually write with.
reading a post back
GET https://yourname.lykhari.com/api/posts/123
Authorization: Bearer lykh_...by default you get the json tree back. add ?format=markdown and you get plain markdown instead, which is usually what you actually want if you're piping this into something else:
GET https://yourname.lykhari.com/api/posts/123?format=markdownlisting posts
GET https://yourname.lykhari.com/api/posts?type=POST
Authorization: Bearer lykh_...filters by type, status, isPinned, categorySlug, and a couple others. ?format=markdown works here too, so a whole list comes back as plain text bodies instead of json trees.
updating a post, and publishing
PUT https://yourname.lykhari.com/api/posts/123
Authorization: Bearer lykh_...
Content-Type: application/json
{ "markdown": "updated body.", "status": "PUBLISHED" }any field you leave out stays as it was. publishing a draft is just this, an update that sets status to PUBLISHED.
categories
categories are posts with type: "CATEGORY". create one the same way:
POST /api/posts
{ "title": "release notes", "type": "CATEGORY" }then point a regular post at it:
PUT /api/posts/123
{ "categoryPostId": 45 }limits
10 new posts per day per token. no limit on reads or updates. deleting a post still has to happen from the dashboard, on purpose.