Skip to content

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

ParameterTypeRequiredDescription
triggerApprovalFlowBooleanNoWhether to trigger the approval flow; defaults to true when omitted
triggerWorkFlowBooleanNoWhether to trigger the workflow; defaults to true when omitted
hasSpecifyTimeBooleanNoWhether create_time in object_data takes effect; defaults to false (ignored)
hasSpecifyCreatedByBooleanNoWhether created_by in object_data takes effect; defaults to false (ignored)
dataMapYesData
  object_dataMapYesKnowledge entry object
  object_data.dataObjectApiNameStringYesObject apiName, fixed value ServiceKnowledgeObj
  object_data.record_typeStringYesFixed value default__c
  object_data.titleStringYesTitle
  object_data.categoryStringYesCode of the target knowledge folder. Obtain it via List Visible Knowledge Folders
  object_data.content_typeStringYesContent type: text plain text, rich_text rich text, enclosure attachment
  object_data.textStringNoPlain text content. Required when content_type=text
  object_data.rich_textStringNoRich text content (HTML). Required when content_type=rich_text
  object_data.material_messageArrayNoAttachment list. Required when content_type=enclosure. See Field Value Conventions for attachment format
  object_data.permanent_validityBooleanNoWhether permanently valid
  object_data.validity_begin_timeLongNoValidity start time, in milliseconds
  object_data.validity_end_timeLongNoValidity end time, in milliseconds
  object_data.summaryStringNoSummary
  object_data.authorStringNoAuthor. 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

ParameterTypeDescription
traceIdstringUnique request ID
errorDescriptionstringError description
errorMessagestringError message
errorCodeIntError Codes
dataIdStringID of the created knowledge entry

Response Example

{
  "traceId": "E-O.fktest4234.1000-20260914100000-xxxxxx",
  "errorDescription": "success",
  "errorMessage": "OK",
  "errorCode": 0,
  "dataId": "68c1a0f0abcd0001"
}

Notes

  • content_type determines the body field: text maps to text, rich_text maps to rich_text, enclosure maps to material_message; a mismatch may result in an empty body.
  • Fields such as public_status, read_count, be_helpful and not_helpful are 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.