--- title: "Add-Comment" slug: "add-comment" tags: ["Enterprise Only"] updated: 2026-01-20T20:26:19Z published: 2026-01-20T20:26:19Z canonical: "help.agilityblue.com/add-comment" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.agilityblue.com/llms.txt > Use this file to discover all available pages before exploring further. # Add-Comment > [!NOTE] > Not Task Comments > > These comments relate to non-task comments. Task comments have a dedicated object, found [here](/v1/docs/scripting-add-taskcomment). ## Summary Creates a new comment. ```powershell Add-Comment    -Entry ``` Returns a comment object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Entry | Comment Object | Yes | The comment object to create as a new entry. | ## Examples ### Create a new comment ```powershell # Create a new comment on a specific matter # This is the object id to create the comment on # NOTE: Use `Add-TaskComment` for specifically creating task comments #   1: Client #   2: Matter $objectId = 2 # Primary key id is the Id of the object used. In this case, we are associating the comment # to matter id 6 $primaryKeyId = 6 # Provide the necessary fields to create the comment $entry = @{    ObjectId        = $objectId    PrimaryKeyId    = $primaryKeyId    Value           = "This matter was opened on 1/1/2024" } # Create the comment. The created entry will be returned back. $data = Add-Comment -Entry $entry # Output some information to help indicate that the comment was created Write-Output "Comment $($data.CommentId) was created on matter $($data.PrimaryKeyId)" # For debug purposes, convert the data to output as JSON so we can see all the fields Write-Output "" Write-Output "JSON Results:" $jsonOutput = $data | ConvertTo-Json -Depth 10 # Output the data Write-Output $jsonOutput ``` ```json Comment 3 was created on matter 6 JSON Results: {  "Metadata": null,  "Object": null,  "CreatedBy": null,  "ChildComments": [],  "CommentId": 3,  "ObjectId": 2,  "ObjectName": "Matter",  "PrimaryKeyId": 6,  "RelatedCommentId": null,  "Value": "This matter was opened on 1/1/2024",  "CreatedByFullName": "Max Miller",  "CreatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c",  "CreatedOn": "2024-03-04T15:00:06.1715883+00:00",  "LastUpdatedByFullName": "Max Miller",  "LastUpdatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c",  "LastUpdatedOn": "2024-03-04T15:00:06.1715883+00:00",  "LastUpdatedBy": null } ```