API /document/add

ThoughtFarmer REST API Method: /document/add

Adds a document to a content page


Response Formats:

HTTP Method(s):

Requires Authentication:
true, user making call must pass a valid token parameter and user adding content must be able to add it under the parentId defined


Parameter Type Description
title string(255) Required. The title of the document to add
body string The body text of the document
culture string(5) The culture of the document to add. If not supplied or not valid, defaults to the culture of the user adding the content.
parentId int The parentId to create the document under. If not supplied, then the document will be created under the place page of the user adding the content
file byte[]
The file that this document page represents
token string Required. A valid token authentication parameter
Response Status Codes:
200 - Update successful
401 - Token parameter is invalid
403 - No permissions to add the document
404 - Parent id does not exist
405 - There must be one file attached to this request
500 - For any parameter validation errors

Example request
POST Data title={title}&body={body}&culture={culture}&parentId={parentId}&pageType={pageType}&layout={layout}&token={token}
         "Value":"Page Title"
   "TreePathText":"Directory  People  David Root, Product Marketing  Page Title",
   "Body":"Page Body"