Search Documentation
Search for a documentation page...
Posts API
REST API endpoints for managing blog posts.
List Posts
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 50 | Posts per page (1-100) |
offset | number | 0 | Posts to skip |
query | string | – | Search by post title |
active | boolean | – | Filter by published status |
tag | string | – | Filter by tag |
categoryId | string | – | Filter by blog category ID |
lang | string | – | Locale code (e.g. pl-PL) to overlay translated fields onto the response. Only honoured when the store's translations tool is enabled. |
Response
Get Post
Returns a single blog post by UUID or slug, with full TipTap JSON content and SEO metadata.
| Parameter | Type | Description |
|---|---|---|
lang | string | Locale code for translated field overlay and translated slug lookup |
When ?lang= is provided and translations are enabled, the endpoint overlays translated title, slug, content, seo.title, and seo.description onto the response. The post can also be looked up by its translated slug – if no base slug matches, the endpoint tries the translated slug for the given locale.
Create Post
Content must be valid TipTap JSON with type: "doc". The slug must be unique within the store.
External image URLs – both the featured image field and any image or imageResize nodes inside content – are automatically downloaded and re-hosted on the store's own CDN. The response will contain the re-hosted URLs, not the original URLs you submitted. Images that already belong to the store are left untouched. If an image cannot be fetched, the original URL is preserved.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Post title |
slug | string | Yes | URL slug (lowercase, numbers, hyphens) |
content | object | Yes | TipTap JSON content ({ type: "doc", content: [...] }) |
image | string | No | Featured image URL |
tag | string | No | Post tag/category |
active | boolean | No | Visible on storefront |
publishedAt | string | No | ISO 8601 publication date |
seo | object | No | SEO metadata (see below) |
filters | object | No | Key-value metadata filters |
SEO Object
| Field | Type | Description |
|---|---|---|
title | string | Meta title |
description | string | Meta description |
canonical | string | Canonical URL |
Update Post
Partially updates a blog post. Only the provided fields are changed. Accepts the same fields as create (all optional). Image re-hosting applies to updates as well – any new external image URLs are re-hosted, while omitted fields are left unchanged.
Delete Post
Permanently deletes a blog post.
Translations
Upsert or delete a single locale's translated fields for a blog post. The post can be identified by UUID or base slug. The locale must be a supported locale code (e.g. pl-PL) and cannot be the store's base locale – base content is edited via PATCH /api/v1/posts/:idOrSlug.
Request Body
| Field | Type | Description |
|---|---|---|
title | string | Translated post title |
slug | string | Translated URL slug |
content | object | Translated body (TipTap JSONContent) |
seoTitle | string | Translated SEO title |
seoDescription | string | Translated SEO description |
All fields are optional. The schema is strict – unknown fields are rejected. Sending an empty body (all fields omitted or blank) deletes the translation row, so the post falls back to its base-language content.
The locale does not need to be enabled in settings.enabledLanguages – you can stage translations before flipping the language on.
Response
Errors
| Status | Meaning |
|---|---|
400 | Unsupported locale, or the locale is the store's base locale |
404 | No post matches the identifier |
409 | A translation with this slug already exists for the same locale |
See the Localization page for the full translation behaviour and conventions.
Post Comments
List Comments
Returns approved comments for a post. Pending comments are only visible in the admin interface.
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Comments per page (1-100) |
offset | number | 0 | Comments to skip |
Create Comment
Submits a comment (pending approval by store owner). The email field is stored but not returned in responses.
| Field | Type | Required | Description |
|---|---|---|---|
author | string | Yes | Display name (1-100 chars) |
email | string | Yes | Email address |
content | string | Yes | Comment text (1-5000 chars) |