BizKitHub
DocsAPI ReferencePost/api/v1/post/create
postPostPublic API v1

/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.

postpostApiV1PostCreate

Parameters

1 query · JSON body

Query parameters

· 1
apiKeystringRequired

Your 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

ExamplePRODPGrFxpGEtrOZfuWhnoJohUYBXuOE

Request body

application/json
codestringOptional

Optional 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.

Length: 064
Examplechatspc-sukl12345-2026-04-27
titlestringRequired

Post title (single-line plain text).

Length: 1
ExampleKYBER CENA ROKU 2025
contentstringRequired

Post body. HTML is preserved; whitespace is normalized.

Example<p>Žijeme ve světě, kde…</p>
perexstringOptional

Short summary / teaser. Stored in the locale row alongside title and content.

ExampleTřetí ročník vyhlášení proběhl 9. října 2025…
visibility"public" | "private" | "unlisted" | "subscribe"Optional

Post visibility. Defaults to public. Updates may change visibility; transitioning out of private triggers a publishedDate stamp if not already set.

Default: public
localestringRequired

Communication locale code — controls the language of textual data (product names, descriptions, articles, storefront UI, transactional e-mails).

Preferred format: BCP 47 language tag — language[-Script][-REGION]. Use the full tag whenever the script or region matters:

  • en-GB vs. en-US (British vs. American spelling)
  • pt-PT vs. pt-BR (European vs. Brazilian Portuguese)
  • zh-Hans vs. zh-Hant (Simplified vs. Traditional Chinese)
  • sr-Latn vs. sr-Cyrl (Latin vs. Cyrillic Serbian)

Backwards-compatible fallback: the bare two-letter ISO 639-1 code (cs, en, pl, …) is accepted indefinitely — legacy clients that only send the language subtag continue to work unchanged.

Resolution algorithm (server-side): the input is resolved against the supported locale list via the [RFC 4647 Lookup] progressive-fallback strategy — trailing subtags are stripped one by one until a supported locale is found. Example: en-GB-oxendicten-GBen (matched). If no subtag combination is supported, the request is rejected.

Currently supported locales: cs, en, fr, it, pl, de, sk, sv, es, zh, ja, uk, da, hu, ro, nl, pt, fi, nb, hr. Region-specific variants (e.g. en-GB, pt-BR) are accepted and resolved to their base language when the exact variant is not registered separately.

Length: 235
Examplescsenen-GBpt-BRzh-Hans
mainCategorystringOptional

External 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.

Examplenovinky
mainAuthorCuRefNostringOptional

Optional cuRefNo of the contact to attribute as the main author on insert. When omitted the organisation’s internal customer is used. Ignored on update.

Length: 1616
Example1cGIHvFoQDGLAbcA
commitMessagestringOptional

Optional 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=…)).

ExampleWeekly SÚKL ingest 2026-04-27
metadataobjectOptional

Optional 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{"sukl_code":"SUKL12345","version_date":"2026-04-27","pdf_sha256":"8f2c…","page_count":"42","ingested_at":"2026-04-27T10:11:12Z"}
attachmentsobject[]Optional

Optional list of blob attachments to link to the post.

On insert the supplied attachments become the post’s initial attachment set. On update they are appended to the post’s existing set — this endpoint never removes attachments. Use the admin (/bff/post/post-attachment-delete) to detach.

Duplicate tokens inside one call, and tokens that are already attached to the post, are silently collapsed — a blob is never linked twice to the same post. If any supplied token does not exist or belongs to a different organisation, the whole call is aborted before any change is written to the post.

Each array item:
idstringRequired

Blob token (32-char string) returned by /api/v1/blob/upload. The blob must belong to the same organisation as the API key; cross-organisation tokens are rejected and the whole call fails before any write.

Length: 3232
ExampleaBcDeFgHiJkLmNoPqRsTuVwXyZ012345

Response schema

1 status code documented

200Success
success"true"Required
idstringRequired

External id of the created or updated post (use this in /post, /feed, etc.).

Example6IU2SWgP76FO2UXw
codestring | nullRequired
One of 2:
Variant 1
string

Echo of the supplied code, or null when none was provided.

Examplechatspc-SUKL12345-2026-04-27
Variant 2
null
createdbooleanRequired

True when a new post was inserted; false when an existing post (matched by code) was updated.

Response example

application/json
{
  "success": true,
  "id": "6IU2SWgP76FO2UXw",
  "created": false
}

Request example

POST /api/v1/post/create

post
curl -X POST "https://api.bizkithub.com/api/v1/post/create?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -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"
  },
  "attachments": [
    {
      "id": "aBcDeFgHiJkLmNoPqRsTuVwXyZ012345"
    }
  ]
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key