BizKitHub
postPostVerejné 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

Parametre

1 v query · JSON telo

Parametre v query

· 1
apiKeystringPovinné

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

PríkladPRODPGrFxpGEtrOZfuWhnoJohUYBXuOE

Telo požiadavky

application/json
codestringVoliteľné

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.

Dĺžka: 0–64
Príkladchatspc-sukl12345-2026-04-27
titlestringPovinné

Post title (single-line plain text).

Dĺžka: 1–∞
PríkladKYBER CENA ROKU 2025
contentstringPovinné

Post body. HTML is preserved; whitespace is normalized.

Príklad<p>Žijeme ve světě, kde…</p>
perexstringVoliteľné

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

PríkladTřetí ročník vyhlášení proběhl 9. října 2025…
visibility"public" | "private" | "unlisted" | "subscribe"Voliteľné

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

Predvolené: public
localestringPovinné

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-oxendict → en-GB → en (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.

Dĺžka: 2–35
Príkladycsenen-GBpt-BRzh-Hans
mainCategorystringVoliteľné

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.

Príkladnovinky
mainAuthorCuRefNostringVoliteľné

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.

Dĺžka: 16
Príklad1cGIHvFoQDGLAbcA
commitMessagestringVoliteľné

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

PríkladWeekly SÚKL ingest 2026-04-27
metadataobjectVoliteľné

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.

Príklad{"sukl_code":"SUKL12345","version_date":"2026-04-27","pdf_sha256":"8f2c…","page_count":"42","ingested_at":"2026-04-27T10:11:12Z"}
attachmentsobject[]Voliteľné

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.

Každá položka poľa:
idstringPovinné

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.

Dĺžka: 32
PríkladaBcDeFgHiJkLmNoPqRsTuVwXyZ012345

Schéma odpovede

1 zdokumentovaný stavový kód

200Úspech
success"true"Povinné
idstringPovinné

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

Príklad6IU2SWgP76FO2UXw
codestring | nullPovinné

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

Príkladchatspc-SUKL12345-2026-04-27
createdbooleanPovinné

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

Ukážka odpovede

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

Ukážka požiadavky

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"
    }
  ]
}'

Potrebujete API kľúč?

Všetky verejné endpointy BizKitHub API sa overujú API kľúčom.

Získať API kľúč