Media
Upload media
Upload a file, or import one from a URL, to attach to posts.
POST
/ mediacurl -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
AuthorizationheaderrequiredBearer <key>. Needs a read & write key.Body (multipart/form-data or JSON)
filefileThe image or video (multipart uploads).
urlstringAn http(s) URL to import instead (JSON body).
namestringFile name to keep for an import. Default: from the URL.