Skip to content

Publish Knowledge Entry

About 418 wordsAbout 1 min

2026-09-14

Description

Publishes a knowledge entry. Publishing is synchronous: once the call succeeds, the entry immediately becomes published (public_status=1) and is visible externally.

Request Specification

HTTP Method: POST + application/json

Request Path: https://${Cloud Domain}/cgi/crm/v2/knowledge/publish?thirdTraceId=${Random String}

Request Headers: Refer to Common Parameters

Request Parameters

ParameterTypeRequiredDescription
dataMapYesData
  objectDataIdStringNoKnowledge entry ID for single publish
  dataIdsList[String]NoKnowledge entry ID list for batch publish. Either this or objectDataId; at least one is required

Request Example

{
  "data": {
    "objectDataId": "68c1a0f0abcd0001"
  }
}

Response Parameters

ParameterTypeDescription
traceIdstringUnique request ID
errorDescriptionstringError description
errorMessagestringError message
errorCodeIntError Codes
dataobjectResponse data
  resultBooleantrue means the entry is published and now in the "published" state

Response Example

{
  "traceId": "E-O.fktest4234.1000-20260914103000-xxxxxx",
  "errorDescription": "success",
  "errorMessage": "success",
  "errorCode": 0,
  "data": {
    "result": true
  }
}

Notes

Publish status (public_status) values:

ValueMeaningNotes
1PublishedFinal externally visible state; set by this API on success
2UnpublishedInitial state after creation; this is the value after a successful unpublish
3PublishingIntermediate state of the knowledge-base import/publish-check pipeline; never set by this API
4Publish failedWritten back by the publish-check flow when the check fails or times out
5Taken off shelfA display state of internal knowledge-base flows; after this API unpublishes, the value is 2, not 5
  • Publishing via this API is synchronous: on success public_status=1 immediately; no terminal-state polling is needed.
  • No precondition check on the current state: repeated publishes and publishing an already-published entry all succeed (idempotent).
  • The acting user (currentOpenUserId) must hold the "Publish" function privilege on the knowledge entry object and data privilege on the record, otherwise a permission-denied failure is returned.
  • 3 publishing, 4 publish failed and 5 taken off shelf originate from the knowledge-base import/publish-check pipeline; always rely on List Knowledge Entries for the actual state.
  • If neither objectDataId nor dataIds is passed, this API returns success without changing any entry (a silent no-op) — always pass at least one.
  • Batch publish (dataIds) executes entry by entry; any entry failing (record missing or update failure) errors out the whole call, and already-succeeded entries are NOT rolled back — split and retry.
  • Do not use the message field in the response for logical judgment, as errorMessage may change.