---
title: "PUT /comments"
method: PUT
path: "/comments"
tags: ["channels"]
---

# PUT /comments

`PUT /comments`

Create a new comment

## Request body

- object
  - `text` string, required — See the Rich Text page to learn more about formatting
  - `threadID` string, uuid, required
  - `parentCommentID` string, uuid, nullable, required — Heartbeat comments have two levels of nesting. If null is provided, then the comment will be a direct reply to the thread. If a comment id is provided, then the comment will be a reply to that comment. The provided comment id must be a comment that is a direct reply to the thread.
  - `userID` string, uuid — The user that will be shown as the author of the comment. Only an admin user can be chosen. If this field is not provided, the user that created the API key will be used
  - `createdAt` string, date-time — Optional timestamp to override the default creation time for the comment. Must be in ISO 8601 format.

## Response `200`

Successful response

- Comment
  - `id` string, uuid
  - `userID` string, uuid — The id of the user that created this comment
  - `content` string — The content of the comment
  - `images` string[] — A list of URLs pointing to any image attachments on the comment
  - `files` string[] — A list of URLs pointing to any file attachments on the comment
  - `createdAt` string, date-time
  - `children` CommentReply[] — A list of child comments. Heartbeat comments only have 2 levels of nesting, so a child comment will never have more child comments underneath
    - `id` string, uuid
    - `userID` string, uuid — The id of the user that created this comment
    - `content` string — The content of the comment
    - `images` string[] — A list of URLs pointing to any image attachments on the comment
    - `files` string[] — A list of URLs pointing to any file attachments on the comment
    - `createdAt` string, date-time

## Other responses

- `400` — Invalid request body
- `401` — API Key is missing or invalid

---

[API](https://skmtc.net/heartbeat/apis/heartbeat-api.md) · [All operations](https://skmtc.net/heartbeat/apis/heartbeat-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/heartbeat/heartbeat-api/versions/6c3cf537d508/schema)
