I am looking into building a web app using either the SOAP or REST API that would allow our clients team to generate new knowledgebase articles (service cloud) to be submitted to salesforce via the API.

This is for an internal portal project to make it easier for our client's team to format the articles.

I have found good information on creating new versions of an existing KnowledgeArticleVersion. However it is not clear from the documentation I have found how you would create a completely new KnowledgeArticle from scratch.

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_knowledgearticleversion.htm This page of the API docs talks about creating a new knowledge article, but I believe they are saying a new version of an existing article.

Is anyone able to provide any insight on how/if this can be accomplished through the API?

1 Answer 1


The knowledge article data model is polymorphic in nature.

Hence the creation of the knowledge article process is similar to creation of any other record except we have articletype appended by __kav to get the object name.

Hence to create initial version via API i would use the same calls as I use for other objects.

You will have to insert a knowledge article using the API as below:

curl https://na1.salesforce.com/services/data/v20.0/sobjects/FAQ__kav/ \ 
  -H "Authorization: Bearer token \
  -H "Content-Type: application/json" \
  -d @newaccount.json"

# newaccount.json:
   "summary" : "Express Logistics and Transport"
  //Include various fields here 

Remember to set up REST API you will first have to OAUTH with salesforce or obtain session ID using login() call

Also once you draft an article you can manage its lifecycle through various API documented in chapter four of the guide.

  • Thanks! I worked on another SFDC project maybe 8-12 months ago and at that time I was forced to work with the SOAP api because the REST api did not have any methods for working with the service cloud. Are rest/soap API's now equally robust for working with the service cloud?
    – Matt Keys
    Mar 23, 2014 at 15:04
  • Yes REST is pretty fast and one advantage i always enjoy with REST is its easier to handle JSON in browser than XML. Mar 23, 2014 at 17:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .