Chats

Create

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

Create a new chat

Headers

NameTypeDescription

Authorization

string

Bearer <your_api_key>

Content-Type

string

application/json

Request Body

NameTypeDescription

name

string

name of the chat

userIDs

string []

an userIDs of emails to add to the chat

emails

string[]

an array of emails to add to the chat

Example Request

curl \
  -H "Authorization: Bearer ABcD-ur5d6WK5lWZFKF3cKwp" \
  -H "Content-Type: application/json" \
  -X POST https://threads.com/api/public/createChat \
  -d '{"name":"new chat", "userIDs": ["32454344821"]}'

Example Response

{
      "ok": true,
      "result":
      {
          "chatID": "085aff08-6623-4c8a-aaf5-0c2a35af98fc",
          "chatURL": "https://threads.com/085aff08-6623-4c8a-aaf5-0c2a35af98fc"
      }
  }

Delete

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

Delete a chat. Pass in the chatID.

Headers

NameTypeDescription

Authorization

string

Bearer <your_api_key>

Content-Type

string

application/json

Request Body

NameTypeDescription

chatID

string

This is ID of the chat you want to delete

Example Request

curl \
  -H "Authorization: Bearer ABcD-ur5d6WK5lWZFKF3cKwp" \
  -H "Content-Type: application/json" \
  -X POST https://threads.com/api/public/deleteChat \
  -d '{"chatID":"cb970001-e537-4a29-a269-37ca5feb86b2"}'

Example Response

{
    "ok": true
}