Threads

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

Post

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

Post a thread 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

channel

string

This is the name of the channel you want to post to

channelID

string

This is ID of the channel you want to post to. An easy way to find a channelID for a channel is to navigate to that channel on the Threads website. The URL will be threads.com/<your_channel_id>

blocks

string[]

These are the blocks of the thread 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/postThread \
  -d '{"channel":"my_channel","blocks":["# First Block", "Second block"]}'

Example Response

{
    "ok": true,
    "result":
    {
        "threadID": "34518178493",
        "threadURL": "https://threads.com/34518178493?s=axy5ueR3ZERXqtPvNx9aK9"
    }
}

Delete

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

Delete a thread posted by the bot user of the Bearer token. Pass in the threadID that you got from the postThread response. Alternatively if you navigate to any thread on web, the URL is https://threads.com/<thread_id>

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 delete

Example Request

curl -i \
  -H "Authorization: Bearer ABcD-ur5d6WK5lWZFKF3cKwp" \
  -H "Content-Type: application/json" \
  -X POST https://threads.com/api/public/deleteThread \
  -d '{"threadID":"34518178493"}'

Example Response

{
    "ok": true
}