Help Search

Create a comment

To create a new comment on a resource, make a POST request with the comment data in request body. And a valid request will look like:

POST /comments/resource/<resourceId>.json
  "content": "Comment posted via passbolt API"

Request data

The request body expects the following parameters:

Parameter Description Required Validation Constraints
content Comment text Yes
  1. Valid utf8 string
  2. Must not exceed 255 characters

Possible responses

Code Description
200 OK
The Comment was created. The response body will contain the newly created comment object
400 Bad Request
Some of the data validation failed.
403 Authentication Failure
The user making the request is not authenticated


Validation error response

A successful request must pass all the validation checks. For example sending a blank request body will return

    "header": {
        "id": "c12fc0f8-ea1d-49aa-a756-6632a5a806f5",
        "status": "error",
        "servertime": 1554985568,
        "action": "10369fc0-dcec-5bc0-8bb6-bd2809d51d5f",
        "message": "Could not validate user data.",
        "url": "\/comments\/resource\/8e3874ae-4b40-590b-968a-418f704b9d9a.json",
        "code": 400
    "body": {
        "content": {
            "_empty": "The content should not be empty"

Last updated

This article was last updated on April 23rd, 2019.

For another perspective on the API you browse the OpenAPI 2.0 specifications using the dedicated API reference site (Swagger UI).

API Reference

You can also find the latest OpenAPI 2.0 specifications directly on the dedicated repository.

OpenAPI Specs repository
🍪   Do you accept cookies for statistical purposes? (Read more) Accept No thanks!