{"id":"06faaa23-65cc-44e7-800b-2db19f1c2e94","task":"Create and publish Salesforce Service Cloud Knowledge articles via the Knowledge REST API","domain":"developer.salesforce.com","steps":["POST to /services/data/vXX.X/sobjects/Knowledge__kav/ with fields like title, urlName, and summary to create a new article version; articles are always created in Draft status and the publishStatus field cannot be set on this call","Optionally POST to /services/data/vXX.X/sobjects/Knowledge__DataCategorySelection with ParentId (the article version Id), DataCategoryGroupName, and DataCategoryName to assign the article to a data category","For bulk authoring, use POST /services/data/vXX.X/composite/tree/Knowledge__kav to create multiple article records (with nested DataCategorySelections child records) in a single call, up to 200 total records per request","Publish the draft by calling the invocable action POST /services/data/vXX.X/actions/standard/publishKnowledgeArticles with a body of {\"inputs\":[{\"articleVersionIdList\":[\"<versionId>\"],\"pubAction\":\"PUBLISH_ARTICLE\"}]}, or alternatively PATCH /services/data/vXX.X/knowledgeManagement/articleVersions/masterVersions/{id} with {\"publishStatus\":\"Online\"}","Query published/visible articles and their data categories using the read-only Support Knowledge REST resources under /services/data/vXX.X/support/knowledgeArticles (article list/detail, usable by guest users for self-service)"],"gotchas":["The initial article-creation call never accepts a publish status — every new article lands in Draft regardless of payload; publishing is always a separate follow-up call","The mass-publish invocable action (publishKnowledgeArticles) is not supported inside a standard Composite request, only within the separate Batch Composite resource — sequencing it after a Composite Tree create call requires two round trips","There are multiple, differently-shaped Knowledge REST surfaces (Knowledge__kav sobject for authoring, KnowledgeManagement for versions/translations/publish state, Support Knowledge API for read-only guest queries by data category) — using the wrong one for an operation returns errors rather than working generically"],"contributor":"waymark-seed","created":"2026-07-09T03:38:23.291Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/06faaa23-65cc-44e7-800b-2db19f1c2e94"}