# Create a comment

Adds a comment to a discussion. To create a comment with an attachment please use "multipart/form-data" content type.

Endpoint: POST /sheets/{sheetId}/discussions/{discussionId}/comments
Version: 2.0.0
Security: APIToken, OAuth2

## Path parameters:

  - `sheetId` (number, required)
    ID of the sheet being accessed.

  - `discussionId` (string, required)
    ID of the discussion being accessed.

## Header parameters:

  - `Authorization` (string)
    API Access Token used to authenticate requests to Smartsheet APIs.

  - `smartsheet-integration-source` (string)
    Uses the following metadata to distinguish between human-initiated API requests and third-party service-initiated calls by AI Connectors or ITSM:

- Integration source type
- Organization name
- Integration source name 

Format:


TYPE,OrgName,SourceName


Examples: 

AI,SampleOrg,My-AI-Connector-v2

SCRIPT,SampleOrg2,Accounting-updater-script

APPLICATION,SampleOrg3,SheetUpdater
    Example: "AI,SampleOrg,My-AI-Connector-v2"

  - `Content-Type` (string)
    Required for POST and PUT requests. Defines the structure for the request body.

## Request fields (application/json):

  - `text` (string)
    Comment body.

## Response 200 fields (application/json):

  - `message` (string)
    Message that indicates the outcome of the request. (One of SUCCESS or PARTIAL_SUCCESS.)
    Enum: "PARTIAL_SUCCESS", "SUCCESS"

  - `resultCode` (number)
    * '0' Success
* '3' Partial Success of Bulk Operation
    Enum: 0, 3

  - `result` (object)

  - `result.attachments` (array)
    Array of attachments on comments.

  - `result.attachments.id` (number)
    Attachment ID.

  - `result.attachments.parentId` (number)
    The ID of the parent.

  - `result.attachments.attachmentType` (string)
    Attachment type. Note--Dropbox, Egnyte, and Evernote are not supported for Smartsheet.gov accounts.
    Enum: "BOX_COM", "DROPBOX", "EGNYTE", "EVERNOTE", "FILE", "GOOGLE_DRIVE", "LINK", "ONEDRIVE", "TRELLO"

  - `result.attachments.attachmentSubType` (string)
    Attachment sub type. Note--Folder type is for EGNYTE values and the rest are GOOGLE_DRIVE values.
    Enum: "DOCUMENT", "DRAWING", "FOLDER", "PDF", "PRESENTATION", "SPREADSHEET"

  - `result.attachments.mimeType` (string)
    Attachment MIME type.
    Example: "PNG"

  - `result.attachments.parentType` (string)
    The type of object the attachment belongs to.
    Enum: "COMMENT", "PROOF", "ROW", "SHEET"

  - `result.attachments.createdAt` (any)

  - `result.attachments.createdBy` (object)
    User object containing name and email of the user who created this attachment.

  - `result.attachments.createdBy.email` (string)
    Example: "jane.doe@smartsheet.com"

  - `result.attachments.createdBy.name` (string)
    Example: "Jane Doe"

  - `result.attachments.name` (string)
    Attachment name.

  - `result.attachments.sizeInKb` (number)
    The size of the file, if the attachmentType is FILE.

  - `result.attachments.url` (string)
    Attachment temporary URL (files only).

  - `result.attachments.urlExpiresInMillis` (number)
    Attachment temporary URL time to live (files only).

  - `result.createdAt` (any)

  - `result.createdBy` (object)
    User object containing name and email of the creator of this comment.

  - `result.createdBy.email` (string)
    Example: "jane.doe@smartsheet.com"

  - `result.createdBy.name` (string)
    Example: "Jane Doe"

  - `result.discussionId` (number)
    Discussion ID of discussion that contains comment.

  - `result.id` (number)
    Comment ID.

  - `result.modifiedAt` (any)

  - `result.text` (string)
    Comment body.


