---
title: "Create task comment"
method: POST
path: "/projects/{project_id}/tasks/{task_id}/comments"
tags: ["Tasks"]
---

# Create task comment

`POST /projects/{project_id}/tasks/{task_id}/comments`

## Request

- Base URL: `https://app2.gettruss.io/api/v1`
- URL: `https://app2.gettruss.io/api/v1/projects/{project_id}/tasks/{task_id}/comments`
- Auth: HTTP bearer

Adds a comment to the task, authored by the authenticated API user. Watchers on the project are emailed, the same as when a firm user comments in the app; the task's assignees are emailed only when send_notification_to_assignees is true. Plain newlines in content are converted to line breaks.

## Path parameters

- `project_id` integer, required
- `task_id` integer, required

## Request body

- object
  - `content` string, required: The comment body. Supports the same limited HTML as task descriptions.
  - `send_notification_to_assignees` boolean: Also email the assignees active on the task, the same as the "notify assignees" checkbox in the app. Ignored when the API user is restricted from sending emails.

## Response `201`

comment created

- object
  - `data` Comment
    - `id` integer
    - `commentable_type` string: Type of the commentable (e.g. "Task")
    - `commentable_id` integer: ID of the commentable (e.g. "Task")
    - `commenter_type` string: Type of the commenter (e.g. "User" or "Assignee")
    - `commenter_id` integer: ID of the commenter (e.g. "User" or "Assignee")
    - `content` string: HTML content of the comment
    - `content_as_string` string: Plain text content of the comment
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `403`: missing the projects_write scope, or this user is restricted from commenting
- `404`: project or task not found
- `422`: content was blank

## Changes

- **2026-09-03** `5f3d79fd23a0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gettruss/apis/api-v1/changes/projects/:project_id/tasks/:task_id/comments/post.md)

---

[API](https://skmtc.dev/gettruss/apis/api-v1.md) - [All operations](https://skmtc.dev/gettruss/apis/api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/gettruss/apis/api-v1/revisions/3c722bf0ce3d?raw)
