Channels

List

GET https://threads.com/api/public/channels

List the channels visible to your Bot user. These include public channels in your organization.

Headers

NameTypeDescription

Authorization

string

Bearer <your_api_key>

Content-Type

string

application/json

Example Request

curl \
  -H "Authorization: Bearer ABcD-ur5d6WK5lWZFKF3cKwp" \
  -H "Content-Type: application/json" \
  -X GET https://threads.com/api/public/channels

Example Response

{
    "ok": true,
    "result":
    [
        {
            "channelID": "32440334470",
            "name": "general-updates",
            "description": "Broad based updates for the company.",
            "privacy": "public",
            "memberIDs":
            [
                "32454348425",
                "32454344821",
                "32454484427"
            ]
        },
        {
            "channelID": "32460534446",
            "name": "random",
            "description": "A catch-all for all questions within the company.",
            "privacy": "public",
            "memberIDs":
            [
                "32454348425",
                "32454344821",
                "32454484427"
            ]
        },
        {
            "channelID": "32467534591",
            "name": "prviate",
            "description": "A place for third party integrations",
            "privacy": "prviate",
            "memberIDs":
            [
                "32454348425",
                "32454344824"
            ]
        }
    ]
}

Create

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

Create a new channel

Headers

NameTypeDescription

Authorization

string

Bearer <your_api_key>

Content-Type

string

application/json

Request Body

NameTypeDescription

name

string

name of the channel

userIDs

string []

an userIDs of emails to add to the channel

emails

string[]

an array of emails to add to the channel

description

string

a short description of what this channel will be used for

Example Request

curl \
  -H "Authorization: Bearer ABcD-ur5d6WK5lWZFKF3cKwp" \
  -H "Content-Type: application/json" \
  -X POST https://threads.com/api/public/createChannel \
  -d '{"name":"new channel", "description":"a new channel", "emails":["bender@myorg.com"], "userIDs": ["32454344821"]}'

Example Response

  {
      "ok": true,
      "result":
      {
          "channelID": "32391844586",
          "channelURL": "https://threads.com/32391844586"
      }
  }

Add members

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

Add members to a channel

Headers

NameTypeDescription

Authorization

string

Bearer <your_api_key>

Content-Type

string

application/json

Request Body

NameTypeDescription

channelID

string

id of the channel

userIDs

string []

an userIDs of emails to add to the channel

emails

string[]

an array of emails to add to the channel

Example Request

curl \
  -H "Authorization: Bearer ABcD-ur5d6WK5lWZFKF3cKwp" \
  -H "Content-Type: application/json" \
  -X POST https://threads.com/api/public/addChannelMembers \
  -d '{"channelID":"32391844586", "emails":["bender@myorg.com"], "userIDs": ["32454344821"]}'

Example Response

{
    "ok": true
}

Delete

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

Delete a channel. Pass in the channelID.

Headers

NameTypeDescription

Authorization

string

Bearer <your_api_key>

Content-Type

string

application/json

Request Body

NameTypeDescription

channelID

string

This is ID of the channel 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/deleteChannel \
  -d '{"channelID":"32467534591"}'

Example Response

{
    "ok": true
}