---
title: "Create Comment"
method: POST
path: "/api_v2/projects/{project_id}/tasks/{task_id}/comments.json"
tags: ["Comments"]
---

# Create Comment

`POST /api_v2/projects/{project_id}/tasks/{task_id}/comments.json`

## Request

- Base URL: `https://www.bugherd.com`
- URL: `https://www.bugherd.com/api_v2/projects/{project_id}/tasks/{task_id}/comments.json`
- Auth: HTTP basic

Adds a comment to a task. Identify the commenter by `user_id` or `email`.

**Visibility:** Set `is_private: true` to make the comment visible to team members only, not guests/clients.

## Path parameters

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

## Request body

- object
  - `comment` object
    - `text` string, required
    - `user_id` integer
    - `email` string, email: Alternative to user_id - looks up user by email
    - `is_private` boolean

## Response `201`

Created comment

- object
  - `comment` Comment
    - `id` integer
    - `text` string
    - `created_at` string, date-time
    - `user_id` integer
    - `is_private` boolean

---

[API](https://skmtc.dev/bugherd/apis/bugherd-api-v2.md) · [All operations](https://skmtc.dev/bugherd/apis/bugherd-api-v2/llms.txt) · [OpenAPI document](https://skmtc.dev/bugherd/apis/bugherd-api-v2/revisions/bf473cda70d4?raw)
