Files

Upload

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

Upload a file which can be used in a subsequent postThread or postChatMessage request using the uploadFile endpoint. Only uploading image, video, pdf, and text mimetypes are allowed.

Headers

NameTypeDescription

Authorization

string

Bearer <your_api_key>

Content-Type

string

multipart/form-data

Request Body

NameTypeDescription

data

string

The local location of the file

Example Request

curl  \
  -H "Authorization: Bearer ABcD-ur5d6WK5lWZFKF3cKwp" \
  -H "Content-Type: multipart/form-data" \
  -X POST https://threads.com/api/public/uploadFile \
  -F "data=@/Users/bender/Desktop/bender.png"

Example Response

{
    "ok": true,
    "result":
    {
        "fileID": "32413262427"
    }
}