kintone developer network

Add Comment

Follow

Add CommentPOST /comment.json

Add a comment to a record in an app.
URI
https://{subdomain}.kintone.com/k/v1/record/comment.json
URI for Guest Space Apps
https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/record/comment.json

Permissions

The user or API Token must have permission to view the record to add a comment.

Request Parameters

PARAMETER VALUE REQUIRED DESCRIPTION
app Integer or String Yes The App ID.
record Integer or String Yes The Record ID.
comment Object Yes An object including comment details.
comment.text String Yes The comment text. The maximum characters of the comment is 65535.
comment.mentions Array Optional An array including information to mention other users.
comment.mentions[].code String Optional The code the user, group or organization that will be mentioned. The maximum number of mentions is 10. The mentioned users will be placed in front of the comment text when the API succeeds.
comment.mentions[].type String Optional The type of the mentioned target.
  • USER: User
  • GROUP: Group
  • ORGANIZATION: Department

Sample Request

Request Header

POST /k/v1/record/comment.json HTTP/1.1
Host: example.kintone.com:443
X-Cybozu-Authorization: a2ludG9uZTpkZXZlbG9wZXI=
Authorization: Basic a2ludG9uZTpkZXZlbG9wZXI=
Content-Type: application/json

Specify application/json for the Content-Type.

Sample Body

{
    "app": 43,
    "record": 1,
    "comment": {
        "text": "This comment is from the Administrator. \nPlease check!",
        "mentions": [
            {
                "code": "user16",
                "type": "USER"
            },
            {
                "code": "Global Sales_1BNZeQ",
                "type": "ORGANIZATION"
            },
            {
                "code": "APAC Taskforce_DJrvzu",
                "type": "GROUP"
            }
        ]
    }
}

Response

Body

The ID of the added comment will be returned.

{
    "id": "6"
}

Sample comment added by API Token.

Limitations

  • If an API Token is used to post a comment, the comment will be posted by the "Administrator" user.
  • If the mentioned name has a localized name setting, and the language of the localized name is the same as the comment poster's language settings, the mentioned name will be posted as the localized name.
  • Inactive/deleted users, departments, and groups cannot be mentioned.
  • An error will return if the commenting feature of the app is turned off.
  • For other limitations, check the limitations on this page
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request
Comments