Threads API Direct
This is a member-only chapter. Log in with your Signal Over Noise membership email to continue.
Log in to readModule 4: Threads API Direct
Buffer is useful for multi-platform queueing. But if Threads is your primary channel, or if you want tighter control over how posts land there, the direct API approach is worth setting up.
Meta’s Threads API gives you access to text posts, image posts, carousels, reply management, and basic analytics — all from the terminal. The threads-api skill wraps this into something you can invoke without thinking about OAuth flows or endpoint URLs.
How the Threads API Works
The Threads API is part of Meta’s Graph API family. Authentication uses a long-lived access token tied to your Instagram / Threads account. The token doesn’t expire quickly (Meta gives you 60 days and the skill handles refresh), but getting the initial token requires a one-time setup through Meta’s developer console.
One-time setup:
- Create a Meta developer app at developers.facebook.com
- Add the Threads API product to your app
- Generate a user access token with
threads_basicandthreads_content_publishpermissions - Exchange it for a long-lived token
- Store it as
THREADS_ACCESS_TOKENin your environment
The skill includes instructions for this exchange. You run it once and the long-lived token goes in your .zshrc.
What the threads-api Skill Does
The threads-api skill handles the two-step publishing flow that the Threads API requires:
- Create a media container (the draft) — returns a container ID
- Publish the container — makes it live
For text posts, this looks simple from the outside. You call the skill with your text; it creates the container and publishes it. For images and carousels, there’s a bit more to it.
The skill’s YAML header:
---
name: threads-api
description: Post to Threads directly via Meta Graph API. Handles text, images, and carousels.
tools: Bash
---
Text Posts
The simplest case. You pass the text and the skill handles both API calls:
threads-api post "Spent the morning debugging a timezone issue.
The bug was in my assumption, not the code."
The skill creates the container with media_type: TEXT, then publishes it. The post appears on Threads within a few seconds.
Image Posts
For image posts, the image needs to be publicly accessible — either on R2, a CDN, or any public URL. The skill takes the URL:
threads-api post --image "https://assets.example.com/diagram.png" \
"Here's the architecture I landed on after three rewrites."
Internally, it creates a container with media_type: IMAGE and the image_url pointing to your hosted image. Then publishes.
If you’re already using the R2 CDN setup covered in the Co-Operating System course, your images are already publicly accessible. The workflow is: generate or screenshot → upload to R2 → post to Threads with that URL.
Carousels
A carousel on Threads is a container that holds multiple image containers. The API builds it in stages:
- Create each image container individually — get their IDs
- Create a carousel container referencing those IDs
- Publish the carousel container
The threads-api skill handles this automatically when you pass multiple images. From your side:
threads-api carousel \
--images "url1,url2,url3" \
"Three screenshots from the build — what it looked like at each stage."
Reply Management
The Threads API lets you fetch replies to your posts and respond to them. The skill exposes two commands for this:
threads-api replies --post-id "your-post-id"
Returns a list of replies with text, author, and timestamp.
threads-api reply --to "reply-id" "Your response text here"
Posts a reply to a specific comment. Same two-step flow as any other post.
Reply IDs come from the replies list. The skill formats them in a readable way so you’re not copying raw JSON.
Basic Analytics
The Threads API provides view counts, like counts, reply counts, and repost counts per post. The skill wraps the insights endpoint:
threads-api insights --post-id "your-post-id"
Returns the key metrics for that post. For a summary of your recent posts:
threads-api recent --limit 5
Shows your last five posts with their engagement numbers. Useful for knowing which content lands — not to optimise obsessively, but to notice patterns over time.
Threads Direct vs. Buffer
The direct API gives you a few things Buffer doesn’t:
- Replies — Buffer doesn’t handle reply management; the direct API does
- Carousels — Buffer’s carousel support is limited; direct is more flexible
- Analytics per post — available directly, not through Buffer
- No scheduling delay — direct API publishes immediately; Buffer adds queue overhead
Buffer wins on multi-platform management and scheduling. If you’re posting to three platforms, Buffer saves significant friction. If Threads is your main channel and you want control over timing and replies, direct is cleaner.
Most setups end up using both: Buffer for the multi-platform queue, direct API for reply management and the occasional immediate post.
That’s the full workshop. You now have the terminal-first workflow, the Buffer GraphQL integration, the content extraction pattern, and direct Threads API posting. Everything here runs in production. The skills are real. The pattern works.
What you post about and how often is still your call — as it should be.
Check Your Understanding
Answer all questions correctly to complete this module.
1. What is the two-step publishing flow required by the Threads API?
2. What advantages does the direct Threads API have over Buffer?
3. How do most setups handle the choice between Buffer and direct Threads API?
Pass the quiz above to unlock
Save failed. Please try again.