English
Create Knowledge Entry
About 500 wordsAbout 2 min
2026-09-14
Description
Creates a knowledge entry. The knowledge base is organized into three levels — knowledge space, knowledge folder, and knowledge entry. The target folder must be specified via category on creation.
This API is the platform standard object-create API; the object is specified via dataObjectApiName, with a fixed value of ServiceKnowledgeObj.
Request Specification
HTTP Method: POST + application/json
Request Path: https://${Cloud Domain}/cgi/crm/v2/data/create?thirdTraceId=${Random String}
Request Headers: Refer to Common Parameters
Request Parameters
For detailed field conventions, refer to Parameter Filling Guide
| Parameter | Type | Required | Description |
|---|---|---|---|
| triggerApprovalFlow | Boolean | No | Whether to trigger the approval flow; defaults to true when omitted |
| triggerWorkFlow | Boolean | No | Whether to trigger the workflow; defaults to true when omitted |
| hasSpecifyTime | Boolean | No | Whether create_time in object_data takes effect; defaults to false (ignored) |
| hasSpecifyCreatedBy | Boolean | No | Whether created_by in object_data takes effect; defaults to false (ignored) |
| data | Map | Yes | Data |
| object_data | Map | Yes | Knowledge entry object |
| object_data.dataObjectApiName | String | Yes | Object apiName, fixed value ServiceKnowledgeObj |
| object_data.record_type | String | Yes | Fixed value default__c |
| object_data.title | String | Yes | Title |
| object_data.category | String | Yes | Code of the target knowledge folder. Obtain it via List Visible Knowledge Folders |
| object_data.content_type | String | Yes | Content type: text plain text, rich_text rich text, enclosure attachment |
| object_data.text | String | No | Plain text content. Required when content_type=text |
| object_data.rich_text | String | No | Rich text content (HTML). Required when content_type=rich_text |
| object_data.material_message | Array | No | Attachment list. Required when content_type=enclosure. See Field Value Conventions for attachment format |
| object_data.permanent_validity | Boolean | No | Whether permanently valid |
| object_data.validity_begin_time | Long | No | Validity start time, in milliseconds |
| object_data.validity_end_time | Long | No | Validity end time, in milliseconds |
| object_data.summary | String | No | Summary |
| object_data.author | String | No | Author. Defaults to the name of the current employee when omitted |
Request Example
{
"data": {
"object_data": {
"dataObjectApiName": "ServiceKnowledgeObj",
"record_type": "default__c",
"title": "Device Installation Guide",
"category": "16",
"content_type": "rich_text",
"rich_text": "<p>Installation steps</p>",
"permanent_validity": true
}
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| traceId | string | Unique request ID |
| errorDescription | string | Error description |
| errorMessage | string | Error message |
| errorCode | Int | Error Codes |
| dataId | String | ID of the created knowledge entry |
Response Example
{
"traceId": "E-O.fktest4234.1000-20260914100000-xxxxxx",
"errorDescription": "success",
"errorMessage": "OK",
"errorCode": 0,
"dataId": "68c1a0f0abcd0001"
}Notes
content_typedetermines the body field:textmaps totext,rich_textmaps torich_text,enclosuremaps tomaterial_message; a mismatch may result in an empty body.- Fields such as
public_status,read_count,be_helpfulandnot_helpfulare system-maintained; never pass them. Publish status can only be changed via the Publish and Unpublish APIs. - A newly created entry defaults to the unpublished state; call Publish Knowledge Entry to make it visible externally.
- Personnel and attachment fields follow the standard-object openUserId / mediaId conventions; the gateway converts them automatically in both directions.
- Do not use the message field in the response for logical judgment, as errorMessage may change.
