English
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
| Parameter | Type | Required | Description |
|---|---|---|---|
| data | Map | Yes | Data |
| objectDataId | String | No | Knowledge entry ID for single publish |
| dataIds | List[String] | No | Knowledge entry ID list for batch publish. Either this or objectDataId; at least one is required |
Request Example
{
"data": {
"objectDataId": "68c1a0f0abcd0001"
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| traceId | string | Unique request ID |
| errorDescription | string | Error description |
| errorMessage | string | Error message |
| errorCode | Int | Error Codes |
| data | object | Response data |
| result | Boolean | true 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:
| Value | Meaning | Notes |
|---|---|---|
| 1 | Published | Final externally visible state; set by this API on success |
| 2 | Unpublished | Initial state after creation; this is the value after a successful unpublish |
| 3 | Publishing | Intermediate state of the knowledge-base import/publish-check pipeline; never set by this API |
| 4 | Publish failed | Written back by the publish-check flow when the check fails or times out |
| 5 | Taken off shelf | A 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=1immediately; 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. 3publishing,4publish failed and5taken off shelf originate from the knowledge-base import/publish-check pipeline; always rely on List Knowledge Entries for the actual state.- If neither
objectDataIdnordataIdsis 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.
