English
Unpublish Knowledge Entry
About 360 wordsAbout 1 min
2026-09-14
Description
Unpublishes a knowledge entry. Unpublishing is synchronous: once the call succeeds, the entry immediately returns to the unpublished state (public_status=2) and is no longer visible externally.
Request Specification
HTTP Method: POST + application/json
Request Path: https://${Cloud Domain}/cgi/crm/v2/knowledge/unpublish?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 unpublish |
| dataIds | List[String] | No | Knowledge entry ID list for batch unpublish. 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 unpublished and back to the "unpublished" state |
Response Example
{
"traceId": "E-O.fktest4234.1000-20260914104000-xxxxxx",
"errorDescription": "success",
"errorMessage": "success",
"errorCode": 0,
"data": {
"result": true
}
}Notes
- After a successful unpublish,
public_statusbecomes2unpublished (not5;5taken off shelf is a display state of internal knowledge-base flows). See Publish Knowledge Entry for all status values. - No precondition check on the current state: repeated unpublishes and unpublishing an unpublished entry all succeed (idempotent).
- The acting user (
currentOpenUserId) must hold the "Cancel Publish" function privilege on the knowledge entry object and data privilege on the record, otherwise a permission-denied failure is returned. - An unpublished entry can be republished via Publish Knowledge Entry.
- If neither
objectDataIdnordataIdsis passed, this API returns a "record missing or unavailable" error (unlike publish's silent no-op) — always pass at least one. - Batch unpublish (
dataIds) executes entry by entry: entries that do not exist or whose update had no effect are silently skipped (the call still returnsresult=true); only a low-level exception fails the whole call. Already-succeeded entries are not rolled back. To confirm per-entry outcomes, checkpublic_statusvia the list/detail APIs. - Do not use the message field in the response for logical judgment, as errorMessage may change.
