Create document comment

Adding a comment to a document in Basecone.

POST documents/:documentId/comments

Request details

The post request will contain an object with the text for the comment to add to the document, identified by the documentId.

Request properties

Property Type Description Optional
text string Document comment text. No

Example request

{
  text : "please look at this comment"
}

Successful Response

Upon successfully adding a comment a 201 status code will be returned, otherwise an error message with failure details will be given.

Error Response

If something goes wrong, an error message with failure details will be given together with a suitable http error status code.

Example of an error response

{
  "Message":"The requested resource is not found",
  "Code":"resource_not_found",
  "_metadata":null,
  "_moreInfo":"http://developers.basecone.com/lookup/resource_not_found"
}

Possible error responses

Status code Error code Details
404 resource_not_found The document cannot be found.
400 validation_error Request failed with one or more validation errors (see below). For more information about how to handle validation errors, please consult client side errors section.
Possible validation error responses
Status code Error code Details
400 invalid_text The text field is empty.