Box Developer Documentation

Join BoxWorks 2024 to discover what's possible with content and AI!

Register now!

Comment (Full)

Comments are messages created on files. Comments can be made independently or created as responses to other comments

This resource has a few variations that can be encountered when using the API.

The fields that are part of the full variant can be returned by API endpoints that support the fields parameter. For example, by defining the fields request parameter as id,type when requesting a file by ID, only those fields will be returned in the API response.

string
11446498

The unique identifier for this comment.

string
comment

comment

Value is always comment

string (date-time)
2012-12-12T10:53:43-08:00

The time this comment was created

A mini user object representing the author of the comment

true

Whether or not this comment is a reply to another comment

object

The file this comment was placed on

string
11446498

The unique identifier for this object

string
file

The type for this object

string
@Aaron Levie these tigers are cool!

The text of the comment, as provided by the user

string (date-time)
2012-12-12T10:53:43-08:00

The time this comment was last modified

@[1234567:Aaron Levie] these tigers are cool!

The string representing the comment text with @mentions included. @mention format is @[id:username] where id is user's Box ID and username is their display name.

Response Example

{
  "id": "11446498",
  "type": "comment",
  "created_at": "2012-12-12T10:53:43-08:00",
  "created_by": {
    "id": "11446498",
    "type": "user",
    "login": "ceo@example.com",
    "name": "Aaron Levie"
  },
  "is_reply_comment": true,
  "item": {
    "id": "11446498",
    "type": "file"
  },
  "message": "@Aaron Levie these tigers are cool!",
  "modified_at": "2012-12-12T10:53:43-08:00",
  "tagged_message": "@[1234567:Aaron Levie] these tigers are cool!"
}