# Add a Task Comment

`POST /api/tasks/{id}/comments`

Adds a comment to a task, authored by the token's staff member. Requires the Tasks "post" permission. Send an Idempotency-Key header to make retries safe.

- **Group:** Tasks
- **Since:** v3.0.3
- **Authentication:** `authtoken` header, created under Setup > API > API Management
- **HTML version:** /apiguide/tasks/post-task-comment/

## Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authtoken` | String | **required** | Authentication token, generated from admin area |

## Parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | Number | **required** | Task unique ID (URL segment). |
| `content` | String | **required** | Mandatory comment text. |

## Example request

```bash
curl -X POST "https://yoursite.com/api/tasks/123/comments" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "content": "..." }'
```

## Success response

### Success-Response:

```json
HTTP/1.1 200 OK
{ "status": true, "message": "Comment added successfully", "comment_id": 42 }
```

## Error responses

### Validation:

```json
HTTP/1.1 400 Bad Request
{ "status": false, "message": "Content is required" }
```

---

Perfex CRM REST API by Themesic Interactive. Full reference: /apiguide/
