Developers
Threads API Publishing in 2026: Containers, Carousels, Reply Chains and Limits
· 7 min read
Publish to Threads with the API in 2026: media containers, the 30-second wait, carousels, reply chains, the 5-link rule, 250 posts a day and token refresh.
Publishing to Threads through the API takes two calls: create a media container with `POST /{threads-user-id}/threads`, then publish it with `POST /{threads-user-id}/threads_publish` and the container id as `creation_id`. That's true even for text-only posts. Meta recommends waiting about 30 seconds between the two so processing can finish. Posts are limited to 500 characters, carousels take 2 to 20 items, and each profile can publish 250 posts and 1,000 replies in a rolling 24 hours. You need the threads_basic and threads_content_publish permissions, from a Meta app with the Threads use case.
Setup: a separate Meta app and its own OAuth
Threads doesn't share Instagram's or Facebook's login. You create a Meta app with the "Access the Threads API" use case, which gets its own app id and secret, and users authorize at threads.net/oauth/authorize. Request threads_basic and threads_content_publish to post. Add threads_manage_replies for reply chains, threads_read_replies to read conversations, and threads_manage_insights for metrics.
Until Meta approves your app for advanced access, you can only publish for accounts added as Threads testers on the app. That's the review gate, and it applies per permission.
After the code exchange you get a short-lived token. Exchange it for a long-lived one with GET https://graph.threads.net/access_token?grant_type=th_exchange_token&client_secret=...&access_token=.... Long-lived tokens last 60 days and can be refreshed with grant_type=th_refresh_token once they're at least 24 hours old. Refresh on a schedule. A token that expires means a reconnect.
Step 1: create a container
Meta's current examples use the graph.threads.com host with version v1.0. Send media_type (TEXT, IMAGE or VIDEO), the text, and for media a public image_url or video_url that Meta will fetch.
curl -X POST "https://graph.threads.com/v1.0/$THREADS_USER_ID/threads" \
-d "media_type=IMAGE" \
-d "image_url=https://cdn.example.com/new-menu.jpg" \
--data-urlencode "text=Winter menu starts Monday. Three new soups, one returning favorite." \
-d "access_token=$THREADS_TOKEN"
# {"id": "17920000000000000"} <- container idStep 2: wait for the container, then publish
Meta's guidance is to wait about 30 seconds before publishing. A fixed sleep is wasteful for text and too short for a long video, so poll instead: GET /{container-id}?fields=status returns IN_PROGRESS, FINISHED, ERROR, EXPIRED or PUBLISHED. Publish on FINISHED. Stop on ERROR or EXPIRED.
const API = "https://graph.threads.com/v1.0"
async function waitFinished(containerId: string, token: string, tries: number) {
for (let i = 0; i < tries; i++) {
const r = await fetch(API + "/" + containerId + "?fields=status,error_message&access_token=" + token)
const { status, error_message } = await r.json()
if (status === "FINISHED") return
if (status === "ERROR" || status === "EXPIRED") throw new Error(status + ": " + error_message)
await new Promise((res) => setTimeout(res, 2000))
}
throw new Error("Container still processing")
}
async function publish(userId: string, token: string, creationId: string) {
for (let attempt = 0; ; attempt++) {
const res = await fetch(API + "/" + userId + "/threads_publish", {
method: "POST",
body: new URLSearchParams({ creation_id: creationId, access_token: token }),
})
if (res.ok) return (await res.json()).id
const body = await res.text()
// Publish can lag container creation: retry "media not found" briefly.
if (attempt < 5 && body.includes("4279009")) {
await new Promise((r) => setTimeout(r, 2000 * (attempt + 1)))
continue
}
throw new Error("Threads " + res.status + ": " + body)
}
}The retry in publish comes from production. Even after a container reports FINISHED, the publish endpoint sometimes answers "Media Not Found" with error subcode 4279009 for a few seconds. It's a lag between Meta's systems, not a real failure. A short backoff on that one subcode fixes it. Retrying every error the same way would hide real problems.
Budget the polling by media type. We give text 10 tries, images 15 and video 60, at 2 seconds each. Video can take a couple of minutes. A container expires if you don't publish it within 24 hours.
Threads API limits (November 2026)
| Limit | Value |
|---|---|
| Posts per profile | 250 per rolling 24 hours (carousel = 1) |
| Replies per profile | 1,000 per rolling 24 hours |
| Text length | 500 characters; emoji count as their UTF-8 bytes |
| Links per post | 5 unique URLs max (THREADS_API__LINK_LIMIT_EXCEEDED) |
| Carousel items | 2 to 20 images and/or videos |
| Images | JPEG or PNG, 8 MB max, aspect ratio up to 10:1, min width 320 px |
| Video | MOV or MP4, up to 5 minutes, 1 GB, 23-60 fps, max 1920 px wide |
| Topic tags | 1 per post, 1-50 characters, no periods or ampersands |
| API calls | 4,800 x impressions per 24 hours per app-user pair (min 10 impressions) |
Check usage before a batch with GET /{threads-user-id}/threads_publishing_limit?fields=quota_usage,config. It returns current usage and the quota_total (250) and quota_duration (86,400 seconds).
The emoji rule trips up character counters. Threads counts emoji by their UTF-8 bytes, so a post full of emoji runs out of room well before 500 visible characters. Our Threads character counter helps with this.
Links, previews and the 5-link rule
For a text-only post, the first link in the text becomes a preview card automatically. To choose the preview URL yourself, pass link_attachment. It only works on TEXT posts, so image, video and carousel posts get no card. Since December 22, 2025, a post with more than 5 unique links fails at container creation with THREADS_API__LINK_LIMIT_EXCEEDED. A link_attachment URL that also appears in the text counts once. One that doesn't counts as an extra link.
Carousels
A carousel is three steps: create a container per item with is_carousel_item=true, wait for each, then create a parent with media_type=CAROUSEL and children as a comma-separated list of ids. Put the text on the parent. Publish the parent.
# Each item
curl -X POST "https://graph.threads.com/v1.0/$THREADS_USER_ID/threads" \
-d "media_type=IMAGE" -d "is_carousel_item=true" \
-d "image_url=https://cdn.example.com/soup-1.jpg" \
-d "access_token=$THREADS_TOKEN"
# Parent
curl -X POST "https://graph.threads.com/v1.0/$THREADS_USER_ID/threads" \
-d "media_type=CAROUSEL" \
-d "children=$ITEM_1,$ITEM_2,$ITEM_3" \
--data-urlencode "text=This week's soups, ranked by the kitchen" \
-d "access_token=$THREADS_TOKEN"Wait for every child to reach FINISHED before creating the parent, and wait for the parent before publishing. If one child fails, start over. There's no way to swap a child into an existing parent.
Reply chains: making an actual thread
To post a multi-part thread, publish the first post, then create each following post with reply_to_id set to the id of the post before it, and publish it. Each reply is its own container and its own publish call. You need threads_manage_replies, and you can only reply this way to a root post you own unless you have the keyword-search or mentions permissions.
export async function postChain(userId: string, token: string, parts: string[]) {
let previous: string | undefined
for (const text of parts) {
const fields: Record<string, string> = { media_type: "TEXT", text, access_token: token }
if (previous) fields.reply_to_id = previous
const res = await fetch(API + "/" + userId + "/threads", {
method: "POST",
body: new URLSearchParams(fields),
})
const { id } = await res.json()
await waitFinished(id, token, 10)
previous = await publish(userId, token, id)
}
}Replies draw on the separate 1,000-a-day reply limit, not the 250 post limit. A 6-part thread is one post and five replies.
Errors
- Auth errors (401, 403, or code 190 in the body): the token expired or was revoked. Refresh once, then ask for reconnection.
- 4279009 on publish: lag. Retry briefly with backoff.
- THREADS_API__LINK_LIMIT_EXCEEDED: more than 5 links. Edit the text.
- Container ERROR: usually the media. Check format, size and that the URL is public and doesn't redirect.
- 429 or 5xx: retry with backoff. Don't retry a publish that might have succeeded without checking the profile first.
Threads errors come back as JSON with an error.message. Surface that message to the user. It's usually specific enough to act on.
For the workflow side, see our guide to scheduling Threads posts, and Threads vs X if you're choosing where to put effort.
When to use a scheduling API instead of building it yourself
The Threads API is clean once you know its quirks: containers for everything, publish lag, the link limit, a separate app and review. If Threads is all you need, build it. If you need Threads plus Instagram, Facebook and Bluesky, you're maintaining three Meta OAuth flows and four container dialects.
Tesselith publishes to Threads today, including carousels and reply chains, from the app or the REST API. Our scheduling API checklist and the automation walkthrough cover the trade-offs, and the docs have the requests.
Questions people ask
- How do I publish a post with the Threads API?
- Create a container with POST /{threads-user-id}/threads, wait until its status is FINISHED, then call POST /{threads-user-id}/threads_publish with the container id as creation_id.
- How many posts can I publish per day with the Threads API?
- 250 posts per profile in a rolling 24 hours, plus a separate 1,000 replies. A carousel counts as one post.
- How many images can a Threads carousel have?
- Between 2 and 20 images, videos or a mix.
- How do I post a thread (multiple connected posts) via the API?
- Publish the first post, then create each next post with reply_to_id set to the previous post's id and publish it. This needs the threads_manage_replies permission.
- Why does Threads say Media Not Found when I publish?
- The publish endpoint can lag container creation by a few seconds and return subcode 4279009. Wait for the container to finish and retry briefly with backoff.