/api/v1/post/create
Creates a new post for the authenticated organisation, or — when code is provided and a post with the same code already exists in the organisation — updates that post in place.
On update, the per-locale row (title, content, perex) is overwritten for the supplied locale via an upsert on (post_id, locale_id); other locales are left untouched. updatedDate is bumped on every successful call. Visibility transitions out of private trigger a publishedDate stamp when one is not already set.
This endpoint is intended for batch importers (e.g. ChatSPC SPC ingestion) that need to push the same article repeatedly without producing duplicates.
This endpoint requires a valid API key passed as a query parameter or Bearer token.
Get your API keyParameters
1 query, 10 body parameters
apiKeystringrequiredYour BizKitHub API key (passed as GET parameter).
Key format: A 32-character string matching: ^(PROD|DEV_|ROOT)[A-Za-z0-9]{28}$
Prefixes: PROD (production key), DEV_ (individual developer), ROOT (system key with no limits). Learn more
codestringOptional caller-supplied stable identifier for this article. When omitted (or empty), a new post is always inserted. When provided, the post is matched within the organisation by code: an existing post with the same code is updated in place, a missing one is inserted with that code attached. This makes /create idempotent for batch importers — the same call with the same code can be safely retried or used to push content updates.
titlestringrequiredPost title (single-line plain text).
contentstringrequiredPost body. HTML is preserved; whitespace is normalized.
perexstringShort summary / teaser. Stored in the locale row alongside title and content.
visibilitystring | string | string | stringPost visibility. Defaults to public. Updates may change visibility; transitioning out of private triggers a publishedDate stamp if not already set.
publiclocalestringrequiredCommunication locale code used to filter content.
Supported locales: cs, en, fr, it, pl, de, sk, sv, es, zh, ja, uk, da.
mainCategorystringExternal id of the category to assign as mainCategory. On insert, when omitted the platform falls back to the first active category and attempts AI-based categorization in the background. On update, when omitted the existing category is left untouched.
mainAuthorCuRefNostringOptional cuRefNo of the contact to attribute as the main author on insert. When omitted the organisation’s internal customer is used. Ignored on update.
commitMessagestringOptional human-readable commit message recorded on the version history entry for this call. When omitted, the system fills a sensible default (e.g. Initial version via /api/v1/post/create (code=…) or Update via /api/v1/post/create (code=…)).
metadataobjectOptional structured key/value metadata bag merged into content__post_meta after the post upsert. Designed for external integrations (e.g. ChatSPC) that need to attach provenance — sukl_code, version_date, pdf_sha256, page_count, suspicious_pages, ingested_at, … — without operating their own database. Read it back via /api/v1/post/meta. Pass null for a key to clear it. Keys must fit 64 chars; values are strings — stringify your numbers/booleans before sending.
Example Request
JavaScript fetch
const response = await fetch("https://api.bizkithub.com/api/v1/post/create?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"code": "chatspc-sukl12345-2026-04-27",
"title": "KYBER CENA ROKU 2025",
"content": "<p>Žijeme ve světě, kde…</p>",
"perex": "Třetí ročník vyhlášení proběhl 9. října 2025…",
"visibility": "public",
"locale": "cs",
"mainCategory": "novinky",
"mainAuthorCuRefNo": "1cGIHvFoQDGLAbcA",
"commitMessage": "Weekly SÚKL ingest 2026-04-27",
"metadata": {
"sukl_code": "SUKL12345",
"version_date": "2026-04-27",
"pdf_sha256": "8f2c…",
"page_count": "42",
"ingested_at": "2026-04-27T10:11:12Z"
}
})
});
const data = await response.json();
console.log(data);Example Response
{
"success": true,
"id": "6IU2SWgP76FO2UXw",
"created": false
}cURL
Command line example
curl -X POST "https://api.bizkithub.com/api/v1/post/create?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE" \
-H "Content-Type: application/json" \
-d '{
"code": "chatspc-sukl12345-2026-04-27",
"title": "KYBER CENA ROKU 2025",
"content": "<p>Žijeme ve světě, kde…</p>",
"perex": "Třetí ročník vyhlášení proběhl 9. října 2025…",
"visibility": "public",
"locale": "cs",
"mainCategory": "novinky",
"mainAuthorCuRefNo": "1cGIHvFoQDGLAbcA",
"commitMessage": "Weekly SÚKL ingest 2026-04-27",
"metadata": {
"sukl_code": "SUKL12345",
"version_date": "2026-04-27",
"pdf_sha256": "8f2c…",
"page_count": "42",
"ingested_at": "2026-04-27T10:11:12Z"
}
}'Need an API key?
All BizKitHub API endpoints require authentication via API key.