Comments

Post a comment to a thread by sending array of blocks in markdown.

Post

POST https://threads.com/api/public/postComment

Post a comment to a channel by sending the channel and an array of blocks in markdown.

Headers

NameTypeDescription

Authorization

string

Bearer <your_api_key>

Content-Type

string

application/json

Request Body

NameTypeDescription

threadID

string

This is ID of the thread you want to post to. An easy way to find a threadID is to navigate to the thread on the Threads website. The URL will be threads.com/<your_thread_id>

parentID

string

(Optional) This is ID of the comment/thread you want to post to. If not specified, parentID will assume the value of threadID.`

blocks

string[]

These are the blocks of the comment body. To format a block, you can send markdown.

Example Request

curl \
  -H "Authorization: Bearer ABcD-ur5d6WK5lWZFKF3cKwp" \
  -H "Content-Type: application/json" \
  -X POST https://threads.com/api/public/postComment \
  -d '{"threadID":"my_channel","blocks":["# First Block", "Second block"]}'

Example Response

{
    "ok": true,
    "result":
    {
        "commentID": "34518178498",
        "commentURL": "https://threads.com/34518178498?s=axy5ueR3ZERXqtPvNx9aK9"
    }
}

Delete

POST https://threads.com/api/public/deleteComment

Delete a comment posted by the bot user of the Bearer token. Pass in the commentID that you got from the postComment response. Alternatively if you click on copy link on a comment on web you'll get the URL pasted to your clipboard.

Headers

NameTypeDescription

Authorization

string

Bearer <your_api_key>

Content-Type

string

application/json

Request Body

NameTypeDescription

commentID

string

This is ID of the comment you want to delete

Example Request

curl \
  -H "Authorization: Bearer ABcD-ur5d6WK5lWZFKF3cKwp" \
  -H "Content-Type: application/json" \
  -X POST https://threads.com/api/public/deleteComment \
  -d '{"commentID":"34518178498"}'

Example Response

{
    "ok": true
}