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

# PUT /threads

`PUT /threads`

Create a new thread

## Request body

- object
  - `text` string, required — See the Rich Text page to learn more about formatting
  - `channelID` string, uuid, required
  - `userID` string, uuid — The user that will be shown as the author of the thread. Only an admin user can be chosen. If this field is not provided, the user that created the API key will be used
  - `embeds` string[] — An array of HTML embed codes to include in the thread. Useful for embedding media players (e.g., podcast episodes), videos, or other external content. Each embed must contain an iframe element.
  - `createdAt` string, date-time — Optional timestamp to override the default creation time for the thread. Must be in ISO 8601 format.

## Response `200`

Successful response

- Thread
  - `id` string, uuid
  - `channelID` string, uuid — The id of the channel where this thread exists
  - `userID` string, uuid — The id of the user that created this thread
  - `content` string — The content of the thread
  - `files` string[] — A list of URLs pointing to any file attachments on the thread
  - `createdAt` string, date-time
  - `url` string — A URL pointing to this thread
  - `comments` 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)
