Media

Upload media

Upload a file, or import one from a URL, to attach to posts.

POST / media
curl -X POST "https://smanager.mrfirdavs.uz/api/v1/media" \
  -H "Authorization: Bearer $ONETHREADS_KEY" \
  -F "file=@release.png"
Created
{
  "id": "efa6aa69-6625-421a-881e-360535c0e2e2.png",
  "type": "image",
  "url": "https://smanager.mrfirdavs.uz/media/efa6aa69-6625-421a-881e-360535c0e2e2.png",
  "name": "release.png",
  "size": 284113
}

Send the file as multipart/form-data in a field named file. To import a file that's online instead, send JSON { "url": "https://…", "name": "cover.png" } and 1Threads downloads it. Use the returned id in a post's media.

File requirements: JPEG or PNG images up to 8 MB, MP4 or MOV videos up to 100 MB. Files are served from /media/… so Threads can download them when publishing; the URLs are public but unguessable.

Authorizations

Authorizationheaderrequired
Bearer <key>. Needs a read & write key.

Body (multipart/form-data or JSON)

filefile
The image or video (multipart uploads).
urlstring
An http(s) URL to import instead (JSON body).
namestring
File name to keep for an import. Default: from the URL.